NUMERICAL METHODS
NUMERICAL METHODS
NUMERICAL METHODS
PERAMBALUR
DEPARTMENT OF SCIENCE AND HUMANITIES
QUESTION BANK
NUMERICAL METHODS-MA1251
UNIT-I
(SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS)
PART-A
1 .State the iterative formula for regula falsi method to solve f(x)=0
Solution:
The iteration formula to find a root of the equation f(x)=0
Which lies between x = a and x = b is
X1 = ( a f(b) – b f(a)) / f(b) – f(a)
2. How to reduce the number of iterations while finding the root of an
equation by Regula falsi method.
Solution:
The number of iterations to get a good approximation to the real
root can be reduced ,if we start with a smaller interval for the root.
3. State the order of convergence and convergence condition for Newton
Raphson method.
Solution:
The order of convergence is 2
condition for convergence is ׀f(x)f”(x) ׀ < ׀f’(x)׀2
4. Write the iterative formula of Newton Raphson method.
Solution:
Xn+1= xn – f(xn) / f’(xn)
5. State the principle used in Gauss Jordan method.
Solution:
Coefficient matrix is transformed into diagonal matrix
6. For solving a linear system, compare Gaussian elimination method
and Gauss Jordan method.
Solution:
7. Find the iterative formula for finding the value of 1 / N where N is a real
number, using Newton Raphson method. Hence evaluate 1/26 correct to
4 decimal places
2x +3y -z = 5
4x +4y -5z = 3
2x –3y + 2 z = 2
11. Solve the system of equations by Gauss Jacobi method
2x -3y +20z = 25
20x +y -2z = 17
3x +20y - z = -18
12. Solve the system of equations by Gauss Jacobi method
2x -3y +20z = 25
20x +y -2z = 17
3x +20y - z = -18
13. Find the dominant eigen value and the corresponding eigen vector
⎛1 6 1⎞
Of the following matrix A= ⎜⎜ 1 2 0 ⎟⎟
⎜0 0 3⎟
⎝ ⎠
y = f ( x)
( x − x1 )( x − x 2 )...( x − x n ) ( x − x 0 )( x − x 2 )...( x − x n )
= y0 + y1 + ....
( x 0 − x1 )( x 0 − x 2 )...( x 0 − x n ) ( x1 − x 0 )( x1 − x 2 )...( x1 − x n )
( x − x 0 )( x − x1 )...( x − x n −1 )
+ yn
( x n − x1 )( x n − x 2 )...( x n − x n −1 )
( x − 1)( x − 3)( x − 4) ( x − 0)( x − 3)( x − 4)
= (−12) + 0
(0 − 1)(0 − 3)(0 − 4) (1 − 0)(1 − 3)(1 − 4)
( x − 0)( x − 1)( x − 4) ( x − 0)( x − 1)( x − 3)
+ 0+
(3 − 0)(3 − 1)(3 − 4) (4 − 0)(4 − 1)(4 − 3)
= 2 x 3 − 12 x 2 + 22 x − 12
11. Obtain the interpolation quadratic polynomial for the given data by using
Newton’s forward difference formula.
Solution:
The finite difference table is
x y ∆y ∆ 2y ∆ 3y
0 -3
8
2 5 8
16 0
4 21 8
24
6 45
x−0 x
n= =
2 2
n ( n − 1) 2
∴ f ( x) = y 0 + n∆y 0 + ∆ y0
2
= x2 + 2x − 3
12. Write down the range of n for which Gauss forward interpolation and Gauss
backward interpolation gives accuracy result.
Solution:
For Gauss forward interpolation the range for n is 0 < n < 1 and for Gauss
backward the range is -1 < n < 0.
13. Find the parabola of the form y = ax2 + bx + c passing through the points
(0,0) (1,1) and (2,20)
Solution:
By Lagrange’s formula
( x − 1)( x − 2) ( x − 0)( x − 2) ( x − 0)( x − 1)
y= 0+ 1+ 20
(0 − 1)(0 − 2) (1 − 0)(1 − 2) (2 − 0)(2 − 1)
= 9 x 2 − 8x
14. Write the Lagrange’s fundamental polynomial L0(x) and L1(x) that satisfy
the condition L0(x) + L1(x) =1 for the data [x0 ,f(x0)],[x1,f(x1)]
Solution:
x − x1
L0 ( x) =
x0 − x1
x − x0
L1 ( x) =
x1 − x0
Solution:
(iii)
16. What are the natural (or) free conditions in Cubic Spline.
Solution:
Solution:
Solution:
Solution:
Order of convergence = 4.
Solution:
Solution:
Solution:
Solution:
Solution:
⎛1⎞ 1
25. Show that ∆ ⎜⎝ a ⎟⎠ = − abcd
bcd
Solution:
a 1
a
−1
ab
b 1 1
b abc
−1 −1
bc abcd
c 1 1
c bcd
−1
cd
d 1
d
PART-B
1. From the following data estimate the number of persons earning weekly
wages between 60 and 70 rupees.
x 5 7 11 13 17
3. Using Newton’s divided difference formula find u(3) given u(1) = -26,
4. Using Lagrange’s interpolation, calculate the profit in the year 2000 from the
following data.
x 0 5 10 15
x: -4 -1 0 2 5
8. Find a polynomial of degree two for the data by Newton’s forward difference
method
x 0 1 2 3 4 5 6 7
y 1 2 4 7 11 16 22 29
x: 4 5 7 10 11 13
10. Find the polynomial f(x) by using Lagrange’s formula and hence find f(3) for
x: 0 1 2 5
f(x): 2 3 12 147
11. Find f(x) as a polynomial in x for the following data by Newton’s divided
difference formula.
x: -4 -1 0 2 5
x: 1 2 7 8
f(x): 1 5 5 4
13. From the following table, find the value of tan45º15´ by Newton’s forward
interpolation formula.
x º: 45 46 47 48 49 50
x: 0 1 2 3
f(x): 1 2 9 28
15. If f(0) = 0, f(1) = 0, f(2) = -12, f(4) = 0, f(5) = 600 and f(7) = 7308, find a
polynomial that satisfies this data using Newton’s divided difference
interpolation formula. Hence, find f(6).
16. Given the following table, find f(2.5) using cubic spline functions:
i 0 1 2 3
xi 1 2 3 7
x: 1 2 3 4
y: 1 2 5 11
x: -1 0 2 3
y: -8 3 1 2
19. The following data are taken from the steam table:
2. What is the condition for Simpson’s 1/3 rd rule and state the formula?
Solution:
The condition for Simpson’s 3/8 th rule is that the number of intervals
should be even number
Xn
∫ f(x)dx = h/3{(y0+yn)+2(y2+y4+…)+4(y1+y3+…)}
x0
3. Write down trapezoidal formula.
Solution:
xn
∫ f(x) dx = h/2{(y0+yn)+2(y1+y2+y3+…yn-1)}
xo
4. What is the order of error in the trapezoidal rule?
Solution:
The error in the trapezoidal rule is of the order h2
5. What is the order of error in the Simpson’s 1/3 rd rule ?
Solution:
The error in the Simpson’s 1/3 rd rule is of the order h4
6. What are the errors in the trapezoidal and Simpson’s rules of numerical
integration?
Solution:
Error in trapezoidal rule = -(b-a)/12{h2y"(x)}
Error in Simpson’s rule = -(b-a)/180{h4y iv(x)}
7. When can numerical differentiation be used?
Solution:
When the function is given in the form of table of values instead of giving
analytical expression we use numerical differentiation.
8. Why Simpson’s one-third rule is called a closed formula?
Solution:
Since the end points y0 and yn are included in the simpson’s 1/3rd rule it is
called closed formula.
dy
9. Write the formula for at x ≠ xn using backward difference operator.
dx
Solution:
dy 1 2v + 1 2 3v 2 + 6v + 2 3
( )x ≠ xn = { ∇ yn+ ∇ yn+ ∇ yn+…}
dx h 2 6
dy
10. Write the formula for at x=x0 using forward difference operator
dx
Solution:
dy 1 1 1 1
( )x ≠ x0 = { ∆ y0- ∆ 2y0+ ∆3 y 0 - ∆4 y 0 -…}
dx h 2 3 4
dy
11.Find at x = 1 from the following table
dx
x 1 2 3 4
y 1 8 27 64
Solution:
The forward difference table is as follows.
x y ∆ ∆2 ∆3
1 1
7
2 8 12
19 6
3 27 1
37
4 64
⎛ dy ⎞ 1⎛ ∆2 ∆3 ⎞
⎜ ⎟ = ⎜⎜ ∆y 0 − y0 + y 0 ... ⎟⎟ -__________________ (1)
⎝ dx ⎠ x = x0 h ⎝ 2 3 ⎠
⎛ dy ⎞ 1⎛ 12 6 ⎞
-------(1) ⇒ ⎜ ⎟ = ⎜ 7 − + ⎟ = 3
⎝ dx ⎠ x =1 1 ⎝ 2 3⎠
12. Using Newton’s backward difference formula, write the formulae for the first
and second order derivatives at the end values x = x n upto the fourth order
difference term.
Solution:
⎛ dy ⎞ 1⎡ 1 1 ⎤
⎜ ⎟ = ⎢∇y n + ∇ 2 y n + ∇ 3 y n + .......⎥
⎝ dx ⎠ x = xn h ⎣ 2 3 ⎦
⎛d2y⎞ 1 ⎡ 2 11 4 ⎤
⎜⎜ 2 ⎟⎟ = 2 ⎢∇ y n + ∇ y n + 12 ∇ y n + ........⎥
3
⎝ dx ⎠ x = xn h ⎣ ⎦
⎛d3y⎞ 1 ⎡ 3 3 4 ⎤
⎜⎜ 3 ⎟⎟ = 3 ⎢∇ y n + 2 ∇ y n + ........⎥
⎝ dx ⎠ x = xn h ⎣ ⎦
Solution:
x6
∫ ydx = 2 [( y + y 6 ) + 2( y 2 + y 3 + y 4 + y 5 )]
h
1
x1
15. What are the errors in Trapezoidal and Simpson’s rule of numerical
integration?
Solution:
16. In order to evaluate ∫ ydx by Simpson’s 1/3 rule as well as by Simpson’s 3/8 rule,
x0
Π
17.Using Trapezoidal rule evaluate ∫ sin xdx by dividing the range into 6 equal
0
parts.
Solution:
∫ sin xdx = 2 [( y ( )]
Π
+ y n ) + 2 y1 + y 2 + ... + y n −1
h
0
0
Π
= 6 [(0 + 0 ) + 2(0.5 + 0.866 + 1 + 0.866 + 0.5)]
2
Π
= [7.464]
12
= 0.622
6
18. Write down the trapezoidal rule to evaluate ∫ f (x )dx with h = 0.5
1
Solution:
Here f(x) = h = 0.5
x 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
y=f(x) f(1) f(2) f(3) f(4) f(5) f(6) f(7) f(8) f(9) f(10) f(11)
6
h
[ f (1) + f (11)] + 2[ f (2) + f (3) + f (4) + f (5) + f (6) + f (7) + f (8) + f (9) + f (10)]
2
PART B
2
1. Evaluate the integral ∫ dx / 1+ x2 using Trapezoidal rule with two sub intervals.
1 π/2
2. Dividing the range into 10 equal parts, fine the value of ∫ sin x dx by
0
i) Trapezoidal rule ii )Simpson’s rule.
Π
3. By dividing the range into ten equal parts, evaluate ∫ sin x dx by
0
Trapezoidal rule and Simpson’s rule.Verify your answer with integration.
6
4. Evaluate ∫ (dx /1+x2 ) by i) Trapezoidal rule ii )Simpson’s rule. Also check up
0
the results by actual integration .
5
5. Evaluate ∫ (dx / 4x+5) by Simpson’s one – third rule and hence find the value of
0
Log e 5 ( n= 10).
2
6. Evaluate ∫ (dx/ x2 +4) using Romberg’s method . Hence obtain an
approximate
0
Value for π.
1
7. Using Romberg’s method evaluate ∫(dx/1+x) correct to three places of
decimals.
0
8. Using three – point Gaussian quadrature formula, evaluate
1
i) ∫ (1/ 1+x2) dx
-1
1
ii ) ∫ ( 1 / 1+t2 ) dt
0
1.5
9.Evaluate ∫ e- x2
dx using the three point Gaussian quadrature.
0.2
2 2
10. Evaluate ∫ ∫ f (x, y ) dx dy by Trapezoidal Rule for the following data :
0 0
y/ x 0 0.5 1 1.5 2
0 2 3 4 5 5
1 3 4 6 9 11
2 4 6 8 11 14
11
11. Using Simpson’s 1/ 3 rule evaluate ∫ ∫ ( 1 / 1+ x+ y) dx dy taking h =k = 0.5
0 0
22
12. Evaluate ∫ ∫ ( dx dy/ x2 + y2 ) numerically with h= 0.2 along x- direction and
11
S(m) 0 10 20 30 40 50 60
V(m/s) 47 58 64 65 61 52 38
16. The table given below reveals the velocity v of a body during the time “t”
specided. Find its acceleration at t = 1.1
17. Find the first and second derivate of the function tabulated below at x = 0.6
complicated algebraical structure. Then the evaluation lf higher order derivatives may
become tedious. This is the demerit of the method.
Here ynm denotes the rth derivatives of y w.r.to x at the point (xm ,ym).
Also the R.K. formulas involve the computation of f(x,y) at various positions,
instead of derivatives and this function occurs in the given equation.
4. State modified algorithm to solve y’= f(x,y), y(x0)= y0 at x=x0+h.
h h
Yn+1=yn+hf ( xn+ , yn+ f(xn,yn))
2 2
h h
Y1=y0+hf (x0+ , y0+ f(x0,y0))
2 2
dy
5. Write down the Runge-Kutta formula of fourth order to solve =f(x,y) with
dx
y(x0)=y0 .
Let h denotes the interval between equidistant values of x. If the initial values
are (x0,y0), the first increment in ‘y’ is computed from the formulas
K1 = hf(x0,y0)
h k
K2 = hf(x0+ ,y0+ 1 )
2 2
h k
K3 = hf(x0+ ,y0+ 2 )
2 2
K4 = hf(x0+ h,y0+k3)
1
And ∆y= (k1+k2+2k3+k4)
6
Using the same four formulas, using the values x1,y1 in the place of x0,y0
respectively.
5. State the special advantage of Runge-Kutta method over Taylor series method.
Runge-Kutta methods do not require prior calculation of higher
derivatives of y(x), as the Taylor method does. Since the differential equations
using in applications are often complicated, the calculation of derivatives may be
difficult.
h
Yk+1,p= yk+ (55yk’-59yk’-1+37yk-2’-9yk-3’)
24
h
Yk+1,c= yk+ (9yk+1’+19yk’-5yk-1’+9yk-2’)
24
7. How many prior values are required to predict the next value in Adam’s method?
We first use a formula to find the value of y at xn+1 and this is known as a
predictor formula. The value of y so got is improved or corrected by another formula
known as corrector formula.
PART-B
dy 2
1. Using Taylor series method find y at x=0.1 if =x y-1,Y(0)=1.
dx
dy
3.Solve = y2 + x2 with y ( 0) =1. Use Taylor Series at x = 0.2 and 0.4. Find x =
dx
0.1.
4. i) Using Taylor Series method find y at x = 0.1correct to four decimal places from
dy
= x2- y, y (0) = 1, with h= 0.1. Compute terms upto x4.
dx
ii) Using Taylor’s Series method , find y ( 1.1 ) given y’ = x+y, y (1) = 0.
5. Using Taylor series method with the first five terms in the expansion find y ( 0.1 )
dy
correct to three decimal places, given that = ex –y2, y(0) ==1.
dx
6. i)By Taylor’s series method find y ( 0.1 ) given that y ’’ = y+ xy’ ,y(0) = 1, y’ ( 0)
=0.
ii)Using Taylor’s series method find y (1.1) and y ( 1.2 ) correct to four decimal
places given y’ = xy 1/3 and y(1) =1.
7. Using modified Euler’s method solve; given that y’= 1-y, y (0) = 0 find y(0.1),
y(0.2) and y (0.3 ).
dy
8.Solve =log10( x+y), y(0) =2 by Euler’s modified methgod and find the values of
dx
9. i) Using modified Euler’s method solve; given that y’ = y-x2+1, y(0) = 0.5 find y
(0.2).
dy
= x2+y2, y(0) =1.
dx
y2 − x2
10. Compute y (0.2 )and y (0.4) from y’ = given that y (0)=1
y2 + x2
11. Apply Runge – Kutta method to find approximate value of y for x =0.2 in steps
dy
of 0.1 if = x +y2 given that y=1 when x =0.
dx
12.Compute y (0.2 ) ,y (0.4 ) and y (0.6) ,given y’ =x3 + y, y (0) =2 by using Runge –
Kutta fourth order method.
13.Given y ’’- 2y’ + 2y = e 2x sinx with y (0) = -0.4 and y’ (0) = 0.6, using fourth
order Runge – Kutta method find y(0.2 ).
14. Solve y’ = 1/2 ( 1+ x2 )y2, y (0) =1, y (0.1 ) = 1.06, y ( 0.2 ) = 1.12, y(0.3) = 1.21
compute y ( 0.4 ), using Milne’s predictor corrector formula.
15. Solve 5xy’+y2 =2, y (4) = 1, y (4.1) = 1.0049, y (4.2) = 1.0097, y (4.3) =1.0143,
compute y (4.4) Milne’s methods.
16. Given y’ = xy + y2, y (0) = 1.0, find y (0.1 ) by Taylors method y (0.2) by Euler’s
method y (0.3) by Runge – Kutta and y ( 0.4) by Milne’s method.
17. Solve y’ = x-y2, 0 ≤ x ≤1, y(0) = 0, y(0.2) =0.02, y (0.4) =0.0795, y(0.6) = 0.1762, by
Milne’s method to find y (0.8 )and y ( 1).
dy x− y
18. Compute the first 3 steps of the initial value problem =
dx 2
y (0) = 1.0 by Taylor series method and next step by Milen’s method with step
length
h =0.1.
dy
19. Given = x3 + y, y (0) =2, y(0.2) =2.073, y (0.4 ) = 2.452, y (0.6) = 3.023
dx
dy
20. Given = x2 (1+y), y (1)= 1, y(1.1) = 1.233, y (1.2 ) = 1.548,y (1.3 ) = 1.979,
dx
ii) using R-K method fourth order method find y (0.4 ) and y (0.6)
22. Evaluate y (1.4 ): given y’ = 1/x2 – y/x, y (1) =1, y (1.1) = 0.996, y (1.2) =0.986, y
(1.3 ) = 0.972 by Adam’s Bashforth formula.
UNIT-V
(BOUNDARY VALUE PROBLEM IN ORDINARY AND PARTIAL
DIFFERENTIAL EQUATIONS)
PART-A
1. State the conditions for the equation . Auxx+Buyy+Cuyy+Dux+Euy+Fu=G
Where A,B,C,D,E,F,G are function of x and y to be (i) elliptic (ii)
parabolic(iii)hyperbolic
∂ 2u ∂ 2u
1. Solve the Poisson’s equation + = −10( x 2 + y 2 + 10) over the square
∂x 2 ∂y 2
with sides x=0=y, x=3=y with u=0 on the boundary and mesh length is 1.
2. Solve the Poisson equation u xx + u yy = −81xy, 0 < x < 1, 0 < y < 1 given that
h=0.25
6. Using Crank-Nickolson’s Implicit scheme, Solve
16u t = u xx , 0 < x < 1, t > 0, given that u(x,0)=0, u(0,t)=0, u(1,t)=100t
∂ 2u ∂ 2u
+ 2 = e xy ( x 2 + y 2 ),0 < x < 1,0 < y < 1, u (0, y ) = 1, u (1, y ) = e y ,0 ≤ y ≤ 1 & u ( x,0) = 1, u ( x,1) = e x ,
∂x 2
∂y
1
0 ≤ x ≤ 1, u sin g h = k =
3