Lili
Lili
Lili
Solution:
f ( x i)( x i−1−x i)
Secant Formula, x i+1=x i−
f ( xi −1 ) −f ( xi )
f ( x 1 )( x0 −x1 )
x 2=x 1−
f ( x 0 ) −f (x 1 )
(−12 )( 1−0 )
x 2=0−
(−17.4 )−(−12 )
x 2=−2.222
2 3
f ( x 2 ) =−12−21 (−2.222 ) +18 (−2.222 ) −2.4 (−2.222 ) =149.863
f ( x 2 )(x1 −x2 )
x 3=x 2−
f ( x 1 ) −f (x 2 )
( 149.863 ) ( 0−(−2.222 ) )
x 3=−2.222−
(−12 ) −( 149.863 )
x 3=−0.165
f (x 3)( x 2−x 3 )
x 4 =x3 −
f ( x 2 )−f (x 3)
(−8.042 ) (−2.222−(−0.165 ) )
x 4 =−0.165−
( 149.863 )− (−8.042 )
x 4 =−0.269
The lowest real root is -0.415 in the 6th iteration with ℇS=0.005 corresponding to three
significant figures.
d x1 d x2
Q13. Given =1999 x1 +2999 x 2 and =−2000 x 1−3000 x 2. If x 1 ( 0 )=x 2 ( 0 )=¿1, obtain
dt dt
a solution from t=0 to 0.2 using step size of 0.05 with the Euler methods.
x i+1=x i + f ( x i , t i ) h
Solution:
d x1
For the first differential equation of solution as below.
dt
x 1=x 1+ f ( x 1 , t 1) h
¿ 250.9
x 1=1999 x1 t 1 +2999 x 2 t 1+ 1
¿−12259.095
Et = Actual− Approximate=−12259.095−250.9=−12509.995
Besides, the relative error, εt= 1.020 or 102.047%
d x2
For the second differential equation of solution as below.
dt
x 2=x 2+ f ( x 2 , t 1 ) h
¿−249
¿ 12261.000
Et = Actual− Approximate=12261−(−249)=12510
d x1
First differential equation, =1999 x1 +2999 x 2
dt
Approximate Relative
i ti dx/dt Actual Xi Error, Et
Xi Error
0.0
0 1.000 4998.000 1.000 0.000 0.000
0
0.0
1 250.900 -245201.900 -12259.095 -12509.995 1.020
5
0.1
2 -12009.195 12014608.195 1201461.820 1213471.015 1.010
0
0.1 - - -
3 588721.215 1.007
5 588716072.215 88307409.832 88896131.047
-
0.2 28847087281.3 5769417457.2 5798264539.6
4 28847082.39 1.005
0 96 79 75
6
d x2
Second differential equation, =−2000 x 1−3000 x 2.
dt
Approximat Relative
i ti dx/dt Actual Xi Error, Et
e Xi Error
0.0
0 1.000 -5000.000 1.000 0.000 0.000
0
0.0
1 -249.000 245200.000 12261.000 12510.000 1.020
5
0.2
2 12011.000 -12014610.000 -2402921.000 -2414932.000 1.005
0
0.2 147179018.62 147767738.12
3 -588719.500 588716070.500 1.004
5 5 5
- - -
0.2 28847084.02
4 28847087283.0 5769417455.6 5798264539.6 1.005
0 5
25 05 30
Q15. Derive LU Decomposition for the matrix below and then, determine its matrix inverse.
3 −0.1 −0.2
[
[ A ] = 0.1 7 −0.3
0.3 −0.2 10 ]
Solution:
[ L ][ Y ] =[ X ]
[ U ] [ X ] =[ I ]
3 −0.1 −0.2
[
[ A ] = 0.1 7 −0.3
0.3 −0.2 10 ]
3 −0.1 −0.2
[
¿ 0 7
0.3 −0.2
−0.29
10 ]
3 −0.1 −0.2
[
¿ 0 7 −0.29
0 −0.19 10.02 ]
3 −0.1 −0.2
[
¿ 0
0
7
0
−0.29 =U
10.01 ]
1 0 0
[
¿ 0.03 1 0 =L
0.1 −0.03 1 ]
Inverse matrix:
[
[ A−1 ]= −0.005 0.143 0.004
−0.010 0.003 0.100 ]