Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 6

NAME: RODVER A.

BALIBALOS
BSEE 5A
INSTRUCTOR: ENGR. FERDINAND PEDRAJAS

EMATH 123- NUMERICAL METHODS MIDTERM EXAMINATION

1. Determine the lowest positive root of f(x) = 7sin(x)e^-x-1


a. Using the Newton-Raphson method (Xi=0.3)
b. Using the modified Secant method (Xi=0.5, δ=0.03)
Stopping criterion (Єs= 0.01%)

Solution:
a.) f(x) = 7sin(x)e^x-1
f'(x) = 7e^-x [cos(x)-sin(x)]
Xi= 0.3 xi=(f(xi)/f'(xi))
(Єs= 0.01%)

ITERATION Xi f(x)
0 0.3000
1 0.1444 0.5325
2 0.1694 -0.1283
3 0.1702 -0.0037
4 0.1702 0.0000
5 0.1702 0.0000

b.) f(x) = 7sin(x)e^x-1


f'(x) = 7e^-x [cos(x)-sin(x)]
δ= 0.03
Xi= 0.5
Єs= 0.01
xi= xo-(δXo*f(Xo)/f(Xo+δXo)-f(

ITERATION Xi f(X)
0 0.5000 1.0355
1 0.1724 0.0106
2 0.1658 -0.0213
3 0.1660 -0.0201
4 0.1660 -0.0201
5 0.1660 -0.0201
2. Determine the real roots of f(x)=-26+82.3x-88x²+45.4x³-9x⁴+0.65x⁵
Use Bisection Method to determine the highest root to Єs=10%. Employ
initial guesses of Xi 0.5 and Xu =1.0

SOLUTION:
xl = 0.5
xu = 1.0
Es = 10%

ITERATION Xl Xu Xr
1 0.5000 1.0 0.7500
2 0.5000 0.8 0.6250
3 0.5000 0.6 0.5625
4 0.5625 0.6 0.5938

3. Determine the real root of x^33 = 79: With false-position method to within Єs=0.1%.
Use initial guesses of 3.0 and 4.0.

SOLUTION:

f(x)= x^33-79
Guess: xi = 3
xu = 4
Es = 0.10%

ITERATION Xl Xu Xr
1 3.0000 4.0 4.0000
2 4.0000 4.0 4.0000
3 0.0010 4.0 2.8420
4 0.0000 4.0 2.8417

4. Determine the roots of the simultaneous nonlinear equations


f1(x): (x-4)²+ (y-4)²= 4
f2(x): x²+y²+ 16
Use modified Newton-Raphson method to within Єs= 0.01%.
Set your own guesses

Xo= 1.7
Yo= 3.5
u(x,y) = (x-4)² + (y-4)² -4
v(x,y) = x² + y² - 16
Getting the Partial Derivatives
ƌu/ƌx (x,y) = 2(x-4)
ƌu/ƌy (x,y) = 2(y-4)
ƌv/ƌx (x,y) = 2x
ƌv/ƌy (x,y) = 2y

ITERATION Xi Yi f1(x) f2(X)


0 1.7 3.5 1.5 -0.8600
1 2.0444444444 3.2631 0.4 -1.1727
2 2.0787298014 3.3754 0.1 -0.2858
3 2.0880229618 3.4018 0.0 -0.0679
4 2.0885266748 3.4098 0.0 -0.0114
5 2.0885611382 3.4112 0.0 -0.0018
6 2.0885621468 3.4114 0.0 -0.0003
MINATION

f'(x) Ea (%)
0
3.4 107.7907
5.1 14.7764
4.8 0.4529
4.8 0.0004
4.8 3.6551E-10

o-(δXo*f(Xo)/f(Xo+δXo)-f(Xo))

f(x+δ) Ea (%)
1.0829
0.1493 190.0365
0.1196 3.9872
0.1207 0.1510
0.1207 0.00000
0.1207 0.0000
TRUE VALUE (f(x) = 0) 0.578332

Ea (%) Et (%) f(Xl) f(Xu) f(Xr)


100 29.68338579 -1.71719 5.4 2.7
20 8.069488162 -1.71719 2.7 0.8
2.737460654 -1.71719 0.8 -0.3
5.2632 2.6660 -0.33419 0.8 0.3

3-79

Ea (%) f(Xl) f(Xu) f(Xr)


100 -7.3787E+19 -32.2 -7E+19
0 -7.3787E+19 -32.2 -32.2
40.74515 00079 -32.2 -33.0
0.0102 00079 -32.2 -33.0

(y-4)²= 4
²+y²+ 16

x,y) = (x-4)² + (y-4)² -4


6
ƌu/ƌx (x,y) = 2(x-4)
ƌu/ƌy (x,y) = 2(y-4)
ƌv/ƌx (x,y) = 2x
ƌv/ƌy (x,y) = 2y

ƌu/ƌx ƌu/ƌy ƌv/ƌx ƌv/ƌy Eax (%) Eay (%)


-4.6 -1 3.4 7 0 0
-3.911111 -1.473888889 4.088889 6.526111 16.847826087 7.261428
-3.84254 -1.249280764 4.15746 6.750719 1.649341678 3.327173
-3.823954 -1.196409619 4.176046 6.80359 0.4450698341 0.777107
-3.822947 -1.180429647 4.177053 6.81957 0.0241181018 0.234325
-3.822878 -1.177643229 4.177122 6.822357 0.0016501035 0.040842
-3.822876 -1.1772 4.1771 6.822798 4.8292E-05 0.0065

You might also like