Assignment No1 mth603

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Assignment No.

1
MTH603
BC190401291

Question 01:

Use Newton Raphson method to find the root of

f(x)-x-2x+2 with x=0.21

(Perform only three iterations)

Solution:

X3-2x+2=0

Let

f(x)=x3-2x+2

d/dx(x3-2x+2)=3x2-2

f,(x)=3x2-2

x0=0.2

1rst iteration

f(x0)=f(0.2)=(0.2)3-2(0.2)+2=1.608

f,(x0)=f,(x0)=3(0.2)2-2=1.88

x1=x0-f(x0)/f,(x0)

x1=0.2-1.608/(-1.88)=1.0553

2 Iteration:

ƒ(x1)=ƒ(1.0553) = (1.0553)3 -2(1.0553)+2=1.0647

f'(x)=ƒ'(1.0553)=3(1.0553)2-2=1.3411

x2 = x1-f(x1)/ ƒ'(x1)

x2=1.0553-1.0647/1.3411

x2=0.2614
3rd Iteration:

ƒ(x) = ƒ (0.2614)=(0.2614)3 -2(0.2614)+2=1.495

f'(x2)=ƒ(0.2614)=3(0.2614)2—2=-1.7949

X3 = X2 - f'(x2)/f(x2)

X3=0.2614-1.495/(-1.7949)

X3=1.0943

Question # 02:

Solve the system of equation by Jacobi method starting with (0.0.0)

10x+y+z = 24

-x+20y+z=21

-x-2y+100z = 300

10x+y+z= 24 -x+20y+z=21

-x-2y+100z = 300

From the above equations:

Xk+1 =1/10(24-yk+zk)

Yk+1=1/20(21+xk-zk)

Zk+1=1/100(300+xk+2yk)

Initial gauss (x, y, z) = (0,0,0)

1st iteration:

X11/10[24-0-0]=1/10[24]=2.4

Y1=1/20[21+0-0]=1/20[21]=1.05

Z1=1/100[300+0=2(0)]=1/100[300]=3

2nd iteration:

X2=1/10[21-(1.05)-(3)]=1/20[20.4]=1.02
Z2=1/100[300+(2.4)+2(1.05)]=1/100[304.5]=3.045

10 (24 — yx − = x)

21 (21+x − ̄)

xx+1 =

Y2+1=

=2+1 =

·(300+x+2y1⁄2)

100

20

Initial gauss (x, y, z) = (0,0,0)

1st iteration:

s=[24-0-0]=[24]=2.4

3=

=1

- 2 [21+0—0] = 2 [21]=1.05

20

100

[300+0+2(0)]=100 [300]=3

You might also like