Numerical Methods HW2
Numerical Methods HW2
PROBLEMS 139
5.1 Determine the real roots of f (x) = 0.6x
2
+2.4x +5.5:
(a) Graphically.
(b) Using the quadratic formula.
(c) Using three iterations of the bisection method to determine
the highest root. Employ initial guesses of x
l
= 5 and x
u
= 10.
Compute the estimated error
a
and the true error
t
after each
iteration.
5.2 Determine the real root of f (x) = 4x
3
6x
2
+7x 2.3:
(a) Graphically.
(b) Using bisection to locate the root. Employ initial guesses of
x
l
= 0 and x
u
= 1 and iterate until the estimated error
a
falls
below a level of
s
= 10%.
5.3 Determine the real root of f (x) = 26 +85x 91x
2
+
44x
3
8x
4
+ x
5
:
(a) Graphically.
(b) Using bisection to determine the root to
s
= 10%. Employ ini-
tial guesses of x
l
= 0.5 and x
u
= 1.0.
(c) Perform the same computation as in (b) but use the false-
position method and
s
= 0.2 %.
5.4 (a) Determine the roots of f (x) = 13 20x +19x
2
3x
3
graphically. In addition, determine the first root of the function with
(b) bisection, and (c) false position. For (b) and (c) use initial
guesses of x
l
= 1 and x
u
= 0, and a stopping criterion of 1%.
5.5 Locate the first nontrivial root of sin x = x
3
, where x is in
radians. Use a graphical technique and bisection with the initial
interval from 0.5 to 1. Perform the computation until
a
is less than
s
= 2%. Also perform an error check by substituting your final
answer into the original equation.
5.6 Determine the positive real root of ln (x
4
) = 0.7 (a) graphi-
cally, (b) using three iterations of the bisection method, with initial
guesses of x
l
= 0.5 and x
u
= 2, and (c) using three iterations of the
false-position method, with the same initial guesses as in (b).
5.7 Determine the real root of f (x) = (0.8 0.3x)/x :
(a) Analytically.
(b) Graphically.
(c) Using three iterations of the false-position method and initial
guesses of 1 and 3. Compute the approximate error
a
and the true
error
t
after each iteration. Is there a problem with the result?
5.8 Find the positive square root of 18 using the false-position
method to within
s
= 0.5%. Employ initial guesses of x
l
= 4 and
x
u
= 5.
5.9 Find the smallest positive root of the function (x is in radians)
x
2
cos
s
= 1%. Check your final answer by substituting it into the origi-
nal function.
5.10 Find the positive real root of f (x) = x
4
8x
3
35x
2
+
450x 1001 using the false-position method. Use initial guesses
of x
l
= 4.5 and x
u
= 6 and performs five iterations. Compute both
the true and approximate errors based on the fact that the root is
5.60979. Use a plot to explain your results and perform the compu-
tation to within
s
= 1.0%.
5.11 Determine the real root of x
3.5
= 80: (a) analytically, and
(b) with the false-position method to within
s
= 2.5%. Use initial
guesses of 2.0 and 5.0.
5.12 Given
f (x) = 2x
6
1.6x
4
+12x +1
Use bisection to determine the maximum of this function. Employ
initial guesses of x
l
= 0 and x
u
= 1, and perform iterations until
the approximate relative error falls below 5%.
5.13 The velocity v of a falling parachutist is given by
v =
gm
c
1 e
(c/m)t
c
Given the parameter values V = 1 10
6
m
3
, Q = 1 10
5
m
3
/yr,
W = 1 10
6
g/yr, and k = 0.25 m
0.5
/g
0.5
/yr, use the modified
secant method to solve for the steady-state concentration. Employ
an initial guess of c = 4 g/m
3
and = 0.5. Perform three iterations
and determine the percent relative error after the third iteration.
6.19 For Prob. 6.18, the root can be located with fixed-point
iteration as
c =
W Qc
kV
2
or as
c =
W kV
c
Q
cha01064_ch06.qxd 3/20/09 11:51 AM Page 172
PROBLEMS 215
Determine h given r = 2 m, L = 5 m, and V = 8 m
3
. Note that if
you are using a programming language or software tool that is not
rich in trigonometric functions, the arc cosine can be computed
with
cos
1
x =
2
tan
1
1 x
2
h
3
+(3V/)
3r
and
h =
3
rh
2
If r = 1 m and V = 0.75 m
3
, determine whether either of these is
stable, and the range of initial guesses for which they are stable.
8.11 The Ergun equation, shown below, is used to describe the
flow of a fluid through a packed bed. P is the pressure drop, is
the density of the fluid, G
o
is the mass velocity (mass flow rate
divided by cross-sectional area), D
p
is the diameter of the particles
within the bed, is the fluid viscosity, L is the length of the bed,
and is the void fraction of the bed.
P
G
2
o
D
p
L
3
1
= 150
1
(D
p
G
o
/)
+1.75
Given the parameter values listed below, find the void fraction of
the bed.
D
p
G
o
= 1000
PD
p
G
2
o
L
= 10
8.12 The pressure drop in a section of pipe can be calculated as
p = f
LV
2
2D
where p = the pressure drop (Pa), f = the friction factor, L =
the length of pipe [m], = density (kg/m
3
), V = velocity (m/s),
and D = diameter (m). For turbulent flow, the Colebrook equation
provides a means to calculate the friction factor,
1
f
= 2.0 log
3.7D
+
2.51
Re
C
out
C
in
K
k
max
C
+
1
k
max
dC
Civil and Environmental Engineering
8.14 In structural engineering, the secant formula defines the force
per unit area, P/A, that causes a maximum stress
m
in a column
of given slenderness ratio L/k:
P
A
=
m
1 +(ec/k
2
) sec[0.5
P/(E A)(L/k)]
where ec/k
2
= the eccentricity ratio and E = the modulus of elas-
ticity. If for a steel beam, E = 200,000 MPa, ec/k
2
= 0.4, and
m
= 250 MPa, compute P/A for L/k = 50. Recall that sec x =
1/cos x.
8.15 In environmental engineering (a specialty area in civil
engineering), the following equation can be used to compute the
oxygen level c (mg/L) in a river downstream from a sewage
discharge:
c = 10 20(e
0.15x
e
0.5x
)
where x is the distance downstream in kilometers.
(a) Determine the distance downstream where the oxygen level
first falls to a reading of 5 mg/L. (Hint: It is within 2 km of the
discharge.) Determine your answer to a 1% error. Note that lev-
els of oxygen below 5 mg/L are generally harmful to gamefish
such as trout and salmon.
(b) Determine the distance downstream at which the oxygen is at a
minimum. What is the concentration at that location?
cha01064_ch08.qxd 3/20/09 11:54 AM Page 215
PROBLEMS 217
8.19 The displacement of a structure is defined by the following
equation for a damped oscillation:
y = 9e
kt
cos t
where k = 0.7 and = 4.
(a) Use the graphical method to make an initial estimate of the
time required for the displacement to decrease to 3.5.
(b) Use the Newton-Raphson method to determine the root to
s
= 0.01%.
(c) Use the secant method to determine the root to
s
= 0.01%.
8.20 The Manning equation can be written for a rectangular open
channel as
Q =
S(BH)
5/3
n(B +2H)
2/3
where Q =flow [m
3
/s], S =slope [m/m], H =depth [m], and n =
the Manning roughness coefficient. Develop a fixed-point iteration
scheme to solve this equation for H given Q = 5, S = 0.0002,
B = 20, and n = 0.03. Prove that your scheme converges for all
initial guesses greater than or equal to zero.
8.21 In ocean engineering, the equation for a reflected standing
wave in a harbor is given by = 16, t = 12, v = 48:
h = h
0
sin
2x
cos
2t v
+e
x
(x a)
n
when x > a
0 when x a
Use a numerical method to find the point(s) where the shear equals
zero.
8.25 Using the simply supported beam from Prob. 8.24, the
moment along the beam, M(x), is given by:
M(x) = 10[x 0
2
x 5
2
] +15 x 8
1
+ 150 x 7
0
+57x
Use a numerical method to find the point(s) where the moment
equals zero.
20 kips/ft
150 kip-ft
15 kips
5 2 1 2
Figure P8.24
cha01064_ch08.qxd 3/20/09 11:55 AM Page 217
PROBLEMS 219
pipes. The Fanning friction factor is dependent on a number of pa-
rameters related to the size of the pipe and the fluid, which can all
be represented by another dimensionless quantity, the Reynolds
number Re. A formula that predicts f given Re is the von Karman
equation,
1
f
= 4 log
10
(Re
f ) 0.4
Typical values for the Reynolds number for turbulent flow are
10,000 to 500,000 and for the Fanning friction factor are 0.001 to
0.01. Develop a function that uses bisection to solve for f given a
user-supplied value of Re between 2,500 and 1,000,000. Design the
function so that it ensures that the absolute error in the result is
E
a,d
< 0.000005.
8.34 Real mechanical systems may involve the deflection of non-
linear springs. In Fig. P8.34, a mass mis released a distance h above
a nonlinear spring. The resistance force F of the spring is given by
F =
k
1
d +k
2
d
3/2
0
v
0
y
x
Figure P8.36
8.36 Aerospace engineers sometimes compute the trajectories of
projectiles like rockets. Arelated problem deals with the trajectory
of a thrown ball. The trajectory of a ball is defined by the (x, y)
coordinates, as displayed in Fig. P8.36. The trajectory can be
modeled as
y = (tan
0
)x
g
2v
2
0
cos
2
0
x
2
+ y
0
Find the appropriate initial angle
0
, if the initial velocity
v
0
= 20 m/s and the distance to the catcher x is 35 m. Note that the
ball leaves the throwers hand at an elevation of y
0
= 2 m and the
catcher receives it at 1 m. Express the final result in degrees. Use a
value of 9.81 m/s
2
for g and employ the graphical method to
develop your initial guesses.
h
(a) (b)
d
h + d
Figure P8.34
8.35 Mechanical engineers, as well as most other engineers, use
thermodynamics extensively in their work. The following
polynomial can be used to relate the zero-pressure specific heat of
dry air, c
p
kJ/(kg K), to temperature (K):
c
p
= 0.99403 +1.671 10
4
T +9.7215 10
8
T
2
9.5838 10
11
T
3
+1.9520 10
14
T
4
Determine the temperature that corresponds to a specific heat of
1.2 kJ/(kg K).
8.37 The general formfor a three-dimensional stress fieldis givenby
xx
xy
xz
xy
yy
yz
xz
yz
zz
10 14 25
14 7 15
25 15 16
10 14 25
14 7 15
25 15 16
ExtraQuestion:
WriteaCprogramtofindtheresultofMaclaurinSeriesofthefunction
c
x
= 1 +x +
x
2
2!
+
x
3
S!
++
x
n
n!
x valuewillbedecidedbyuser.Stoppingcriteria(
s
)willbe0,05%.