100% found this document useful (1 vote)
248 views

Worked Out Examples and Exercises With Solutions Chapter 17 PDF

The document provides examples of using the bisection method and Regula-Falsi method to find real roots of equations. It gives step-by-step workings for 7 examples finding roots of equations by estimating intervals containing the root and iteratively converging on the root. The examples demonstrate how to apply the numerical methods to a variety of polynomial and transcendental equations.

Uploaded by

Andre Gromhycho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
248 views

Worked Out Examples and Exercises With Solutions Chapter 17 PDF

The document provides examples of using the bisection method and Regula-Falsi method to find real roots of equations. It gives step-by-step workings for 7 examples finding roots of equations by estimating intervals containing the root and iteratively converging on the root. The examples demonstrate how to apply the numerical methods to a variety of polynomial and transcendental equations.

Uploaded by

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

Chap-17 B.V.

Ramana August 30, 2007 10:15

Chapter 17
Numerical Analysis

x: 0 1 2
WORKED OUT EXAMPLES f (x) = x 3 5x + 3: 3 1 1
Thus, a root lies between 0 and 1 and another root
lies between 1 and 2.
Bisection Method Choose x0 = 1 and x1 = 2. Then x2 = x0 +x 2
1
=
Example 1: Find a real root of the equation x 3
1+2
2
= 1.5, f (1.5) = 1.125 < 0.
6x 4 = 0 by bisection method. So root lies in between 1.5 and 2. So x3 = x2 +x
2
1
=
[JNTU 2006, Set No. 1] 1.5+2
2
= 1.75, f (1.75) = 0.3906 < 0.
So root lies between 1.75 and 2. Then x4 = 1.75+2
2
=
Solution: 1.875, f (1.875) = 0.2167 > 0.
x: 0 1 2 3
So root lies between 1.75 and 1.875. So the approx-
f (x) = x 3 6x 4: 4 9 8 5
imate root of the given equation is x5 = 1.75+1.875 =
... one root lies between 2 and 3. Take x0 = 2, 2
1.8125.
x1 = 3. By bisection method, the next approxima-
tion is x2 = x0 +x
2
1
= 2+32
= 2.5. Now at x2 = 2.5, Example 3: Find a real root of the Equation x 3
f (2.5) = 3.375 < 0. Thus, a root lies between 2.5 x 11 = 0 by bisection method.
and 3. So the next approximation is x3 = 2.5+3 2
= [JNTU 2007, Set No. 2]
5.5
2
= 2.75. At x 3 = 2.75, f (2.75) = 0.2968 > 0.
Thus a root lies between 2.5 and 2.75. Next approx- Solution:
imation is x4 = 2.5+2.75 = 2.625. x: 0 1 2 3
2
Now f (2.625) = 1.6621 < 0. The root lies be- f (x) = x 3 x 11: 11 11 5 13
tween 2.625 and 2.75. Then x5 = 2.625+2.75 2
= A root lies between 2 and 3. Then the rst approxi-
2.6875 and f (2.6875) = 0.7141 < 0. So root lies mation is x2 = x0 +x
2
1
= 2+3
2
= 2.5. Now f (2.5) =
between 2.6875 and 2.75. The approximate value of 2.125 > 0. So root lies between 2 and 2.5. So
the real root of the given equation is 2.6875+2.75
2
= the next approximation is x3 = 2+2.5 = 2.25. Now
2
2.71875. f (2.25) = 1.859 < 0. So next approximation is
x4 = 2.25+2.5 = 2.375. Now f (2.375) = 0.0215 >
Example 2: Find a real root of x 3 5x + 3 = 0 2
0 and f (2.25) < 0.
using bisection method.
[JNTU 2006, Set No. 2] ... Root lies between 2.25 and 2.375. So x = 5
2.25+2.375
2
= 2.3125. Now f (2.3125) = 0.946 < 0
Solution: and f (2.375) > 0.

17.1
Chap-17 B.V.Ramana August 30, 2007 10:15

17.2 MATHEMATICAL METHODS

So root lies between 2.3125 and 2.375. x6 = (2 1)


=1 [0.2817]
2.3125+2.375
2
= 2.34375, f (x6 ) = 0.4691 < 0. Root [11.778 (0.2817)]
lies in (2.34375, 2.375). So x2 = 1.329
X7 = 2.34375+2.375
2
= 2.359375.
Since f (x7 ) = 0.225 < 0, root lies between Now f (x2 ) = f (1.329) = 2.0199 > 0 and f (1) =
2.359375 and 2.375. So x8 = 2.359375+2.3752
= 0.2817 < 0 so root lies in between 1 and 1.329.
2.3671875. Take x0 = 1, x2 = 1.329.
f (x8 ) = 0.10247 < 0, root lies between (x2 x0 )
Then x3 = x0 f (x0 )
2.3671875 and 2.375. Then [f (x2 )f (x0 )]

2.3671875 + 2.375 =1 (1.3291)


[2.0199(0.2817)]
[0.2817]
x7 = = 2.37109.
2 x3 = 1.04
Approximate root is 2.37109. Now f (x3 ) = f (1.04) = 0.05 < 0.
Since f (x2 ) = 2.0199 > 0, root lies between 1.04
Example 4: Using bisection method, nd a root of and 1.329. Then
the Equation x 3 4x 9 = 0
(x3 x2 )
x4 = x2 f (x2 )
Solution: [f (x3 ) f (x2 )]
x: 0 1 2 3 (1.04 1.329)
f (x) = x 3 4x 9: 9 12 9 6 = 1.329 [2.0199]
[0.05 (2.0199)]
A root lies between 2 and 3. First approximation is
x4 = 1.08 is the required approximate root.
x0 + x 1 2+3
x2 = = = 2.5.
2 2
Example 7: Find a real root of ex sin x = 1 using
Since f (2.5) = 3.375 < 0, root lies between 2.5 RegulaFalsi method.
and 3. The second approximation is x3 = 21 (2.5 + [JNTU 2006, Supply, Set No. 1, Code No.
3) = 2.75. Since f (2.75) = 0.7969 > 0, root lies R059010202]
between 2.5 and 2.75. So third approximation is x4 =
2.5+2.75
2
= 2.625. Since f (2.625) = 1.4121 < 0,
Solution:
root lies between 2.5 and 2.625. Thus, the fourth x: 0 1
approximation to the root is x5 = 21 (2.5 + 2.625) = ex sin x 1 = f (x): 1 1.2874
root lies in
2.6875. (0, 1).
By bisection method: f (0.5) = 0.2094, root lies in
Example 5: Find a real root of xex = 2 using
(0.5, 1).
Regulafalsi method. [JNTU 2007, Set 4]
By bisection method: f (0.75) = 0.443 root lies in
Example 6: Find a real root of xex = 3 using (0.5, 0.75).
Regulafalsi method. [JNTU 2006, Set 4] Since f (0.5) < 0, choose b = 0.75. Then by
RegulaFalsi method
Solution:
x: 0 1 2 f (x0 )
x
x1 = x0 (b x0 )
f (x) = xe 3: 3 0.2817 11.778 f (b) f (x0 )
(0.20941)
... 1, = 0.5 (0.75 0.5)
... root lies in (1, 2). Take x0 = 1, x1 = 2. (0.443 + 0.20941)
Then x1 = 0.5 + 0.160 = 0.6605
(x1 x0 )
x2 = x0 f (x0 ) Now f (x1 ) = f (0.6605) = 0.1876 > 0 root lies in
(f (x1 ) f (x0 ))
Chap-17 B.V.Ramana August 30, 2007 10:15

NUMERICAL ANALYSIS 17.3

(0.5, 0.6605). starting from an initial guess x0 , better successive ap-


Since f (a) = f (0.5) < 0; we have b = 0.6605 proximations x1 , x2 , x3 , . . . of an unknown solution
0.2094
of (1) are computed step by step.
x2 = 0.5 (0.1876+0.2094)
(0.6605 0.5) Generally, iterative methods are easy to program.
x2 = 0.5 + 0.08465 = 0.58466 The bisection method and RegulaFalsi method are
At x2 , f (x2 ) = 0.009653. two such iterative methods which are known as in-
So x2 = 0.58466 is an approximate root of the given terpolation methods or bracketing methods because
transcendental equation. the root (guess) is bracketed between two estimates
(one for f (x) > 0 and one for f (x) < 0). The other
Example 8: Using RegulaFalsi method, nd an kind of iterative methods such as xed point itera-
approximate real root of the transcendental Equation tion method, Newton-Raphson method, its vari-
x log10 x = 1.2. ant secant method are known as extrapolation
methods or open-end methods in which a single value
Solution: (initial estimate) is chosen.
x: 1 2 3
f (x) = x log10 x 1.2: 1.2 0.59794 0.23136
... a root lies between 2 and 3. Fixed-point iteration method
Take x0 = 2, x1 = 3. Then approximate root Rewriting the Equation (1) in the form
x1 x0
x2 = x0 f (x0 )
f (x1 ) f (x0 ) x = g(x) (2)
(3 2)
=2 [0.59794] observe that the roots (or solutions) of (1) are same as
[0.23136 + 0.59794]
the points of intersection of the straight line y = x
x2 = 2.72102
and the curve representing y = g(x), as shown in
Now f (x2 ) = f (2.72102) = 0.0179, so root lies the gure. The exact solution (root) is which is the
between 2.72102 and 3. Then intersection of y = x and y = g(x).
x1 x2
x3 = x2 f (x2 )
f (x1 ) f (x2 )
(3 2.72102)
= 2.72102 (0.0179)
[0.23136 + 0.0179]
x3 = 2.74021

Similarly, we get x4 = 2.74024, x5 = 2.74063. Note


at x5 ,
f (x5 ) = 0.0000140385
... An approximate root is x5 = 2.74063.
Fig. 17.1

Iteration Methods Starting with an initial estimate x0 , compute the


rst approximation x1 given by
In general, there is no formula for the exact solution
of
x1 = g(x0 )
f (x) = 0 (1)
Now, treating x1 as the initial value, compute the
which may be an algebraic equation or transcen- second approximation x2 as
dental equation. In such cases the iterative method,
which is an approximation method, is used in which x2 = g(x1 )
Chap-17 B.V.Ramana August 30, 2007 10:15

17.4 MATHEMATICAL METHODS

In general the n + 1th approximation is Rewriting the given equation as

xn+1 = g(xn ) for n = 0, 1, 2, . . . 1


x= (cos x + 1) = g(x).
3
The name of the method is motivated, since a solution
Observe that
of (2) is called a xed point of g.
|g  (x)| = 13 | sin x| < 1 in 0, 2 .
This method converges in an interval (a, b) if
Starting with x0 = 0, the xed point iteration meth-
|g  (x)| k < 1 ods yields the following successive approximations.
1
Example 9: Find a real root of the Equation 2x x1 = g(x0 ) = (cos 0 + 1) = 0.6667,
3
log10 x = 7 by successive approximation method.
1
[JNTU 2006, Set No. 3] x2 = g(x1 ) = (cos(.6667) + 1) = 0.5953,
3
Solution: 1
x: 1 2 3 4 x3 = g(x2 ) = (cos(.5953) + 1) = 0.6093,
3
f (x) = 2x log x 7: 5 3.301 1.4471 0.398 1
... A root lies between 3 and 4. x4 = g(x3 ) = (cos(.6093) + 1) = 0.6067,
3
Rewrite the given equation as 1
x5 = g(x4 ) = (cos(.6067) + 1) = 0.6072,
1 3
x = [log10 x + 7] = g(x)
2 1
x6 = g(x5 ) = (cos(.6072) + 1) = 0.6071.
3
Now |g  (x)| = | 21 x1 log10 e| < 1 when 3 < x < 4. Thus the approximate root is 0.6071 since x5 and x6

when x = 3, |g (3)| = | log10 e| = 0.07238
2
1 1
3
are nearly equal.
when x = 4, |g  (4)| = | 21 41 (0.4343)| = 0.0542
Example 11: Find the negative root of the equa-
Since |f (4)| = 0.398 < 1.4471 = |f (3)|, The root
tion x 3 2x + 5 = 0.
is near to 4. Now taking the initial guess as x0 = 3.6,
we apply the xed point iteration method yielding Solution: If , , are the roots of
the successive approximations as
x 3 + 0 x 2 2x + 5 = 0 (1)
1
x1 = g(x0 ) = (log10 (3.6) + 7) = 3.77815, Then the equation whose roots are , , is
2
x 3 + (1) 0 x 2 + (1)2 (2x) + (1)3 5 = 0
1
x2 = g(x1 ) = (log10 (3.77815) + 7) = 3.78863, or x 3 2x 5 = 0 (2)
2 To nd the positive root of (2), we have
1 f (x) = x 3 2x 5, f (2) = 1 < 0, f (3) = 16 >
x3 = g(x2 ) = (log10 (3.78863) + 7) = 3.78924,
2 0. So root lies between 2 and 3 and it is nearer to 2
1 (since |f (2)| = 1 < 16 = |f (3)|).
x4 = g(x3 ) = (log10 (3.78924) + 7) = 3.78927. Rewriting the Equation (2) we get
2
1
Thus the approximate root is 3.7892. x = (2x + 5) 3 = g(x)
2
Example 10: Using iteration method, nd a real Then |g  (x)| = | 13 (2x + 5) 3 2| < 1 in (2, 3).
root of the Equation cos x = 3x 1. Choosing x0 = 2.1, we apply the xed point itera-
tion method. Then
1
Solution: Here, f (x)
 = cos x 3x + 1, and x1 = g(x0 ) = [2(2.1) + 5] 3 = 2.09538,
f (0) = 2 > 0 and f 2 = 32
+ 1 = 3.71 < 0 1
x2 = g(x1 ) = [2(2.09538) + 5] 3 = 2.09468,
1
.
. . A root lies between 0 and . x3 = g(x2 ) = [2(2.09468) + 5] 3 = 2.09457,
2
Chap-17 B.V.Ramana August 30, 2007 10:15

NUMERICAL ANALYSIS 17.5

x4 = g(x3 ) = 2.09455, x5 = g(x4 ) = 2.09455 Since f (1) = 2.178 and f  (1) = 6.2780 are of the
Hence the approximate root of (2) is 2.09455; so the same sign, we choose x0 as 1. Then for n = 0,
negative root of the given Equation (1) is 2.09455. we have x1 = x0 ff(x(x0 )) or x1 = 1 2.178
6.278
= 0.653,
0
f (x1 ) = 0.46, and f  (x1 ) = 3.7835. Then for n = 1,
Example 12: Find a solution of x 3 + x 1 = 0 by we get x2 = x1 ff(x(x1 )) = 0.653 3.7835
0.46
= 0.5314.
iteration. 1
Now f (x2 ) = 0.042, f  (x2 ) = 3.11213. For n = 2,
Solution: we get x3 = x2 ff(x(x2 )) or x3 = 0.5314 3.11213
0.042
=
2
x: 0 1 
0.518. Then f (x3 ) = 0.000738, f (x3 ) = 3.0433.
f (x) = x 3 + x 1: 1 1 So for n = 3, x4 = x3 ff(x(x3 )) = 0.518 0.000738
3.0433
=
... A root lies in (0, 1).
3
0.5177. Since f (0.5177) = 0.000174, we take
Rewriting the given equation, x4 = 0.5177 as an approximate root.
1
x= = g(x) Example 14: Find a real root of x + log10 x 2 =
1 + x2 0 using NewtonRaphson method.
so that [JNTU 2007, Set No. 3]
1
xn+1 = . Solution: Here, f (x) = x + log10 x 2, f  (x) =
1 + xn2
1 + x1 log e10 = 1 + 2.3026
x
.
Also |g  (x)| = (1+x 2 )2 < 1 for any x.
2|x| Since f (1) = 1 < 0 and f (2) = 0.3010 > 0, a
Choosing x0 = 1, we obtain root lies between 1 and 2. Again at 1.5, we have
f (1.5) = 0.324, root lies between 1.5 and 2.
1 1 Choose x0 = 1.8. Then for n = 0, we have the rst
x1 = = = 0.5
1 + 12 2 approximation as, x1 = x0 ff(x(x0 )) = 1.8 2.2792
0.0553
,
0

x2 =
1
= 0.800, x1 = 1.7757. Then x2 = x1 ff(x(x1 )) = 1.7757
1 + (0.5)2 0
0.0251
2.2967
= 1.7648.
1
x3 = = 0.610, Now x3 = x2 ff(x(x2 )) = 1.7648 0.0015
2.3047
= 1.7598,
1 + (0.8)2 2
Again x4 = x3 ff(x(x3 )) = 1.7598 2.3084
0.0053
= 1.7575
x4 = 0.729, x5 = 0.653, x6 = 0.701 3
f (x4 ) = f (1.7575) = 0.002395, we may take x4 =
Approximate root is 0.701. 1.7575 as an approximate root.

NewtonRaphson Method Example 15: Find a real root of x tan x + 1 = 0


using NewtonRaphson method.
Example 13: Find a real root of xex cos x = 0 [JNTU 2006, Aug. Supply. Set 2]
using NewtonRaphson method.
[JNTU 2007, Set No. 1], Solution: Rewriting x sin x + cos x = 0, so
[JNTU 2006, Supply, Set No. 4, (R059010202)] f (x) = x sin x + cos x, f  (x) = x cos x. Then NR
iteration formula is
Solution: f (0) = 1 < 0, f (1) = 2.178 > 0 xn sin xn + cos xn
Here, f (x) = xex cos x. Root lies between 0 and xn+1 = xn
xn cos xn
1. Also f  (x) = xex + ex + sin x
By NewtonRaphson method: with x0 = , the successive iterations are:
n xn f (xn ) xn+1
f (xn ) 0 3.1416 1.0 2.8233
xn+1 = xn
f  (xn ) 1 2.8233 0.0662 2.7986
xn
(xn e cos xn ) 2 2.7986 0.0006 2.7984
xn+1 = xn
(xn exn + exn + sin xn ) 3 2.7984 0.0 2.7984
Chap-17 B.V.Ramana August 30, 2007 10:15

17.6 MATHEMATICAL METHODS

... Approximate (exact) root is 2.7984 Solution: Here, h = 5 , x = 52 , x0 = 45 , y0 =



0.7077, q = x45
2
= 5245
5
= 75
Example 16: Find f (2.5) using newtons forward Finite difference table
formula from the following table.
x: 0 1 2 3 4 5 6 x y = sin x Dy D2y D3y
y: 0 1 16 81 256 625 1296 x0 y0
Dy0
45 0.7077 D2y0
[JNTU: 2006, Set No. 1] 0.0583 D3y0
50 0.766 0.0051
0.0532 0.0013
Solution: Here, h = 1, x0 , y0 = 0, x = 2.5, q = 55 0.8192 0.0064
xx0 0.0468
h
= 2.50
1
... q = 2.5. 60 0.866
Finite difference table
x y Dy D 2y D3y D 4y D5y D6y Using Newtons forward differences formula
y(52 ) = 0.7077 + 75 (0.0583)
0 0   
1 + 75 75 1 0.0051)
1 1 14 7 7  7 
36
+ 5 5 1 5 2 (0.0013) = 0.7869008
2 16 15
50 24
3 81 65 60 0 Example 18: Find y(1.6) using Newtons forward
4 256 110 24 0 differences formula from the table
175 84 0
5 625 194 24
369 108
x 1 1.4 1.8 2.2
6 1296 302 y 3.49 4.82 5.96 6.5
671
[JNTU 2006, Set No. 3]
Here y0 = 1, 2 y0 = 14, 3 y0 = 36, 4 y0 = 24,
5 y0 = 0, 6 y0 = 0. Solution: Here, h = 0.4, x = 1.6, x0 = 1, y0 =
Using Newtons forward formula y = y0 + qy0 + 3.49, q = xx
h
0
= 1.61
0.4
.6
= .4 = 23
q(q1) 2
2!
 y0
x y Dy D2y D3y
+ q(q1)(q2)
3!
 3 y0 1 3.49 = y0
Dy0
+ q(q1)(q2)(q3)  4 y0 + 0 + 0. 1.4 4.82 D2y0
4! 1.33 D3y0
Substituting the values, we get at x = 2.5, 1.8 5.96 0.19
1.14 0.41
2.2 6.50 0.60
(2.5)(2.5 1) 0.54
y(2.5) = 0 + 2.5(1) + (14)
2!
Using Newtons forward differences
 formula
(2.5)(2.5 1)(2.5 2) y(1.6) = 3.49 + 23 (1.33) + 23 23 1 (0.19)
+ (36) +   
3! + 23 23 1 23 2 (0.4) = 5.4925.
(2.5)(2.5 1)(2.5 2)(2.5 3)
+ (24) + 0 + 0 Example 19: Show that fi2 = (fi + fi+1 )fi
4! [JNTU 2006, Set No. 4] (Question Corrected)
= 2.5 + 26.25 + 11.25 0.9375 = 39.0625.
Solution: We know that fi = fi+1 fi
Example 17: Given that sin 45 = 0.7077, Then fi2 = fi+1
2
fi2 = (fi+1 + fi )(fi+1 fi )
sin 50 = 0.766, sin 55 = 0.8192, sin 60 = 0.866, = (fi+1 + fi )fi
nd sin 52 using Newtons forward differences
formula. Example 20: Find the unique polynomial P (x)
[JNTU 2006, Set No. 2] of degree 2 or less such that P (1) = 1, P (3) = 27,
Chap-17 B.V.Ramana August 30, 2007 10:15

NUMERICAL ANALYSIS 17.7

P (4) = 64 using Lagrange interpolation formula. Put x = 3 and substitute x0 , x1 , x2 , . . ., f (x0 ) . . ., etc.
[JNTU Aug. 2006, Supply. S 2004] (3 1)(3 2)(3 4)(3 5)(3 6)
f (3) = 1 +
(0 1)(0 2)(0 4)(0 5)(0 6)
Solution: x0 = 1, x1 = 3, x2 = 4, y(x) = P (x),
(3 0)(3 2)(3 4)(3 5)(3 6)
so y0 = P (x0 = 1) = P (1) = 1, y1 = P (x1 = 3) = + 14 +
27, y3 = P (3) = 27. By Lagranges interpolation (1 0)(1 2)(1 4)(1 5)(1 6)
formula, we get (3 0)(3 1)(3 4)(3 5)(3 6)
+ 15 +
(2 0)(2 1)(2 4)(2 5)(2 6)
(x x1 )(x x2 )
y(x) = P (x) = y0 + (3 0)(3 1)(3 2)(3 5)(3 6)
(x0 x1 )(x0 x2 ) +5 +
(4 0)(4 1)(4 2)(4 5)(4 6)
(3 0)(3 1)(3 2)(3 4)(3 6)
(x x0 )(x x2 ) +6 +
+ y1 + (5 0)(5 1)(5 2)(5 4)(5 6)
(x1 x0 )(x1 x2 )
(3 0)(3 1)(3 2)(3 4)(3 5)
+19
(6 0)(6 1)(6 2)(6 4)(6 5)
(x x0 )(x x1 )
+ y2 12 18 36 36
(x2 x0 )(x2 x1 ) = 14 + 15 + 5
240 60 48 48
18 12
(x 3)(x 4) (x 1)(x 4) 6+ 19
= 1+ 27+ 60 240
(1 3)(1 4) (3 1)(3 4)
= 0.05 4.2 + 11.25 + 3.75 1.8 + 0.95 = 10.
(x 1)(x 3)
+ 64 Example 22: If yx is the value of y at x for which
(4 1)(4 3)
the fth differences are constant and y1 + y7 =
784, y2 + y6 = 686, y3 + y5 = 1088, then nd y4 .
1
= [48x 2 114x + 72] = 8x 2 19x + 12 [JNTU 2007, Set No. 3]
6
Solution: Since 5th order differences are constant,
Example 21: Using Lagranges formula, calculate
we have 5 yn = constant for any n. Then all the
f(3) from the following table.
higher order differences are zero i.e., 6 yn = 0 and
x 0 1 2 4 5 6
7 yn = 0, etc. for any n. We know that
f (x) 1 14 15 5 6 19
[JNTU Aug. 2006, Supply. Aug. 2003] 0 = 6 y0 = y6 6y5 + 15y4 20y3 + 15y2
6y1 + y0
Solution: Here, x0 = 0, x1 = 1, x2 = 2, x3 = 4,
x4 = 5, x5 = 6 and f (x0 ) = 1, f (x1 ) = 14, f (x2 ) = 0 =  y0 = y7 7y6 + 21y5 35y4 + 35y3
7

15, f (x3 ) = 15, f (x4 ) = 5, f (x5 ) = 6, f (x6 ) = 19.


From Lagranges interpolation formula, we get 21y2 + 7y1 y0


5 since n yk = yn+k n c1 , yn+k1 + n c2 yn+k2 +
(x xj ) . . . + (1)n yk .
j =0

5
j
=i Adding, we get
f (x) = f (xi )

5
i=0 (xi xj ) (y1 + y7 ) 6(y2 + y6 ) + 15(y3 + y5 ) 20y4 = 0.
j =0
i
=1
Given, y1 + y7 = 784, y2 + y6 = 686 and y3 +

5  5
(x xj ) y5 = 1088
= f (xi ) Therefore 784 6(686) + 15(1088) 20y4 = 0
(x i xj )
i=0 j =0
j
=i or y4 = 721.
Chap-17 B.V.Ramana August 30, 2007 10:15

17.8 MATHEMATICAL METHODS

Example 23: Construct the difference table for the Solution: Finite differences table is
following data.
x f(x) Df D2f D 3f D4f
x 0.1 0.3 0.5 0.7 0.9 1.1 1.3 20 354
F (x): 0.003 0.067 0.148 0.248 0.370 0.518 0.697 25 22
332 19
41 31
30 291 12 43
and nd F (0.6) using a cubic that ts at x = 0.3, 0.5, 29 12
35 260 0 14
0.7 and 0.9 using Newtons forward formula. 29 2
40 231 2
[JNTU 2007, Set No. 2] 27
45 204

Solution: The differences table is Gausss forward (rst GI) interpolation formula (see
(1) on page 17.19)
x F(x) DF(x) D2F(x) D3F(x) D4F(x) D5F(x) f (x) = f0 + qf0 + q(q1) 2
2 f1
0.1 0.003 + (q+1)q(q1) 3
 f1 + . . .
0.064 6
0.3 0.067 0.017 Here, x = 22, x0 = 20, h = 5, q = xx h
0
= 2220
5
=
0.081 0.002
0.5 0.148 0.019 0.001 0.4, f0 = 354, f0 = 41,  f1 = 19,
2
0.100 0.003 0
0.7 0.248 0.022 0.001 3 f1 = 31
0.122 0.004 0 f (22) = 354 + (0.4)(41) + (0.4)(0.6) (19)
0.9 0.370 0.026 0.001 2
0.148 0.005 + (1.4)(0.4)(0.6)
(31)
1.1 0.518 0.031 6
0.179 = 354 16.4 + 2.28 1.736 = 338.144
1.3 0.697

Example 25: Using Gauss backward differences


Take x0 = 0.3. Here, h = 0.2, x = 0.6; so
formula nd y(8) from the following table.
x; 0 5 10 15 20 25
x x0 0.6 0.3
q= = = 1.5 y(x): 7 11 14 18 24 32
h 0.2
[JNTU 2007, Set No. 1]
with x0 = 0.3, x1 = 0.5, x2 = 0.7, x3 = 0.9 we can
Solution: Here, q = xxh
0
, x = 8, x0 = 10, h = 5
t a polynomial of degree 3.
By Newtons forward differences formula, with so q = 5 = 0.4. The Gauss backward differ-
810

y0 = 0.067, y0 = 0.081, 2 y0 = 0.019, 3 y0 = ences formula (Gauss second G2: see (2) on Page
0.003, 4 y0 = 0.001, 5 y0 = 0, we get, F (0.6) = 17.19).
0.067 + (1.5)(0.081) + (1.5)(1.51)
2!
(0.019)+ y(x) = y0 + qy1 + q(q+1)
2 y1 + q(q +
2!
+ (1.5)(1.51)(1.52)
3!
(0.003)+ 1) (q1)
3!
+ (1.5)(1.51)(1.52)(1.53)
4!
(0.001) 3 y2 +  y2
(q+2)(q+1)q(q1) 4
+ ...
4!
= 0.067 + 0.1215 + 0.0071 0.0011 + 0.000002
F (0.6) = 0.194502 x y D D2 D3 D4
0 7
4
5 11 1
Example 24: Find f (22) from the following table 3 2
10 14 1 1
x0 using Gauss forward formula 4 1
15 18 2 1
x 20 25 30 35 40 45 6 0
20 24 2
f (x) 354 332 291 260 231 204 8
25 32
[JNTU 2007, Set No. 4]
Chap-17 B.V.Ramana August 30, 2007 10:15

NUMERICAL ANALYSIS 17.9

Using the Gauss backward differences formula with


y0 = 14, y1 = 3, 2 y1 = 1, 2 y2 = 2, we get EXERCISE
y(8) = 14 + (0.4) 3 + (0.4)(0.6) 1
+ (0.6)(0.4)(1.4)
6
(2)
y(8) = 12.792.

n1
1. Show that 2 fk = fn f0
Example 26: If f (x) = u(x)v(x) show that k=0
f [x0 , x1 ] = u[x0 ] v[x0 , x1 ] + u[x0 , x1 ] v[x1 ] [JNTU 2003]
[JNTU 2006, Aug. Supply. Set No. 4] Hint:  fk = fk+1 fk
2

 2
n1
Solution: From the denition of rst order divided  fk = 2 f0 + 2 f1 + 2 f2 + . . . + 2 fn1
differences, we have k=0
u[x0 , x1 ] = u[xx1 ]u[x0]
, v[x0 , x1 ] = v[xx1 ]v[x0]
, = (f1 f0 ) + (f2 f1 ) +
x x
1 0 1 0 . . . (fn fn1 )
and f [x0 , x1 ] = f [xx1 ]f [x0 ]
= fn f0 .
1 x0
Thus RHS  = u[x0 ] v[x0, x1 ] + u[x0 , x1 ] v[x1 ] sin x
= u[x0 ] v[xx1 ]v[x0]
+ u[xx1 ]u[x0]
v[x1 ]v[x1 ] 2. Consider the following data for g(x) = x2
.
x
1 0 x 1 0
= 1
x1 x0
{u[x0 ]v[x1 ] u[x0 ] v[x0 ] x: 0.1 0.2 0.3 0.4 0.5
+[u[x1 ] v[x1 ] u[x0 ] v[x1 ]} g(x): 9.9833 4.9696 3.2836 2.4339 1.9177
= 1
{u[x1 ]v[x1 ] u[x0 ] v[x0 ]}
x1 x0 Calculate g(0.25) accurately using Newtons
= 1
x1 x0
{f [x1 ] f [x0 ]} = f [x0 , x1 ]. forward method of interpolation.
[JNTU: Aug. 2003]
Example 27: Find the unique polynomial P (x) Hint: q = 0.250.1 = 1.5, h = 0.1, x = 0.25,
0.1
of degree 2 or less such that P (1) = 1, P (3) = 27, x0 = 0.1, g(0.25) = 9.9833 + 1.5(5.0137) +
P (4) = 64 using Newton divided differences for- (1.5)(0.5)
3.3277
2
mula.
[JNTU Aug. 2006, Supply. Set No. 2] + 1.50.5(0.5)
32
(2.4919)

Solution: Divided differences table + 1.50.5(0.5)(1.5)


432
1.9886
x P (x) Divided differences
Ans. g(0.25) = 3.9134.
of order
1 2 3. For x = 0, 1, 2, 4, 5; f (x) = 1, 14, 15, 5, 6. Find
x0 = 1 P0 = 1 f (3) using forward differences table.
[x0 , x1 ] = 271
31 [JNTU 2004]
= 13
x1 = 3 P1 = 27 [x0 , x1 , x2 ] Hint: x = 3, h = 1, q = 30
1
=3
= 3713
41
=8
[x1 , x2 ] = 6427
43
= 37
x2 = 4 P2 = 64 3(2) 3(2)(1)
f (3) = 1 + 13(3)+ (12)+
Here, x0 = 1, P0 = 1, [x0 , x1 ] = 13, [x0 , x1 , x2 ] = 8 2 321
(1)
Using Newtons divided differences formula
P (x) = P0 + (x x0 )[x0 , x1 ] + (x x0 )(x x1 ) Ans. 5.
[x0 , x1 , x2 ] 4. Find y(25) given that y20 = 24, y24 = 32, y28 =
= 1 + (x 1) 13+(x 1)(x 3)8 35, y32 = 40 using Gauss forward differences
= 8x 2 19x + 12 formula. [JNTU Aug. 2006, Supply. Set No. 1]
Chap-17 B.V.Ramana August 30, 2007 10:15

17.10 MATHEMATICAL METHODS

Hint: x0 = 28, x = 25, h = 4, q = 2528


4
= 43 [JNTU 2002]
Hint: x0 = 1, x1 = 7, x2 = 15, x = 10,
x y = f(x) D y D2y D3y f0 = 168, f1 = 192, f2 = 336
x 2 = 20 y 2 = 24
8 f (10) = (107)(1015)
(17)(115)
168 + (101)(1015)
(71)(75)

x1 = 24 y1 = 32 5 192+
3 7
x0 = 2.8 y0 = 35 2 + (101)(107)
(151)(157)
336
5
x1 = 32 y1 = 40 Ans. 231.005
7. Compute f (3.5) from the following data
 3  3  x: 1 2 3 4


3 4 4 1 f (x): 1 2 9 28
y(25) = 35 + 3+ 2 Using Lagranges, interpolation of 2nd and
4 2!
 3  3   3rd-order degree polynomials.
4 4 1 43 + 1
+7 Hint: x0 = 1, x1 = 2, x2 = 3, y0 = 1, y1 = 2,
3! y2 = 9, x = 3.5
Ans. y(25) = 34.4453. (a) 2nd order f (3.5) = 16
5. Use Gauss backward differences formula to nd (b) 3rd order: x0 = 1, x1 = 2, x2 = 3, x3 =
y(8) from the following table. 4, y0 = 1, y1 = 2, y2 = 9, y3 = 28, x = 3.5,
f (3.5) = 16.625.
x 0 5 10 15 20 25
8. Find a real root of x 3 x 1 = 0 by bisection
y 7 11 14 18 24 32
method.
[JNTU Aug. 2006, Supply, Set No. 4]
Solution: x0 = 10, y0 = 14, h = 5, x = 8, so q = Hint: root in (1, 2), x2 = 1.25, x3 = 1.375, x4 =
xx0
= 810 = 25 = 0.4 1.3125, x5 = 1.34375, x6 = 1.328125
h 5
Ans. 1.328125.
x y(x) D y D2y D3y D4y D5y 9. Using bisection method, nd a real root of x +
x2 = 0 y 2 = 7
4 tan x 1 = 0.
x1 = 5 y1 = 11 1
3 2 Hint: f (0) = 1, f (0.5) = 0.0463, root (0, 0.5).
x0 = 10 y0 = 14 1 1
4 1 0 Ans. 0.4795.
x1 = 15 y1 = 18 2 1
6 0
x1 = 20 y2 = 24 2 10. Find out an approximate root of x sin x = 1 using
8 bisection method.
x1 = 25 y3 = 32
Hint: f (0) = 1, f (1) = 0.158529, f (1.5) =
0.496, root in (1, 1.5); x3 = 1.125, x2 = 1.25,
(0.4)(0.6) 1 x4 = 1.0625, x5 = 1.09375, x6 = 1.109375,
y(8) = 14 + (0.4) 3 + x7 = 1.1171875, x8 = 1.11328125.
2
(0.4)(0.4 1)(0.4 + 1)2 Ans. 1.11328125.
+ 2
6 11. Use bisection method to nd a real root of 667.38
(0.4)(0.4 1) + (0.4 + 1)(0.4 + 2) (1 e0.146843x ) = 40 x.
+ (1)
24 Ans. 14.5.
Ans. y(8) = 12.7696. Hint: f (12) = 6.067, f (16) = 2.269, root in
6. Evaluate f (10), given f (x) = 168, 192, 336 at (12, 16).
x = 1, 7, 15 respectively. Use Lagranges inter- 12. Find the root of the Equation 2x log10 x = 7
polation.
Chap-17 B.V.Ramana August 30, 2007 10:15

NUMERICAL ANALYSIS 17.11

which lies between 3.5 and 4 by RegulaFalsi 17. Find a real root of tan1 x x = 1.
method. [JNTU 2006, Set No. 3] Ans. 2.1323.
Ans. 3.789. Hint: g(x) = 1 + tan1 x, xn+1 = 1 + tan1 xn ,
Hint: x0 = 3.5, x1 = 4, x2 = 3.7888, f (2) = 0.10, f (3) = 0.75; choose x0 = 1,
f (x2 ) = 0.0009, f (x1 ) = 0.3979, x1 = 1.7854, x2 = 2.0602, x3 = 2.1189, x4 =
root (3.7888, 4), x0 = 3.7888, x1 = 4, 2.1318, x5 = 2.1322, x6 = 2.1323.
x3 = 3.7893 18. Using xed point
Iteration Method iteration method, evaluate ap-
proximately (a) 12 (b) 1 . 12
13. Find a real root of x 3 + x 2 100 = 0.
Ans. (a) 3.46425 (b) 0.2887.
Ans. 4.3311
Hint: (a) 12 = x, x 2 = 12 or x = 12 x
= g(x).
Hint: f (4) = 20 < 0, f (5) = 50 > 0 Since 9 and 16 are nearest numbers to 12 with

root in (4, 5), xn+1 = x10+1 = g(x), perfect squares 9 = 3, 16 = 4. Take x0 =
n
 5 3.5, x = 3.4285, x = 3.5, x = 3.4285, x4 =
|g (x)| = (x+1)3/2 < 1 in (4, 5). Take x0 = 4.2 1 2 3
3.5, approximate root = 3.4285+3.5
2
= 3.46425.
x1 = 4.38529, x2 = 4.30919, x3 = 4.33996, (b) x = 112 , x 2 = 12 1
or x = 12x 1
= g(x)
x4 = 4.32744, x5 = 4.33252, x6 = 4.33046, choose x0 = 3.5 = 0.285,
1
x1 = 0.2924,
x7 = 4.33129, x8 = 4.33096, x9 = 4.33109, x2 = 0.285, x3 = 0.2924, approximate root
x10 = 4.33104, x11 = 4.33106, x12 = 4.33105, = 0.285+0.2924 = 0.2887.
x13 = 4.33105 2
19. Find a real root of ex sin x = 1 using Newton
14. Find the real root of the Equation Raphsons method.
[JNTU Aug. 2006, Supply Set No. 3,
x3 x5 x7 x9 x 11
x + + + ... R059010202]
3 10 42 216 1320 Hint: f (x) = ex sin x 1, f  (x) =
= 0.4431135. x
e (sin x + cos x). f (2) = 5.7188,
f ( ) = 1; f  (2) = 3.6439.
Ans. 0.4769.
3 5 7 9 11 Since f (2) and f  (2) have the same sign
Hint: x = x3 x10 + x42 216
x x
+ 1320 + choose x0 = 2. NR formula is
0.4431135
x0 = 0.44, x1 = 0.4699, exn sin xn 1
Choose xn+1 = xn ,
x2 = 0.4755, x3 = 0.47664, x4 = 0.47686, exn (sin xn + cos xn )
x5 = 0.47690. x1 = 2 5.7188 = 0.4305, f (x1 ) = 0.358,
3.6439
15. By iteration method, nd a real root of sin x = f  (x1 ) = 2.039, x2 = 0.606, f (x2 ) = 0.044,
10(x 1). f  (x2 ) = 2.5507, x3 = 0.5887,
Ans. x = 1.088. f (x3 ) = 0.0004178. Approximate root x3 =
0.5887.
Hint: f (1) > 0 and f (2) < 0, root in (1, 2)
choose x0 = 1, x1 = 1.084, x2 = 1.088, x3 =
1.088
16. Using method of successive approximation nd
a root of x 3 3x + 1 = 0.
Ans. 0.347.
Hint: f (0) = 1 > 0, f (1) = 1 < 0, xn+1 =
xn3 +1
3
.

You might also like