You are on page 1of 4

BC080401773

MTH603 - Numerical Analysis


Question #1: Find the root of the equation x^3+x^2+x-1 =0 correct to
two decimal places by using bisection method.

Solution:

f  x   x3  x 2  x  1
By putting the value of x = 0

f ( x0 )  f  0   0  0  0  1  1  0
By putting the value of x = 1

f ( x1 )  f  1  13  12  1  1  2  0

We know that f ( x0 ) f ( x1 )  0

So the 1st approximation should be:

x0  x1 0  1
x2    0.5
2 2

By solving we have
f ( x2 )  f  (0.5)   (0.5)3     (0.5) 2     (0.5)  1   0.125  0

Now, f ( x ) f ( x )  0
2 1

So the 2nd approximation should be:

x2  x1 0.5  1
x3    0.75
2 2

Again, by solving we have

f ( x4 )  f  (0.625)   (0.625)3    (0.625) 2     (0.625)  1   0.2598   0

Now, f ( x ) f ( x )  0
4 2
The 3rd approximation should be:

x3  x2 0.75  0.5
x4    0.625
2 2

f ( x4 )  f  (0.625)   (0.625)3     (0.625) 2     (0.625)  1  0.2598  0

Now,
f ( x4 ) f ( x 2 )  0

4th Approximation

x4  x2 0.625  0.5
x5    0.5625
2 2

f ( x5)  f  (0.5625)   (0.5625)3    (0.5625)2    (0.5625) 1    0.05698   0

f ( x5 ) f ( x2 )  0

5th Approximation

x5  x2 0.5625  0.5
x6    0.53125
2 2
f ( x6 )  f (0.53125)   (0.53125)3     (0.53125) 2     (0.53125) 1    0.0366   0
f ( x6 ) f ( x5 )  0

6th Approximation:

x6  x5 0.53125  0.5625
x7    0.5469
2 2
f ( x7 )  f (0.5469)   (0.5469)3     (0.5469) 2     (0.5469) 1   0.0096   0
f ( x7 ) f ( x6 )  0

7th Approximation:

x7  x6 0.53125  0.5469
x8    0.5391
2 2
f ( x8 )  f (0.5391)   (0.5391)3     (0.5391) 2     (0.5391) 1   0.0136   0
f ( x8 ) f ( x7 )  0
8th Approximation:

x8  x7 0.5391  0.5469
x9    0.543
2 2
f ( x9 )  f (0.543)   (0.543)3     (0.543) 2     (0.543) 1    0.002   0
f ( x9 ) f ( x7 )  0

9th Approximation:

x9  x7 0.543  0.5469
x10    0.545
2 2
f ( x10 )  f (0.545)   (0.545)3     (0.545) 2     (0.545) 1   0.0039    0
f ( x10 ) f ( x9 )  0

10th Approximation:

x10  x9 0.545  0.543


x11    0.544
2 2
f ( x11 )  f (0.544)   (0.544)3     (0.544) 2     (0.544) 1   0.0009   0
f ( x11 ) f ( x10 )  0

Question #2: Solve the system of linear equations with the help of
Gaussian elimination method.
2x + y + z = 9;3x −2y + 4z = 9;x +y-2z = 3

2 x   y   z  9
3x  2 y  4 z  9
x     y  2 z  3

The augmented matrix is

 2 1 1  9 
  
R  3 2 4  9 
  
 1 1 2  3 
 1 1 2  3 
  
R  0 1 5  3  (1) R2
  
 0 5 10  0 

After solving the above further, we ca write:

x   y   2 z   3.................(1)
y   5 z   3................(2)
z 1 ..................(3)

From the 1st equation we’ll put values:

x   (2)  2(1)   3

x3

From the 2nd equation we’ll put values:

y   5(1)   3
y  3  5

y2

x  3, y  2, z  1

You might also like