Numerical Applications - Ch1
Numerical Applications - Ch1
Omar Mokhtar
Assistant Lecturer
NUMERICAL
APPLICATIONS
Chapter:1 [Bisection & Newton-Raphson Methods]
Bisection Method
1. A trough of length 𝐿 has a cross section in the shape of semicircle radius 𝑟 as shown.
When filled with water to within a distance ℎ of the top, the volume 𝑉 of the water is given
by
ℎ
𝑉 = 𝐿 [0.5𝜋𝑟 2 − 𝑟 2 sin−1 − ℎ(𝑟 2 − ℎ2 )1/2 ]
𝑟
Suppose 𝐿 = 10 ft, 𝑟 = 1 ft, and 𝑉 = 12.4 ft 3. Find the depth of the water in the trough
to within 0.01 ft. [ref. [1]]
Solution
𝐿 = 10, 𝑟 = 1, 𝑉 = 12.4, ℎ𝑠 = 0, ℎ𝑒 = 1, Tol = 0.01,
|1 − 0|
𝑛 > ln / ln 2 = 6.643 ⇒ 𝑛 = 7
0.01
𝒊 𝒉𝒔 𝒉𝒆 𝒉𝒓 𝒇(𝒉𝒓 ) |𝒉𝒆 − 𝒉𝒔 | 𝑨𝑹𝑬
1 0 1 0.5 -0.62582 1
2 0 0.5 0.25 -0.16395 0.5 100
3 0 0.25 0.125 0.081449 0.25 100
4 0.125 0.25 0.1875 -0.04199 0.125 33.33333
5 0.125 0.1875 0.15625 0.019573 0.0625 20
6 0.15625 0.1875 0.171875 -0.01125 0.03125 9.090909
7 0.15625 0.171875 0.164063 0.004149 0.015625 4.761905
1
3𝑟 sub. 𝑟 sin 𝛼 3𝑟 𝑟 sin 𝛼
𝑥̅ = → 𝑥̅ = ⇒ = → 3𝛼 − 4 sin 𝛼 = 0
4 𝛼 4 𝛼
𝒊 𝒂 𝒃 𝒙𝒓 𝒇(𝒙) |𝒃 − 𝒂| 𝑨𝑹𝑬
1 0.5 1.5 1 -0.36588 1 50
2 1 1.5 1.25 -0.04594 0.5 20
3 1.25 1.5 1.375 0.201428 0.25 9.090909
4 1.25 1.375 1.3125 0.070194 0.125 4.761905
5 1.25 1.3125 1.28125 0.010256 0.0625 2.439024
6 1.25 1.28125 1.265625 -0.01831 0.03125 1.234568
7 1.265625 1.28125 1.273438 -0.00414 0.015625 0.613497<1%
• 𝑥𝑟 = 1.273438
3. A particle starts at rest on a smooth inclined plane whose angle 𝜃 is increasing at a constant rate
𝑑𝜃/𝑑𝑡 = 𝑤. At the end of 𝑡 seconds, the position of the particle is given by
g
𝑥(𝑡) = (sinh 𝑤𝑡 − sin 𝑤𝑡)
2𝑤 2
Suppose the particle has moved 1.7 ft in in 1 second. Find,
to within0.1 %, the rate 𝑤 at which 𝜃 changes if 𝑤0 = −0.5
and 𝑤1 = −0.1. Assume that g = −32.17 ft/𝑠 2 .[ref. [1]]
Solution:
We will solve it by using Bisection method.
• 𝑤0 = −0.5 𝑥(𝑤0 ) = 0.981033
• 𝑤1 = −0.1 𝑥(𝑤1 ) = −1.16383
2
4. Water is flowing in a trapezoidal channel at a rate of 𝑄 = 20 𝑚3 /𝑠. The critical depth 𝑥 for
such a channel must satisfy the equation:
𝑄2
0=1− 𝐵
𝑔 𝐴3𝑐
Where g = 9.81 𝑚/𝑠 2 , 𝐴𝑐 is the cross-sectional are (𝑚2 ), and 𝐵 is the width of the channel
at the surface ( 𝑚). For this case, the width and the cross-sectional area can be related to
depth 𝑦 by
𝐵 =3+𝑥
and
𝑥2
𝐴𝑐 = 3𝑥 +
2
Solve for the critical depth using bisection method, use initial guesses of 𝑥𝑠 = 0.5 and
𝑥𝑒 = 2.5 , with accuracy 𝜀 = 1%.[ref. [3]]
Solution:
202 400
0=1− 3
(3 + 𝑥) ⇒ 0 = 1 − 3
(3 + 𝑥)
𝑥2 𝑥2
9.81 × (3𝑥 + 2 ) 9.81 × (3𝑥 + 2 )
3
𝑥2
9.81 (3𝑥 + ) − 400(3 + 𝑥) = 0, 𝑥 ∈ [0.5, 2.5], 𝜀 = 1%
2
𝒊 𝒂 𝒃 𝒙𝒓 𝒇(𝒙𝒓 ) |𝒃 − 𝒂| ARE
1 0.5 2.5 1.5 -54.0308 2 66.66667
2 1.5 2.5 2 3022.72 1 25
3 1.5 2 1.75 1159.132 0.5 14.28571
4 1.5 1.75 1.625 482.6988 0.25 7.692308
5 1.5 1.625 1.5625 198.1834 0.125 4
6 1.5 1.5625 1.53125 68.19564 0.0625 2.040816
7 1.5 1.53125 1.515625 6.13145 0.03125 1.030928
8 1.5 1.515625 1.507813 -24.185 0.015625 0.518135<1%
• 𝑥𝑟 = 1.507813
5. A uniform beam subject to a linearly increasing distributed load as shown in the following
figure. The equation for the resulting elastic curve is:
3
(a) (b)
𝑤0
𝑦= (−𝑥 5 + 2 𝐿2 𝑥 3 − 𝐿4 𝑥)
120𝐸𝐼𝐿
Use bisection to determine the point of maximum deflection (i.e., the value of 𝑥 𝑑𝑦/𝑑𝑥 =
0).with 𝐿 = 600 cm, 𝐸 = 50,000 kN/cm2 , I = 30,000 cm, and 𝑤 = 2.5 kN/cm within 𝜀 =
1% [ref. [3]]
Solution:
𝑤0 𝑑/𝑑𝑥 𝑑𝑦 𝑤0
𝑦= (−𝑥 5 + 2 𝐿2 𝑥 3 − 𝐿4 𝑥) → =0= (−5𝑥 4 + 6 𝐿2 𝑥 2 − 𝐿4 )
120𝐸𝐼𝐿 𝑑𝑥 120𝐸𝐼𝐿
𝑥 ∈ [0,500]
𝑑𝑦
= −5𝑥 4 + 6𝐿2 𝑥 2 − 𝐿4 = 0
𝑑𝑥
𝒊 𝒂 𝒃 𝒙𝒓 𝒇(𝒙𝒓 ) |𝒃 − 𝒂| ARE
1 0 500 250 -1.4E+10 500 100
2 250 500 375 7.53E+10 250 33.33333
3 250 375 312.5 3.37E+10 125 20
4 250 312.5 281.25 9.97E+09 62.5 11.11111
5 250 281.25 265.625 -2.1E+09 31.25 5.882353
6 265.625 281.25 273.4375 3.95E+09 15.625 2.857143
7 265.625 273.4375 269.5313 9.3E+08 7.8125 1.449275
8 265.625 269.5313 267.5781 -5.8E+08 3.90625 0.729927<1%
• 𝑥𝑟 = 267.5781 cm
6. You buy a $35,000 vehicle for nothing down at $8,500 per year for 7 years. Use the
bisection method to determine the interest rate that you are paying. Employ initial guesses
for the interest rate of 0.01 and 0.3 and a stopping criterion of 0.00005. The formula
relating present worth 𝑃, annual payment 𝐴, number of years 𝑛, and interest rate 𝑖 is :[ref.
[3]]
𝑖(1 + 𝑖)𝑛
𝐴=𝑃
(1 + 𝑖)𝑛 − 1
Solution:
4
𝑃 = 35,000, 𝐴 = 8,500, 𝑛 = 7,
𝑖(1 + 𝑖)𝑛 8500 𝑖(1 + 𝑖)7
𝐴=𝑃 ⇒ =
(1 + 𝑖)𝑛 − 1 35000 (1 + 𝑖)7 − 1
The root lies in [0.01,0.3].
𝒊 𝒂 𝒃 𝒙𝒓 𝒇(𝒙𝒓 ) |𝒃 − 𝒂| ARE
1 0.01 0.3 0.155 39.16383 0.29 93.54839
2 0.01 0.155 0.0825 -1719.88 0.145 87.87879
3 0.0825 0.155 0.11875 -861.252 0.0725 30.52632
4 0.11875 0.155 0.136875 -416.05 0.03625 13.24201
5 0.136875 0.155 0.145938 -189.667 0.018125 6.20985
6 0.145938 0.155 0.150469 -75.5543 0.009063 3.011423
7 0.150469 0.155 0.152734 -18.2705 0.004531 1.483376
8 0.152734 0.155 0.153867 10.42792 0.002266 0.736227
9 0.152734 0.153867 0.153301 -3.92598 0.001133 0.369474
10 0.153301 0.153867 0.153584 3.249799 0.000566 0.184396
11 0.153301 0.153584 0.153442 -0.33838 0.000283 0.092283
12 0.153442 0.153584 0.153513 1.455635 0.000142 0.04612
13 0.153442 0.153513 0.153478 0.558609 7.08E-05 0.023065
• 𝑥𝑟 = 0.153478
𝒊 𝒂 𝒃 𝒙𝒓 𝒇(𝒙𝒓 ) |𝒃 − 𝒂| ARE
1 10 50 30 158.9182 40 66.66667
2 10 30 20 -238.723 20 50
3 20 30 25 -56.9155 10 20
4 25 30 27.5 46.13327 5 9.090909
5 25 27.5 26.25 -6.52111 2.5 4.761905
6 26.25 27.5 26.875 19.51345 1.25 2.325581
7 26.25 26.875 26.5625 6.424319 0.625 1.176471
8 26.25 26.5625 26.40625 -0.0662 0.3125 0.591716
5
• the required time is 26.40625 sec
8. Problems involving the amount of money needed to pay off mortgage over a fixed period of time
involve the formula:
𝑝
𝐴 = [1 − (1 + 𝑖)−𝑛 ]
𝑖
Known as an ordinary annuity equation. In this equation 𝑃 is the mount of each payment and 𝑖 is
the interest rate per period for the 𝑛 payment periods. Suppose that a 30-year mortgage in the
amount of LE 75000 is needed and that the borrower can afforded house payments of at most.
LE 625 per month. What is the maximum interest rate that the borrower can afford to pay within
1%. [ref. [1]]
Solution:
𝐴 = 75000, 𝑛 = 30 year , 𝑝 = 625 × 12 = 7500 EL, Tol = 10−4
7500
75000 = [1 − (1 + 𝑖)−30 ] ⇒ 10 𝑖 + (1 + 𝑖)−30 − 1 = 0
𝑖
𝒊 𝒊𝒊 𝒊𝒊+𝟏 |𝒊𝒊+𝟏 − 𝒊𝒊 | 𝑨𝑹𝑬
1 1 0.1 0.9 900
2 0.1 0.093208 0.006792 7.287497
3 0.093208 0.093073 0.000134 0.144023
4 0.093073 0.093073 5.97E-08 6.41E-05<0.1%
•The interest rate (𝑖%) = 9.3%
𝑠 = 𝜋𝑟√𝑟 2 + ℎ2
Where 𝑟 is the radius of the base and ℎ is the height. Determine the
radius of acone that has a surface area of 1800 m2 and a height of
25 m. Solving by using Newton-Raphson Method to get the radius,
with starting value 𝑟 = 17 m, apply the first 4 iterations. [ref.[2]]
Solution:
1800
1800 = 𝜋𝑟√𝑟 2 + 252 = 𝜋𝑟√𝑟 2 + 625 ⇒ 𝑟√𝑟 2 + 625 − =0
𝜋
𝒊 𝒓𝒊 𝒓𝒊+𝟏 |𝒓𝒊+𝟏 − 𝒓𝒊 | 𝑨𝑹𝑬
1 17 18.48288 1.482883 8.023006
2 18.48288 18.44287 0.040011 0.216948
3 18.44287 18.44284 3E-05 0.000162
4 18.44284 18.44284 1.68E-11 9.11E-11
• 𝑟𝑟 = 18.482883
6
10. The volume of liquid 𝑉 in a hollow horizontal cylinder of radius 𝑟 and length 𝐿 is related
to the depth of the liquid ℎ by
𝑟−ℎ
𝑉 = [𝑟 2 cos−1 ( ) − (𝑟 − ℎ)√2𝑟ℎ − ℎ2 ] 𝐿
𝑟
Determine ℎ given 𝑟 = 2 m, L = 5 m3 , and 𝑉 = 8 m3 , within 1%. [ref. [3]]
Solution:
Let’s take ℎ = 1
By using Newton-Raphson Method:
𝑟−ℎ 𝑉
𝑟 2 cos−1 ( ) − (𝑟 − ℎ)√2𝑟ℎ − ℎ2 − = 0
𝑟 𝐿
2−ℎ 8
4 cos−1 ( ) − (2 − ℎ)√4ℎ − ℎ2 − = 0
2 5
11. A catenary cable is one which is hung between two points not in the same vertical line. As
depicted in the figure. It is subjected to no loads other than its own weight. Thus, its weight
acts as a uniform load per unit length along the cable 𝑤(𝑁/𝑚). A free-body diagram of a
section 𝐴𝐵 is depicted in the figure, where 𝑇𝐴 and 𝑇𝐵 are the tension forces at the end.
Based on horizontal and vertical force balances, the following differential equation model
of the cable can be derived:
𝑑2𝑦 𝑤 𝑑𝑦 2
= √1 + ( )
𝑑𝑥 2 𝑇𝐴 𝑑𝑥
7
Calculus can be employed to solve this equation for the height of the cable 𝑦 as a function of
distance 𝑥:
𝑇𝐴 𝑤 𝑇𝐴
𝑦= cosh ( 𝑥) + 𝑦0 −
𝑤 𝑇𝐴 𝑤
By using Newton-Raphson method to calculate 𝑇𝐴 where 𝑤 = 10 and 𝑦0 = 5, such that the
cable has a height of 𝑦 = 15 at 𝑥 = 50. [ref. [3]]
Solution:
𝑇𝐴 𝑤 𝑇𝐴 𝑤=10, 𝑦0 =5 𝑇𝐴 10 𝑇𝐴 arrange
𝑦= cosh ( 𝑥) + 𝑦0 − → 15 = cosh ( ⋅ 50) + 5 − →
𝑤 𝑇𝐴 𝑤 𝑦=15, 𝑥=50 10 𝑇𝐴 10
500
𝑇𝐴 cosh ( ) − 𝑇𝐴 − 100 = 0,
𝑇𝐴
Take 𝑇𝐴 = 1000
F = −(k1 𝑑 + 𝑘2 𝑑3/2 )
2𝑘2 𝑑5/2 1
0= + 𝑘1 𝑑2 − 𝑚 g𝑑 − 𝑚 gℎ
5 2
Solve for 𝑑, given the following parameter
values: 𝑘1 = 40,000 g/𝑠 2 , 𝑘2 = 40 g/(𝑠 2 𝑚5 ),
8
By using initial value 𝑑0 = 0.1, apply Newton-Raphson Method.
𝑑𝑟 = 0.166724
13. Aerospace engineers sometimes compute the trajectory of projectiles such as rockets. A
related problem deal with the trajectory of a throw ball. The trajectory of a ball thrown by
a right fielder is the (𝑥, 𝑦) coordinate as displayed in Figure. The trajectory can be modeled
as:
𝑔 2
𝑦 = (tan 𝜃0 ) 𝑥 − 𝑥 + 𝑦0
2𝑣02 cos 2 𝜃0
𝜃0,𝑟 = 37.95893 °
9
14. You are designing a spherical tank as shown in Figure to hold water for a small village in
a developing country. The volume of liquid it can hold can be computed as
[3𝑅 − ℎ]
𝑉 = 𝜋ℎ2
3
Where 𝑉 = volume [ 𝑚3 ], ℎ =
depth of water in tank[𝑚], and 𝑅 = the tank radius [𝑚].
If 𝑅 = 3 m, what depth must the tank be filled to so that it
holds 30 m3? By using Bisection method and Newton-
Raphson method withing 0.1%. [ref. [3]]
Solution:
90
90 = 𝜋 ℎ2 [9 − ℎ] ⇒ ℎ3 − 9ℎ2 + =0
𝜋
◘ Bisection Method
The required value can be lie between ℎ𝑠 = 1 and ℎ𝑒 = 3
◘ Newton-Raphson Method
Let ℎ = 1 m
10
15. The Manning equation can be written for a rectangular open channel as
√𝑆(𝐵𝐻)5/3
𝑄=
𝑛(𝐵 + 2𝐻)2/3
Where 𝑄 flow (𝑚3 /𝑠), 𝑆 = slope (𝑚/𝑚), 𝐻 = depth (𝑚), and 𝑛 = The Manning roughness
coefficient. Solve by using Newton-Raphson method for 𝐻 given 𝑄 = 5, 𝑆 = 0.0002, 𝐵 = 20,
and 𝑛 = 0.03. Perform the computation until 𝜀𝑎 is less than 𝜀𝑠 = 0.05%.[ref. [3]]
Solution:
√0.0002(20𝐻)5/3 15 √2
5= 2/3
⇒ (20 + 2𝐻)2/3 = (20𝐻)5/3
0.03(20 + 2𝐻) 100 100
• 𝐻𝑟 = 0.702293
16. Flow in pipelines is associated with energy loses due to friction between the moving fluid and the
pipe’s interior surface. The amount of these losses depends on the roughness of the surface and
the surface and the flow intensity. This can be represented by a friction factor 𝑓 which is related
roughness height 𝑘 of the pipe and to some flow characteristics dimensionless number called
𝜈𝐷
Renolds number(𝑅𝑒 = 𝜂
), where 𝜈 is the flow velocity, 𝐷 is the diameter of the pipe and 𝜂 is
the kinematic viscosity. Design and operation of pipelines require evaluating the energy losses
which require a prior knowledge of the friction factor Colebrook and White related the friction
factor for the flow in rough pipes to 𝑅𝑒 by the equation:
1 𝑘 2.51
= −2 ln [ + ]
√𝑓 3.7 𝐷 𝑅𝑒 √𝑓
It is required to solve for 𝑓 using all studied numerical technique (if possible) and mention the
best technique.
𝑘
Consider 𝐷 = 0.0002, 𝑅𝑒 = 400000, given Tol = 0.000001. [ref. [1]]
Solution
We will use Newton Raphson Method to get the friction factor 𝑓
11
1 0.0002 2.51
= −2 ln [ + ]
√𝑓 3.7 400000 √𝑓
Reference
[1] R. L. Burden, J. D. Faires, and A. M. Burden, Numerical analysis. Cengage learning, 2015.
[2] A. Gilat and V. Subramaniam, Numerical methods for engineers and scientists: an
introduction with applications using MATLAB. Wiley Publishing, 2007.
[3] S. C. Chapra and R. P. Canale, Numerical methods for engineers, vol. 1221. Mcgraw-hill
New York, 2011.
12