NumMeth G2019 Final Solutions
NumMeth G2019 Final Solutions
𝑥(𝑛)−𝑥(0) 4−0
Solution 1) 𝑛= +1= +1=5
ℎ 1
𝑇1 = 40 , 𝑇5′ = 50 𝑎𝑛𝑑 ℎ = 1
1
𝑇𝑖′ = ( ) ( 𝑇𝑖+1 − 𝑇𝑖−1 ) = 0.5 ∙ ( 𝑇𝑖+1 − 𝑇𝑖−1 )
2ℎ
1
𝑇𝑖 ′′ = ( 2 ) ( 𝑇𝑖−1 − 2 𝑇𝑖 + 𝑇𝑖+1 ) = 𝑇𝑖−1 − 2 𝑇𝑖 + 𝑇𝑖+1
ℎ
i=1: 𝒙𝟏 = 𝟎 , 𝑻𝟏 = 𝟒𝟎
i=2: 𝒙𝟐 = 𝟏 , 𝑻𝟏 − 𝟏. 𝟓 𝑻𝟐 + 𝑻𝟑 = 𝟏𝟎
i=3: 𝒙𝟐 = 𝟐 , 𝑻𝟐 − 𝟏. 𝟓 𝑻𝟑 + 𝑻𝟒 = 𝟏𝟎
i=4: 𝒙𝟐 = 𝟑 , 𝑻𝟑 − 𝟏. 𝟓 𝑻𝟒 + 𝑻𝟓 = 𝟏𝟎
i=5: 𝒙𝟐 = 𝟒 , 𝑻𝟒 − 𝟏. 𝟓 𝑻𝟓 + 𝑻𝟔 = 𝟏𝟎
𝑇5 ′ = 0.5 ( 𝑇6 − 𝑇4 ) = 50 → 𝑇6 = 100 + 𝑇4
𝟏 𝟎 𝟎 𝟎 𝟎 𝑻𝟏 𝟒𝟎
𝟏 −𝟏. 𝟓 𝟏 𝟎 𝟎 𝑻𝟐 𝟏𝟎
𝟎 𝟏 −𝟏. 𝟓 𝟏 𝟎 𝑻𝟑 = 𝟏𝟎
𝟎 𝟎 𝟏 −𝟏. 𝟓 𝟏 𝑻𝟒 𝟏𝟎
[𝟎 𝟎 𝟎 𝟐 −𝟏. 𝟓] [ 𝑻𝟓 ] [−𝟗𝟎]
Question 2) [25 points] Consider the following electrical circuit.
Solution 2)
10 0 −5 x1 50
[0 20 −10 ] ∙ [ x 2 ] = [ 0]
−5 −10 20 x3 0
10 0 −5 x1 50
𝑨=[ 0 20 −10] , x
𝐗 = [ 2] , 𝐁=[0]
−5 −10 20 x3 0
𝑨=𝑳∙𝑼
First, we use Gauss elimination:
row2 – (0) x row1 → row2 , 𝐿21 = 0 and,
10 0 −5
row3 – (-1/2) x row1 → row3 , 𝐿31 = −1/2 → 𝑨′ = [ 0 20 −10]
0 −10 17.5
10 0 −5 1 0 0
row3 – (-1/2) x row2 → row3 , 𝐿32 = −1/2 → 𝑼 = [ 0 20 −10] and 𝑳 = [ 1 11 0]
0
0 0 12.5 −2 −2 1
𝑨∙𝑿=𝑩
𝑳 ∙ (𝑼 ∙ 𝑿) = 𝑩
1 0 0 50
𝒀=𝑼∙𝑿 → 𝑳∙𝒀=𝑩 → [ 1 0 1 0]∙𝐘=[0]
1
−2 −2 1 0
50
𝑦1 = 50 , 𝑦2 = 0 , 𝑦3 = 25 → 𝐘 = [ 0 ]
25
10 0 −5 x1 50
𝑼∙𝑿=𝒀 → [0 20 −10 ] ∙ [ x 2 ] = [ 0] →
0 0 12.5 x 3 25
𝒊𝟏 𝟔
25 0+10∙(2) 50−0∙(1)+5∙(2)
𝑥3 = 12.5 = 2 , 𝑥2 = = 1 , 𝑥1 = =6 → 𝐗 = {𝒊𝟐 } = {𝟏} 𝒂𝒎𝒑𝒆𝒓𝒔
−20 10
𝒊𝟑 𝟐
Question 3) [25 points] Use the data below to compute the speed and the accelaration at t=0.2 sec
as accurately as possible.
Time (sec) 0 0.1 0.2 0.3 0.4
Position (meter) 0.000 0.080 0.140 0.300 0.750
Hint: Use the table for the first central
difference approximation of O(h2) and
Richardson Extrapolation equation to
2𝑃 𝑔(ℎ1 ⁄2)−𝑔(ℎ1 )
increase the accuracy: 𝐺 =
2𝑃 −1
Work with at least 3 decimal points.
Solution 3) p=2
The Speed:
1
𝑓 ′(𝑥) = ( ) [ 𝑓(𝑥 + ℎ) − 𝑓(𝑥 − ℎ) ]
2ℎ
1
for h=0.1 , 𝑓 ′(𝑥) = (2(0.1)) [ 0.300 − 0.080 ] = 1.1 → g(h1/2)
1
for h=0.2 , 𝑓 ′(𝑥) = (2(0.2)) [ 0.750 − 0.000] = 1.875 → g(h1)
ℎ
2𝑝 𝑔( 1 )−𝑔(ℎ1 ) 22 (1.1)−1.875
2
𝐺= = = 𝟎. 𝟖𝟒𝟐 𝒎/𝒔 with the error O(h4).
2𝑝 −1 22 −1
The Accelaration:
for h=0.1 ,
1
𝑓 ′′(0.1) = ((0.1)2 ) [ (0.080) − 2 (0.140) + (0.300)] = 10.000 → g(h1/2)
for h=0.2 ,
1
𝑓 ′′(0.2) = ((0.2)2 ) [ (0.000) − 2 (0.140) + (0.750)] = 11.750 → g(h1)
where x is its radius, and S is its surface area. If we want to keep the surface area at 150 𝑐𝑚2 , then
numerically calculate its radius x to obtain the maximum volume fmax(x) by using Golden Bracketing
method.
(Search x between 2.7 and 2.9 cm . Stop telescoping when the bracketing width ℎ ≤ 1 ∙ 10−1 . Use
R=0.618034 as the Golden Ratio. Work with at least 4 decimal points.)
Solution 4) To convert the problem from maximization to minimization, we negate the function as:
𝐹(𝑥) = −𝑓(𝑥) = −75 ∙ 𝑥 + 𝜋 ∙ 𝑥 3
and numerically minimize it by using Golden Bracketing method as:
Stop if h<ε
i ai bi h ai'=bi-Rxh bi'=ai+Rxh f(ai') f(bi')
1 2.7000 2.9000 0.2000 2.7764 2.8236 -140.9949 -141.0472
2 2.7764 2.9000 0.1236 2.8236 2.8528 -141.0472 -141.0203
3 2.7764 2.8528 0.0764 2.8056 2.8236 -141.0411 -141.0472 Yes
𝟐. 𝟖𝟎𝟓𝟔 + 𝟐. 𝟖𝟐𝟑𝟔
𝒙𝒎𝒊𝒏 = = 𝟐. 𝟖𝟏𝟒𝟔 𝑭(𝒙𝒎𝒊𝒏) = −𝟏𝟒𝟏. 𝟎𝟒𝟔𝟑
𝟐
At the 3rd step (i=3): ℎ = 𝑏3 − 𝑎3 = 2.8525 − 2.7764 = 0.0764 < 0.1 , the telescoping stopped.