Numerical Methods - Assignment
Programme: B.Tech
1. Consider the system of equations:
x + 7y + z = 18
6x + y − z = 4
x − 2y + 5z = 12
(a) Examine whether this system, in the order given, is suitable for the Jacobi method. If
not, rearrange the equations, justifying your rearrangement using the relevant convergence
condition.
(b) using x(0) = y (0) = z (0) = 0, carry out the Jacobi iteration and tabulate x(k) , y (k) , z (k) at
each step (ϵ = 0.0005).
2. Solve the following system by the Jacobi method, starting from x(0) = 0, accurate up to 10−4
10x1 − x2 + 2x3 = 12
x1 + 8x2 − x3 = 9
2x1 − x2 + 10x3 = 15
state the number of iterations require.
3. Solve system of equations by Gauss-Seidel method (ϵ = 10−3 ).
x + 7y + z = 18
6x + y − z = 4
x − 2y + 5z = 12
4. Consider the system of equations:
2x − y + 3z = 4
3x + 3y − z = 5
3x + 2y + 2z = 7
Apply the Gauss-Seidel method to the system using 0 as initial guess, iterating until successive
iterates agree to 3 decimal places.
5. Show that f (x) = x3 − x − 1 = 0 has a root in [1, 2]. Perform 8 iterations of the bisection
method, tabulating a, b, xm , and f (xm ) at each step.
6. Let f (x) = cos x − xex .
(a) Show that f has a root in [0, 1].
(b) Find this root correct to three decimal places using the bisection method, showing every
iteration.
1
7. The equation f (x) = x3 + x − 1 = 0 has a root in (0, 1). Three rearrangements into fixed-point
form x = g(x) are proposed:
g1 (x) = 1 − x3 ,
g2 (x) = (1 − x)1/3 ,
g3 (x) =
1
x2 + 1
(a) For each gi , evaluate |gi′ (x)| at (an estimate of) the root and state whether the corresponding
iteration is guaranteed to converge.
(b) Find the root correct upto 4 decimal places.
8. x = cos x, Starting from x0 = 0.5, perform 8 iterations of xn+1 = cos(xn ) and tabulate the
results.
9. Let f (x) = x3 − 2x − 5.
(a) Show that f has a root between x = 2 and x = 3.
(b) Starting from x0 = 2, apply the Newton-Raphson formula to find root correct upto 5
decimal places, tabulating xn , f (xn ), and f ′ (xn ) at each step.
10. Let f (x) = ex sin x − 1. Starting from x0 = 0.5, apply the Newton-Raphson formula to find
root correct upto 6 decimal places.
11. The function f (x) = ex is tabulated at unequally spaced points:
x
0
0.5
1
1.8
2
f (x)
1.0000
1.6487
2.7183
6.0496
7.3891
Using Lagrange’s interpolation formula, estimate f (1.5). Show all five Lagrange basis polynomial
values Li (1.5) explicitly.
12. A function f (x) is known only through the following values:
x
0 1 3
6
f (x) 2 3 35 248
(a) Construct the Lagrange interpolating polynomial of degree 3 through these four points.
(b) Estimate f (2).
(c) Write the Lagrange interpolation error formula for this degree-3 polynomial.
13. Consider the equation x3 − 2x − 5 = 0, Using the Regula Falsi method, find it’s root correct
upto five decimal places.
14. Consider the equation x log10 x = 1.2. Apply the Regula Falsi method to find the root
correct upto four decimal places.
15. The following data is expected to follow a linear relationship y = a + bx:
x
1
2
3
4
5
6
y
2.4
4.0
5.3
6.9
8.4
10.1
(a) Derive the normal equations for a least-squares straight-line fit and use them to find a and
b.
2
(b) Compute the sum of squared residuals
(yi − (a + bxi ))2 .
∑︁
16. Fit a second-degree polynomial y = a + bx + cx2 to the following data using the method of
least squares:
x
-2
-1
0
1
2
3
y
11.8
4.9
1.1
0.2
2.9
8.8
(a) Write down the three normal equations for a, b, and c.
(b) Use the fitted polynomial to estimate y at x = 1.5.
3