tutsheet6 (1)
tutsheet6 (1)
Delhi
CO Mapping
Objective: The main objective of this tutorial sheet is to learn Numerical methods to solve the
roots of an equation, integral, system of linear equations and first order ODE.
3x2n + 2
1. The following expression xn+1 = is an iteration scheme to find a root of the
8
equation f (x) = 0. Find the function f (x).
ANS: f (x) = 3x2 − 8x + 2
2. Find a root of the equation x − e−x = 0 using Newton Rapshon Method, correct up to three
decimal places.
ANS: root lies in the interval (0, 1), take x0 = 0.5, x1 = 0.5710, x2 = 0.5762 and
x3 = 0.5671. Root correct up to three decimal places is 0.567
3. Using, Newton-Rapshon method, derive the formula to find (i) N1 and (ii)N 1/q , N > 0, q
integer. Hence perform three iteration for 18 , (18)1/3 by initial approximation x0 = 0.05 and
x0 = 2.5 respectively.
ANS:(i) xk+1 = 2xk − N x2k , For 18 , x0 = 0.05, x1 = 0.055, x2 = 0.0.05555 and x3 = 0.055555.
(q−1)xqk +N
(ii) xk+1 = qxq−1
. For 81 , x0 = 2.5, x1 = 2.62667, x2 = 2.62075 and x3 = 2.62074.
k
4. Discuss the Newton–Raphson method to find the root of the equation x10 − 1 = 0 starting
with x0 = 0.5.
10
ANS: The real roots are 1, −1. xn+1 = 9x10x
n +1
9 . When x0 = 0.5, then x1 = 51.65, which is far
n
away from the root 1. This is because 0.5 is not close enough to the root x = 1. But the
sequence {xn } will converge to the root 1, although very slowly.
If x0 = 0.9, gives the first approximate root x1 = 1.068, which is close to the root 1. This
example points out the role of initial approximation in Newton Rapshon method.
1
5. Solve the following equations using Gauss elimination and LU-Decomposition(factorization
method):
(a) 10x + y + z = 12; 2x + 10y + z = 13; 2x + 2y + 10z = 14.
(b) x + 2y + 3z = 14; 2x + 3y + 4z = 20; 3x + 4y + z = 14.
(c) 2x − y + z = −1; 2y − z + w = 1; x + 2z − w = −1; x + y + 2w = 5.
6. Perform four iteration to solve the equations 20x + y − 2z = 17, 3x + 20y − z = −18,
2x − 3y + 20z = 25, using Gauss Jacobi method and Gauss-Seidal method, staring with
x0 = y0 = z0 = 0.
ANS: Gauss Jacobi: Ist iteration: x1 = 0.85 y1 = −0.9 z1 = 1.25
2nd iteration: x2 = 1.02 y2 = −0.965 z2 = 1.1515
3rd iteration: x3 = 1.0134 y3 = −0.9954 z3 = 1.0032
4th iteration: x4 = 1.0009 y4 = −1.0018 z4 = 0.9993
Gauss Seidal: Ist iteration: x1 = 0.8500 y1 = −1.0275 z1 = 1.0109
2nd iteration: x2 = 1.0025 y2 = −0.9998 z2 = 0.9998
3rd iteration: x3 = 1.0000 y2 = −1.0000 z2 = 1.0000
7. Perform four iteration to solve the following equations 10x − 2y − z − w = 3,
−2x + 10y − z − w = 15, −x − y + 10z − 2w = 27, −x − y − 2z + 10w = −9
using Gauss-Seidal method, staring with x0 = y0 = z0 = w0 = 0.
ANS: Gauss Seidal: Ist iteration: x1 = 0.3 y1 = 1.56 z1 = 2.886 w1 = −0.1368
2nd iteration: x2 = 0.8869 y2 = 1.9523z2 = 2.9566 w2 = −0.0248
3rd iteration: x3 = 0.9836 y3 = 1.9899 z3 = 2.9924 w4 = −0.0042
4th iteration: x4 = 0.9968 y4 = 1.9982 z4 = 2.9987 w4 = −0.0008
8. For the following systems of equations
−3x + y = −2, 2x − 3y + z = 0, 2y − 3z = −1
(a) Write down the Gauss-Jacobi iteration scheme in matrix form.
(b) Write down the Gauss-Seidal iteration scheme in matrix form.
(c) Starting with X (0) = 0, iterate two times.
Rb
9. Write down the composite formula for n-interval to evaluate the integral a
f (x)dx, using
(i) Trapezoidal rule, (ii) Simpson’s 1/3 rule and (iii) Simpson’s 3/8
10. Evaluate the following integrals:
Z 3
(a) (2x − x2 )dx, taking 6 intervals, using (i) Trapezoidal rule, (ii) Simpson’s 1/3 rule
0
and (iii) Simpson’s 3/8. R3
ANS: Trapezoidal rule gives, 0 (2x − x2 )dx = −0.125 and Simpson’s 1/3 and
R3
Simpson’s 3/8 rule give 0 (2x − x2 )dx = 0.
R 1/2 x
(b) 0 sinx dx, using the trapezoidal rule with h = 1/4.
ANS: 0.507988
R1
(c) Calculate 0 (1 + sinx
x
)dx using Simpson’s rule.
ANS: 1.946146.
(d) Evaluate the following integrals using Trapezoidal, Simpson’s 1/3 and Simson’s 3/8,
with 10 intervals.
R5 2 R 1 4 x−1 R3 1
(a) 0 e−x dx (b) 0
x e dx. (c) 0 1+x2
dx.
R 1.4
(e) Compute the value of 0.2 (sin x − log x + ex )dx Simpson’s 3/8 rule with h = 0.2.
R 1.4
ANS: 0.2 (sin x − log x + ex )dx = 4.053.
(f) The arc length of the curve y = f (x) over the interval a ≤ x ≤ b is
Rbp
a
(1 + (f ′ (x))2 )dx. For the function f (x) = x3 , 1 ≤ x ≤ 1. Find the approximate arc
length using the composite Trapezoidal and Simpson’s 1/3 rule with n = 10.
R1√
ANS: Trapezoidal rule 0 1 + 9x4 dx = 1.55261 and Simpson’s 1/3
R1√
0
1 + 9x4 dx = 1.54786.
11. Using Euler’s method, find the solution of the initial value problem
dy
= log(x + y), y(0) = 2
dx
at x = 0.2 by assuming h = 0.2.
12. Using Euler method, solve the following ordinary differential equation
dy
= −y 2 , y(1) = 1,
dx
at y(1.2) with h = 0.1.
dy
13. Consider a differential equation dx − y = x with initial condition y(0) = 0. Using modified
Euler’s order method with a step size of 0.1 then the value of y(0.1).
dy
14. Consider = y 2 − x2 , where y(0) = 2. Find y(0.1) and y(0.2) by fourth order
dx
Runge-Kutta .
15. Consider the first order initial value problem
dy
dx
= by + ax − x2 , y(0) = 1, (0 ≤ x < ∞).
Then find y(0.1), using 4th order Runge Kutta method with step size h = 0.1.
ANS:.