0% found this document useful (0 votes)
144 views9 pages

1 Solution of Equations

1. The bisection method is used to numerically find the root of a continuous function f(x) on an interval [a,b] where f(a) and f(b) have opposite signs. It works by repeatedly bisecting the interval and narrowing in on the root. 2. At each iteration, the interval is bisected by finding the midpoint c and checking if f(c) has the same sign as f(a) or f(b). The sub-interval not containing c is carried forward to the next iteration. 3. The process is repeated until the interval width is smaller than a predefined threshold, at which point c is taken as the approximate root of f(x

Uploaded by

Saiful Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views9 pages

1 Solution of Equations

1. The bisection method is used to numerically find the root of a continuous function f(x) on an interval [a,b] where f(a) and f(b) have opposite signs. It works by repeatedly bisecting the interval and narrowing in on the root. 2. At each iteration, the interval is bisected by finding the midpoint c and checking if f(c) has the same sign as f(a) or f(b). The sub-interval not containing c is carried forward to the next iteration. 3. The process is repeated until the interval width is smaller than a predefined threshold, at which point c is taken as the approximate root of f(x

Uploaded by

Saiful Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Solution of Equation 1

Solution of Equations
Bisection Method: The Bisection
Method is applicable for numerically
solving the equation  f (x)=0 for the 
real  variable x , where   f (x) is a 
continuous function defined on an
interval [a , b] and where  f (a) and  f (b)
have opposite signs. In this case, by
the intermediate value theorem, the
continuous function  f (x) must have
at least one root in the interval (a, b).
At each step the method divides the interval [a , b] in two equal subintervals [a , c ] and [c , b ]
a+ b
by computing the midpoint c= 2 of the interval [a , b]. Unless c  is itself a root (which is
very unlikely, but possible) there are now only two possibilities: either  f (a)and  f (c )have
opposite signs and there is a root between a and c , or  f (c ) and  f (b) have opposite signs and
there is a root between c and b . Explicitly, if  f (a) and  f (c ) have opposite signs, then the
method sets c  as the new value for b , and if  f (b) and  f (c ) have opposite signs then the
method sets c  as the new a . (If  f (c )=0 then c  may be taken as the solution and the process
stops.) In both cases, the new  f (a) and  f (b) have opposite signs, so the method is
applicable to this smaller interval. In this way an interval that contains a zero of  f (x) is
reduced in width by 50% at each step. The process is continued until the interval is
sufficiently small, i.e., f (c ) is near to zero.

1 . Find a real root of the equation f (x)= x3 −x−1=0.


Solution : We get
f (1)=13−1−1=−1 (-ve)
f (2)=23−2−1=5 (+ve)
1+ 2
Hence there is a root between 1 & 2 so we take x 0= 2 =1.5
Now, f (x 0)=f (1.5)=1.5 3−1.5−1=0.875 (+ve)
1+ x 0 1+1.5
Hence there is a root between 1 & x 0. So we take x 1= = =1.25
2 2
We find, f (x 1)=f (1.25)=(1.25)3 −1.25−1=−0.296875 (-ve)
x0 + x 1 1.5+1.25
Hence the root lies between x 0 & x 1. So we take x 2= = 2 =1.375
2
We obtain, f (x 2)=f (1.375)=(1.375)3 −1.375−1=0.2246 (+ve)
x1 + x 2 1.25+1.375
Hence the root lies between x 1 & x 2. So we take x 3= = 2
=1.3125
2
3
We obtain, f ( x 3 ) =f ( 1.3125 )= (1.3125 ) −1.3125−1=−0.051(-ve)
Solution of Equation 2
x +x
So we take x 4 = 2 3 =1.34375
2
Now, f (x 4 )=0.0826 (+ve)
x +x
So let x 5= 3 4 =1.328125
2
Now, f( x 5)=0.0145, which is near to zero.
Hence the appropriate root of the given equation is 1.328125.

2 . Use bisection method determine the root of f (x)=e−x −x=0


Solution : we get, f (0)=1−0=1 (+ve)
f (1)=−0.63 (-ve)
0+1
Hence the root lies between 0 & 1 so we take x 0 = 2 = 0.5
Now, f (x 0)=f ( 0.5)=0.1065 (+ve)
1+ x0 1+ .5
Hence the root lies between 1 & x 0. So we take x 1= = 2 =0.75
2
We find, f (x 1)=f (.75)=−0.278 (-ve)
x0 + x 1 .5+.75
Hence the root lies between x 0 & x 1, So we take x 2= = 2 =.625
2
We obtain, f (x 2)=f (.625)=−0.088 (-ve)
x0 + x 2 .5+.625
Hence the root lies between x 0 & x 2. So we take x 3= = 2 =.5625
2
We obtain, f (x 3)=f (.5625)=0.0073 , which is near to zero.
Hence the appropriate root of the given equation is 0.5625.

3 . Perform five interaction of the bisection method to determine the smallest positive real
root of f (x)= x3 −5 x +1=0
Solution : we get f (0)=1 (+ve)
f (1)=−3 (-ve)
0+1
Hence the root lies between 0 & 1, So we take x 0 = 2 = 0.5
Now, f (x 0)=f ( 0.5)=−01.375 (-ve)
0+ x 0 0+.5
Hence the root lies between 0 & x 0, So we take x 1= = 2 =0.25
2
We find, f (x 1)=f (.25)=−0.234 (-ve)
0+ x 1 0+.25
Hence the root lies between0 & x 1. So we take x 2= = 2 =.125
2
We obtain, f (x 2)=f (.125)=0.377 (+ve)
x1 + x 2
Hence the root lies between x 1 & x 2, So we take x 3= = .1875
2
We obtain, f (x 3)=f (.1875)=0.069 (+ve)
x1 + x 3 .25+.1875
Hence the root lies between x 1 & x 3. So we take x 4= = 2
=0.21875
2
Solution of Equation 3
We obtain, f (x 4 )=f (.21875)=−0.08 (-ve)
x3 + x 4
Hence the root lies between x 3 & x 4. So we take x 5= = 0.203125
2
We obtain, f( x 5) = f(.203125) = -0.007, which is near to zero.
Hence the smallest positive real root of the given equation is 0.20325

4. Use bisection method find x 3 of the equation √ x−cosx=0 on [0,1]


Let , f (x)= √ x−cosx
Solution : we get f (0)=−1 (-ve)
f (1)=0.45970 (+ve)
0+1
Hence the root lies between 0 & 1. So we take x 1 = 2 = 0.5
Now, f (x 1)=f (0.5)=−0.17048 (-ve)
1+ x1 1+ .5
Hence the root lies between 1 & x 1. So we take x 2= = 2 =0.75
2
We find, f (x 2)=f (.75)=0.13434 (+ve)
x1 + x 2 .5+.75
Hence the root lies between x 1 & x 2 so we take x 3= = 2 =.625
2
Hence x 3=0. 625

5. Use the bisection algorithm to find an approximation to √ 3.


Solution: Let , x=√ 3
or, x 2=3
or, x 2−3=0
therefore √ 3 is a root of f (x)= x2−3=0
we get, f (2)=22−3=1 (+ve)
1+ 2
So, there is a root between 1 and 2. Hence we take x 1 = 2 = 1.5
Now, f (x 1)=f (1.5)=−0.75(-ve)
2+ x1 2+ 1.5
So we obtain x 2= = 2 = 1.75
2
We find, f (x 2)=f (1.75)=0.0625 (+ve)
1.5+1.75
Hence the root lies between1.5 & 1.75 so we take x 3= 2
=1.625
We obtain, f (x 3)=f (1.625)=−0.3593 (-ve)
x2 + x 3
Hence the root lies between x 2 & x 3. So we take x 4= = 1.6875
2
We obtain, f (x 4 )=f (1.6875)=−0.15234 (-ve)
x2 + x 4 1.75+1.6875
Hence the root lies between x 2 & x 4. So we take x 5= = 2
=1.71875
2
We obtain, f (x 5)=f (1.71875)=−0.045899 (-ve)
x2 + x 5
Hence the root lies between x 2 & x 5 so we take x 6= = 1.734375
2
Solution of Equation 4
We obtain, f (x 6)=f (1.734375)=0.008, which is near to zero.
Hence 1.734375 is a root of x 2-3=0
.’. √ 3=1.734375

Method of False Position: The False Position Method is applicable for numerically
solving the equation  f (x)=0 for the real variable x , where   f (x) is a continuous
function defined on an interval [a , b] and where  f (a) and  f (b) have opposite signs. In this
case, by the intermediate value theorem, the continuous function  f (x) must have at least
one zero in the interval (a, b).

At each step the method repless the


curve f (x) by the straight line joining
the points (a , f (a)) and (b , f (b)). The
equation of this line is
x−a y−f (a)
=
a−b f ( a )−f (b)
. … (1)
If this line intersect the x axis at c (here
y=0), then we get the value of c by
a−b
solving (1) for x with y=0. Therefore c=a− f ( a )−f ( b ) f (a). Unless c  is itself a root (which
is very unlikely, but possible) there are now only two possibilities: either  f (a)and  f (c )have
opposite signs and there is a root between a and c , or  f (c ) and  f (b) have opposite signs and
there is a root between c and b . Explicitly, if  f (a) and  f (c ) have opposite signs, then the
method sets c  as the new value for b , and if  f (b) and  f (c ) have opposite signs then the
method sets c  as the new a . (If  f (c )=0 then c  may be taken as the solution and the process
stops.) In both cases, the new  f (a) and  f (b) have opposite signs, so the method is
applicable to this smaller interval. The process is continued until the interval is sufficiently
small, i.e., f (c ) is near to zero.

1.Find a real root of f (x)= x3 −2 x−5=0 by method of false poaition.


Solution : we have
f (2)=−1 (-ve) [Here x 0=2]
f (3)=16 (+ve) [Here x 1=3]
f ( 2) (−1 ) 1
So, x 2=2− ( 3−2 )=2− =2+ =2.0588
17
f ( 3 )−f ( 2 ) 16−(−1 )
Now, f (x 2)=f (2.0588)=−0.386 (-ve)
and hence the root lies between 2.0588 and 3.
f (2.0588) (.386)
So, x 3= 2 .0588 - (3-2.0588) = 2.0588 + (3-2.0588) = 2.0812
f ( 3 )−f (2.0588) .6+0.386
We find, f (x 3)=f (2.0812)=−0.1479 (-ve)
Hence the root lies between 2.0812 and 3
Solution of Equation 5
f (2.0812) (.1479)
So, x 4= 2 .0812 - ( ) (3-2 .0812) = 2 .0812 + (3-2.0812) = 2.0896
f 3 −f (2 .0812) 16+0.1479
Now, f (x 4 )=f (2.0896)=−0.0551 (-ve)
hence the root lies between 2.0896 and 3
f (2.0896) (.0551)
So, x 5= 2.0896 - (3-2.0896) = 2.0588 + (3-2.0896) = 2.0927
f ( 3 )−f (2.0896) 16+.0551
Hence the root of the given equation is 2.0927.

2. Solve x 3- x 2-1 = 0 by the method of false poaition.


Solution : Let, f (x)= x3 −x2 −1
So, f (1)=−1<0
f (2)=3>0
Hence the root lies between 1and 2.
f (1) 1
So, x 2= 1- (2-1) = 1 + 3+1
×1 = 1.25
f ( 2 )−f (1)
We find, f (x 2)=f (1.25)=−0.60938< 0
Hence the root lies between 1.25 and 2.
f (1.25) 0.60938
So, x 3= 1.25 - (2-1.25) = 1.25 + 3+0.60938
(.75) = 1.3766
f ( 2 )−f (1.25)
Now, f (x 3)=f (1.3766)=−0.28633<0.
Hence the root lies between 1.3766 and 2 .
f (1.3766) 0.28633
So, x 4= 1.3766 - (2-1.3766) = 1.3766 + 3+0.28633 (.6234) = 1.4304
f 2 −f (1.3766)
( )
Now, f (x 4 )=f (1.4304)=−0.11938 <0
Hence the root lies between 1.4304 and 2.
f (1.4304) 0.11938
So, x 5= 1.4304 - (2-1.4304) = 1.4304 + 3+0.11938
(.5696) = 1.4522
f ( 2 )−f (1.4304)
Now, f (x 5)=f (1.4522)=−0.046362<0
hence the root lies between 1.4522 and 2.
f (1.4522) 0.046362
So, x 6= 1.4522 - (2-1.4522) = 1.4522 + 3+0.046362
(.5478) = 1.4595
f ( 2 )−f (1.4522)
Now, f (x 6)=f (1.4595)=−0.0212< 0
hence the root lies between 1.4595 and 2.
f (1.4595) 0.0212
So, x 7= 1.4595 - (2-1.4595) = 1.4595 + 3+0.0212
(.5405) = 1.4633
f ( 2 )−f (1.4595)
Now, f (x 7)=f (1.4633)=−0.00796, which is near to zero.
Hence the root is , x 7=1.4633

Iteration Method :
1. Find a real root of the equation f (x)= x3 + x 2−1=0 by iteration method .
Solution : we get
Solution of Equation 6
f (0)=−1 (-ve)
f (1)=1 (+ve)
So, a root lies between 0 and 1 . Therefore we can take x 0=0.5
To find this root , we put the equation in the form x=φ (x).
So x 3+ x2 −1=0
1
or, x=
√ 1+ x
1 1
So that φ (x) = and φ ' (x) = 3 /2
√1+ x 2(1+ x)
we have |φ ' ( x )| < 1 for x=x 0=0.5
Hence the iteration method can be applied.
We get,
x 1 = φ ( x0 ) =φ (.5)= 0.81649
x 2 = φ (x1 ) =φ (.81649)= .74196
x 3 = φ (x2 ) =φ (.74196) =.75767
x 4 = φ (x3 ) =φ (.75767)= .75427
x 5 = φ (x 4) =φ (.75427)= .75500
x 6 = φ (x5 ) =φ (.75500)= .75485
x 7 = φ ( x6 ) =φ (.75485)= .75488
Hence the approximate value of the root is 0.75488.

2. Find the root of the equation 2 x=cosx +3 correct to three decimal places by using
iteration method .
1
Solution : The given equation can be put in the form, x= 2 (cosx +3)
1
So that φ (x) = 2 (cosx+3)
1
and φ ' (x) =
2
(−sinx)
sinx
we have |φ ' ( x )| = | 2 | < 1
Hence the iteration method can be applied .
Take , x 0=1
We get,
x 1 = φ ( x0 ) =φ (1)=1.7701
x 2 = φ (x1 ) =φ (1.7701)= 1.40098
x 3 = φ (x2 ) =φ (1.40098)=1.5845
x 4 = φ (x3 ) =φ (1.5845)= 1.4931
x 5 = φ (x 4) =φ (1.4931)= 1.5388
x 6 = φ (x5 ) =φ (1.5388)= 1.5160
x 7 = φ ( x6 ) =φ (1.5160)= 1.5274
x 8 = φ ( x7 ) =φ (1.5274)= 1.5217
Solution of Equation 7
x 9 = φ (x8 ) =φ (1.5217)= 1.5245
x 10 = φ (x 9) =φ (1.5245)= 1.5231
Hence the approximate value of the root is 1.5231.

3. Find a real root of sinx=10 (x−1) correct to four significant figures by using iteration
method.
Solution : The equation can be written in the form ,
10 x−10=sinx
or, 10 x=10+ sinx
1
or, x= 10 sinx+1
1
So that, φ (x) = 10 sinx+1
−cosx
And φ ' (x) = 10
we have |φ ' ( x )| < 1
Hence the iteration method can be applied .
We get, x n = φ (x n−1 )
Choose , x 0=1
x 1 = φ ( x0 ) =φ (1)= 1.0841
x 2 = φ (x1 ) =φ (1.0841)= 1.08834
x 3 = φ (x2 ) =φ (1.08834)= 1.08859
x 4 = φ (x3 ) =φ (1.08859)= 1.08860
x 5 = φ (x 4) =φ (1.08860)= 1.08860
Hence the approximate value of the root is 1.089.

4. Use the iteration method to find a real root of the following equations.
(a) cosx=3 x−1 (e) e− x =10 x
(b) x = ¿1¿ (f) x=cosecx
1
(c) x=(5−x ) 3 (g) sin2 x= x 2-1
(d) sinx=10 (x−1) (h) e x =cotx

Newton-Raphson Method:
Let x 0 be an approximate root of f (x)=0 and let x 1=x 0+ h be the correct root so that
f (x 1)=0 that is, f (x 0+ h)=0
Now expending f (x 0+ h) by Taylor’s series , we obtain,
' h2 ' '
f (x 0)+h f ( x0 )+ f ( x 0)+… … … …=0
2!
Neglecting the second and higher order derivatives, we have
f (x 0)+h f ' ( x0 )=0
Solution of Equation 8
−f ( x 0 )
or, h= '
f ( x0 )
A better approximation than x 0 is therefore given by x 1 when ,
f ( x0 )
x 1=x 0− '
f ( x0 )
Successive approximations are giveb by x 2, x 3, . … … … … x n+1
f (x n)
Where , x n+1= x n - - '
f (x n)
Which is Newton – Raphson formula.

1. The equation x 3+ 2 x 2−5 x−1=0 has a root near to 1.4 . Use the Newton-Raphson
method to find the root to four significant figures.
Solution : we have ,
f (x)= x3 +2 x 2−5 x−1
therefore f ' (x )=3 x 2+ 4 x−5
Given that , x 0=1.4
Now , f (x 0)=−1.336
f ' (x 0 )=1.6162
f (x 0) −1.336
∴ x1= x 0 - ' = 1.4 - 6.48 =1.6062
f (x 0)
Now, f (x1 )=.2723
f '( x 1)=9.1641
f (x 1) .2723
∴ x2= x 1 - ' = 1.6062 - 9.1641 =1.5765
f ( x 1)
Now, f (x 2)=.0059
f '( x 2)=8.7615
f (x 2) .0059
∴ x3 = x 2 - ' = 1.5765 - 8.7615 =1.5757
f (x 2)
Now, f (x 3)=.000003 which is near to zero .
Hence the approximate value of the root is 1.5757

2. Use Newton’s method to find a root of the equation x 3−3 x−5=0


Solution : we have , f (x)= x3 −3 x −5=0
f (2)=23−3.2−5=−3
f (3)=33−3.3−5=13
So, there is a root between 2 & 3.
∴We choose x 0=2
Now, f '(x)=3 x 2-3
∴ f (x 0)=f (2)=−3
f '( x 0)= f '(2)=9
Solution of Equation 9
f (x 0) −3
∴ x1= x 0 - ' = 2 - 9 =2.3333
f (x 0)
Now,
f (x 1)=0.7037
f '( x 1 ¿=13.333
f (x 1) −.7037
∴ x2= x 1 - ' = 2.3333 - 13.333 =2.2805
f ( x 1)
Now,
f (x 2)=f (2.2805)=0.01935
f '( x 2)= f '(2.2805)=12.6028
f (x 2) 0.01935
∴ x3 = x 2 - ' = 2.2805 - 12.6028 =2.2790
f (x 2)
Now, f (x 3)=f (2.2790)=0.000016Which is near to zero.
Hence the approximate value of the root is 2.2790.

2. Find a root of the equation xsinx+ cosx=0


Solution : we have , f (x)= xsinx+cosx
f ' (x )=xcosx
Choose , x 0= π =3.1416
∴ f (x 0)=−1
f '( x 0)= -3.1416
f (x 0) −1
∴ x1= x 0 - ' = 3.1416 - −3.1416 =2.8233
f (x 0)
Now,
f (x 1)=−0.06618
f '( x 1)= -2.6816
f (x 1) −.06618
∴ x2= x 1 - ' = 2.8233 - −2.6816 =2.7985
f ( x 1)
Now, f (x 2)=−0.00056 Which is near to zero.
Hence the approximate value of the root is 2.7985.
4. x 3−2 x−5=0
5. x 5+ 5 x +1=0
6. x 3−5 x+ 3=0
7. sinx=1−x
8. tanx=4 x .

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy