NA-Tutorial-Booklet.pdf

51
Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus SECOND SEMESTER (2011-2012) Numerical Analysis (AAOC C341) TUTORIAL-BOOKLET Instructor-In-Charge Dr. P. Dhanumjaya Department of Mathematics BITS, Pilani - K. K. Birla GOA Campus January, 2012

description

NUMAL

Transcript of NA-Tutorial-Booklet.pdf

Page 1: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science,Pilani-K. K. Birla Goa Campus

SECOND SEMESTER(2011-2012)

Numerical Analysis(AAOC C341)

TUTORIAL-BOOKLET

Instructor-In-Charge

Dr. P. Dhanumjaya

Department of Mathematics

BITS, Pilani - K. K. Birla GOA Campus

January, 2012

Page 2: NA-Tutorial-Booklet.pdf

Table of Contents

Tutorial-1 …………………………………………...……………...…………………………….1

Tutorial-2 ……………………………………………...………………………...……………….3

Tutorial-3 ………………………………………………...………………………...…………….5

Tutorial-4 …………………………………………………...………………………...………….7

Tutorial-5 ………………………………………………...……...……………………………….9

Tutorial-6 ……………………………………………………………………………………….11

Tutorial-7 ……………………………………………………………………………………….13

Tutorial-8 ……………………………………………………………………………………….15

Tutorial-9 ……………………………………………………………………………………… 17

Tutorial-10 ……………………………………………………………………………………...19

Tutorial-11 ……………………………………………………………………………………...21

Tutorial-12 ……………………………………………………………………………………...23

Tutorial-13 …………………………………………………………………………………...…25

Tutorial-14 ……………………………………………………………………………………...27

Model Test Papers ………………………………………………………………...……………29

Formula Sheet ……………………………………………………………………….…………42

Bibliography ……………………………………………………………………………………46

Handout ……………………………………………………………………...…………………48

Page 3: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-1

1. Compute the absolute error and relative error in approximations of x by x∗

(a) x = π, x∗ = 3.1416

(b) x = e, x∗ = 2.718

(c) x =√2, x∗ = 1.414

2. Use four-digit floating point arithmetic with rounding to perform the following calcu-

lations:

(i)1314

− 67

2e− 5.4, (ii) − 10π + 6e− 3

62.

3. Let

f(x) =x cosx− sin x

x− sin x.

(a) Use four-digit floating point arithmetic with rounding to evaluate f(0.1).

(b) The actual value is f(0.1) = −1.99899998. Find the relative error for the value

obtained in (a).

4. The Maclaurin’s series expansion for ex is given by

ex = 1 + x+x2

2!+

x3

3!+ · · ·+ xn−1

(n− 1)!+

xn

n!eξ, ξ ∈ (0, x).

Find the number of terms n such that their sum yields the value of ex correct up to 8

significant digits at x = 1.

5. Evaluate

f(x) = x3 − 6.1x2 + 3.2x+ 1.5,

at x = 4.71 using three-digit floating point arithmetic with rounding.

1

Page 4: NA-Tutorial-Booklet.pdf

6. Evaluate the polynomial

f(x) = 1.1071x3 + 0.3129x2 − 0.0172x+ 1.1075,

at x = 0.1234 in nested form using five-digit floating point arithmetic with chopping.

7. Find value of the polynomial at x = 0.125 in nested form

9.26 x3 − 3.48 x2 + 0.436 x− 0.0182,

using four-digit floating point arithmetic with chopping.

8. One root of the quadratic equation

0.2x2 − 47.91x+ 6 = 0,

is x = 239.4. Use four-digit floating point arithmetic with rounding to find other root.

9. Find the roots of the quadratic equation

x2 + 111.11x+ 1.2121 = 0,

using five-digit floating point arithmetic with chopping.

10. Use four-digit floating point arithmetic with rounding to find the most accurate ap-

proximations to the roots of the following equations:

(a) 13x2 − 123

4x+ 1

6= 0.

(b) 1.002x2 − 11.01x+ 0.01265 = 0.

2

Page 5: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-2

Note:All the problems use 5-digit floating point arithmetic with rounding.

1. Use bisection method to find p3 (3rd-iteration) for

f(x) =√x− cosx,

on [0, 1].

2. Use bisection method to determine the number of iterations necessary to solve

f(x) = x4 + 2x3 − 10 = 0

with accuracy 10−3 on the interval [a, b] = [1, 2].

3. Use bisection method to find the solution accurate to within 10−2 for

f(x) = 2 sinx− ex

4− 1,

on the interval [−5,−3].

4. Find an approximation to√3 correct to within 10−4 using the bisection method.

5. Find root of the equation

f(x) = x sin x+ cosx = 0,

in [2, 3] using bisection method. Perform four iterations.

6. The number of fixed points of the iterative function g(x) = x− sin πx in [0, 1]?

7. Is there a root of the equation

f(x) = ex − 4 x2 = 0,

between x = 4 and x = 5? Show that we cannot find this root using fixed-point

iteration with the natural iteration function x = 0.5 ex/2.

Can you find an iteration function which will correctly locate this root?

3

Page 6: NA-Tutorial-Booklet.pdf

8. Find a suitable interval and an iterative function g(x) such that the fixed point iteration

converges to the solution of the equation

f(x) = e2x − ex − 2 = 0.

Perform four iterations.

9. Verify that x =√a is an unique fixed point of the function

g(x) =1

2

(

x+a

x

)

,

be defined on the interval [√a− ǫ,

√a+ ǫ] for ǫ > 0.

Determine the order of convergence and the asymptotic error constant of the sequence

xn+1 = g(xn) toward x =√a.

10. Find a function g defined on [0, 1] that satisfies none of the hypotheses of existence

and uniqueness of fixed-point method but still has a unique fixed point on [0, 1].

4

Page 7: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-3

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Find the root of the equation

f(x) = x5 − 3x+ 8 = 0,

lying between x = −2 and x = −1, using fixed point method. Perform three iterations.

2. Find the zero of

f(x) = x2 + 10 cosx,

by using the fixed-point iteration method for an appropriate iteration function g.

3. Most functions can be rearranged in several ways to give x = g(x) with which to begin

the fixed-point method. For

f(x) = ex − 2x2,

one g(x) is

x = ±√

(

ex

2

)

.

(a) Show that this converges to the root near 1.5 if the positive value is used and to

the root near −0.5 if the negative is used.

(b) There is a third root near 2.6. Show that we do not converge to this root even

though values near to the root are used to begin the iterations. Where does it

converge if x0 = 2.5? If x0 = 2.7?

(c) Find another rearrangement that does converge correctly to the third root.

4. Use fixed-point iteration method to determine a solution accurate to within 10−2 for

f(x) = 2 sin πx+ x = 0.

Use p0 = 1.

5

Page 8: NA-Tutorial-Booklet.pdf

5. Use fixed point theorem to show that the sequence defined by

xn =1

2xn−1 +

1

xn−1, for n ≥ 1,

converges to√2 whenever x0 >

√2.

6. For each of the following equations, determine suitable iterative function g and an

interval [a, b] on which fixed-point iteration will converge to a positive solution of the

equation

(a) f(x) = 3x2 − ex = 0.

(b) f(x) = x− cosx = 0.

7. Verify that x = 1ais a fixed point of the function

g(x) = x(2 − ax).

Determine the order of convergence and the asymptotic error constant to the sequence

pn+1 = g(pn) toward x = 1a.

8. Find the parameters a, b and c in the iterative function g(x) = ax3 + bx2 + cx such

that the order of convergence for finding the root x = α using fixed point method is 3.

9. Derive a Newton’s iteration formula for finding the cube root of a positive number α.

10. The function

f(x) = e2x − ex − 2,

has a zero on the interval [0, 1]. Find this zero correct to three significant digits using

Newton’s method. Use p0 = 0.5.

6

Page 9: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-4

Note: All the problems use 5-digit floating point arithmetic with chopping.

1. Let

f(x) = −x3 − cosx,

and p0 = −1. Use Newton’s method to find p2. Could p0 = 0 be used?

2. Use Newton’s method to find the root of the equation

f(x) = 4x3 − 1− ex2

2 = 0,

near p0 = 1.0. Perform two iterations.

3. The equation

f(x) = x3 + x2 − 3x− 3 = 0,

has a root on the interval (1, 2) namely x =√3.

For n ≥ 1, compute the ratio |pn−p||pn−1−p|2

and show that this value approaches(

|f ′′(p)|2|f ′(p)|

)

.

4. Use Newton’s method to find the root of the equation

f(x) =x

1 + x2− 500

841

(

1− 21

125x

)

= 0,

near p0 = 2.0. Perform one iteration.

5. Perform three iterations of the secant method to find the root of the equation

f(x) = ln(x)− 1.04x+ 1.05 = 0,

lying on the interval (1, 2).

7

Page 10: NA-Tutorial-Booklet.pdf

6. If the secant method is applied to the equation

f(x) = x2 − 2 = 0

with p0 = 0 and p1 = 1, what is p2?

7. Let

f(x) = x2 − 6

with p0 = 2 and p1 = 3 then find p3 by using

(a) secant method

(b) method of false position

(c) which of (a) or (b) is closer to√6?

8. Let

f(x) = −x3 − cosx

with p0 = −1 and p1 = 0 then find p3 by using

(a) secant method

(b) method of false position

9. The function

f(x) = 4 sin x− ex,

has a zero on the interval [0, 0.5]. Find the root correct to four significant digits using

secant method.

10. Find the root of the equation

f(x) = x sin x+ cosx = 0,

in [2, 3] using method of false position. Perform three iterations.

8

Page 11: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-5

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Use Muller’s method to find a root of the equation

f(x) = 4x3 − 3x2 + 2x− 1 = 0,

starting with three initial values x = 0, 0.6, 1. Perform two iterations.

2. Find a root of the equation

f(x) = 3x+ sin x− ex = 0,

on the interval [0, 1] using Muller’s method. Perform two iterations.

3. Use Muller’s method to find a root of the equation

f(x) = tan x+ 3x2 − 1 = 0.

Perform two iterations using three initial values x = 0, 0.8, 1.

4. Do three iterations of Newton’s method to obtain the double root of

f(x) = x3 − 2x2 − 0.75x+ 2.25 = 0,

which is close to 1 such that iterations converges quadratically.

5. Suppose we want to solve the equation f(x) = 0, that has a root of multiplicity m at

x = p. (Assume f(x) is sufficiently differentiable function). Show that the Newton’s

method

xn+1 = xn −f(xn)

f ′(xn),

will converge, but only linearly. Determine the asymptotic error constant.

9

Page 12: NA-Tutorial-Booklet.pdf

6. Do one iteration of Newton’s method to solve the system of nonlinear equations

x2 + y2 = 4,

ex + y = 1.

Use X(0) = [1, −1]T .

7. Perform two iterations of Newton’s method for the system of nonlinear equations

4 x21 − x2

2 = 0,

4 x1 x22 − x1 = 1.

Use X(0) = [0, 1]T .

8. Do one iteration of Newton’s method to solve the system of nonlinear equations

x y2 + x2 y + x4 = 3,

x3 y5 − 2 x5 y − x2 = −2.

Use X(0) = [1, 1]T .

9. The nonlinear system (10 marks)

5 x21 − x2

2 = 0,

x2 − 0.25 (sin x1 + cosx2) = 0,

has a solution near(

14, 14

)

. Find a function G and a set D in R2 such that G : D → R2

and G has a unique fixed point in D.

10. The nonlinear system

x21 − 10x1 + x2

2 + 8 = 0,

x1 x22 + x1 − 10x2 + 8 = 0,

can be transformed into the fixed-point problem

x1 = g1(x1, x2) =x21 + x2

2 + 8

10,

x2 = g2(x1, x2) =x1 x

22 + x1 + 8

10.

Show that G = (g1, g2)T mapping D ⊂ ℜ2 into ℜ2 has a unique fixed point in

D = {(x1, x2)T : 0 ≤ x1, x2 ≤ 1.5}.

10

Page 13: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-6

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Solve the system of linear equations

0.7 x1 + 1725 x2 = 1739,

0.4352 x1 − 5.433 x2 = 3.271,

using

(a) Gaussian elimination with no pivoting

(b) Gaussian elimination with partial pivoting

(c) Gaussian elimination with scaled partial pivoting.

Compare the results obtained from each technique with the exact solution x1 =

20, x2 = 1 of the system. Show all intermediate matrices, scaling factors and mul-

tipliers.

2. Solve the system of linear equations

3.41 x1 + 1.23 x2 − 1.09 x3 = 4.72,

2.71 x1 + 2.14 x2 + 1.29 x3 = 3.10,

1.89 x1 − 1.91 x2 − 1.89 x3 = 2.91,

using

(a) Gaussian elimination with no pivoting

(b) Gaussian elimination with partial pivoting

(c) Gaussian elimination with scaled partial pivoting.

11

Page 14: NA-Tutorial-Booklet.pdf

Compare the results obtained from each technique with the exact solution of the sys-

tem.

3. Solve the system of linear equations

9.3746 x1 + 3.0416 x2 − 2.4371 x3 = 9.67685,

3.0416 x1 + 6.1832 x2 + 1.2163 x3 = 6.74135,

−2.4371 x1 + 1.2163 x2 + 8.4429 x3 = 2.3925,

using Gaussian elimination method with scaled partial pivoting.

Show all intermediate matrices, scaling factors and multipliers.

4. Solve the system of linear equations

x1 + x2 + 2x3 = −2,

−x1 + 2x3 = −1,

3x1 + 2x2 − x3 = 0,

by using Crout decomposition and Doolittle decomposition method.

5. Consider

A =

2 6 −4

6 17 −17

−4 −17 20

.

Determine directly the factorization A = LDLT , where D is diagonal and L is unit

lower triangular matrix.

6. Find the LU-factorization of the matrix

A =

3 0 1

0 −1 3

1 3 0

,

in which L is lower triangular and U is an unit upper triangular matrix.

7. Prove that the matrix

A =

0 1

1 1

does not have an LU-factorization.

12

Page 15: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-7

1. Are these matrices positive definite?

(i)

1 −1

−1 1

, (ii)

4 2 1

2 5 2

1 2 4

.

2. For what value(s) of α is this matrix positive definite?

A =

1 α α

α 1 α

α α 1

.

3. Find ‖X‖∞ and ‖X‖2 for the following vectors

(i)

[

3, −4, 0,3

2

]T

, (ii) [2, 1, −3, 4]T .

4. Find ‖ · ‖∞ for the following matrices

(i)

10 15

0 1

, (ii)

10 0

15 1

.

5. Compute condition numbers using norms ‖A‖1, ‖A‖2 and ‖A‖∞

(i)

α + 1 α

α α− 1

, (ii)

0 1

−2 0

, (iii)

s 1

1 1

.

6. Let A =

25 19

21 16

. Then find k∞(A) (condition number of A in maximum-norm).

13

Page 16: NA-Tutorial-Booklet.pdf

7. Let AX = b be any linear system. If A = A + E represents the perturbed coefficient

matrix, and X is the solution of A X = b, then prove that

‖X − X‖‖X‖

≤ k(A)

(‖E‖‖A‖

)

,

where k(A) is the condition number.

8. Prove that if ‖A‖ < 1 then

‖ (I − A)−1 ‖ ≥ 1

1 + ‖A‖ .

9. The linear system Ax = b given by

1 2

1.0001 2

x1

x2

=

3

3.0001

has the solution [1, 1]T . Change A slightly to

1 2

0.9999 2

and consider the linear

system

1 2

0.9999 2

x1

x2

=

3

3.0001

.

Compute the new solution using five-digit floating point arithmetic with rounding. Is

A ill-conditioned?

10. Do two iterations using Gauss-Seidel method with 5-digit floating-point arithmetic

with rounding to the following system of equations

4x1 − 10x2 + 5x3 = 32,

5x1 − 4x2 + 10x3 = 39,

10x1 + 5x2 − 4x3 = 17.

Starting vector X(0) = [ 1, −1, 1 ]T .

11. Solve the system of linear equations

3x1 + 6x2 + 2x3 = 0,

3x1 + 3x2 + 7x3 = 4,

3x1 − x2 + x3 = 1,

using Jacobi iteration method with starting X(0) = [1, 1, 1]T . Perform two iterations

using 5-digit floating-point arithmetic with chopping.

14

Page 17: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-8

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. (a) The values listed in the table provide the surface tension of mercury as a function

of temperature

Temperature (0c) 10 20 30 40 50

Surface Tension 488.55 485.48 480.36 475.23 470.11

Use Lagrange interpolating polynomial to find the surface tension of mercury at 150c.

2. Consider the function f(x) = ex. Construct the Lagrange form of the interpolating

polynomial for f passing through the points (−1, e−1), (0, e0) and (1, e1).

3. Find the interpolating polynomial for the data

x −4 −1 0 2 5

f(x) 1245 33 5 9 1335

and hence find the value of the polynomial at x = 1.

4. Find the interpolating polynomial P3(x) for the data

x −3 −2 0 1

f(x) 23 −10 4 −1

Now one more data f(2) = 18 is added to get the interpolating polynomial P4(x) =

P3(x) + g(x). Find g(x) and hence interpolate at x = −1.

5. Find the unknown α in the set of data points (1, 2), (5, 8), (7, 10), (8, α) and (10, 15).

6. For a function f , the divided differences are given by

15

Page 18: NA-Tutorial-Booklet.pdf

x f(x) First order Second order

x0 = 0.0 f [x0] =?

f [x0, x1] =?

x1 = 0.4 f [x1] =? f [x0, x1, x2] =507

f [x1, x2] = 10

x2 = 0.7 f [x2] = 6

Determine the missing entries in the table. Add f(0.9) = 1.8 to the table and construct

the interpolating polynomial of degree 3.

7. If f(x) = 12x, then prove that

f [α1, α2, α3, α4] = − 1

2 (α1α2α3α4).

8. Let

g(x) = f [x0, x1, x2, · · · , xk, x] .

Then prove that

g′′(x) = 2f [x0, x1, x2, · · · , xk, x, x, x] .

9. If

P4(x) = (x− 1)(x+ 2)(x− 2)(x+ 1),

then find the value of f [−2, −1, 1, 2, 3].

10. If function f(x) is a polynomial of degree ≤ n and is to be interpolated by a ploynomial

Pn(x) of degree n. Then find the error in interpolation.

16

Page 19: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-9

1. The values listed in the table provide the surface tension of mercury as a function of

temperature

Temperature (0c) 10 20 30 40 50

Surface Tension 488.55 485.48 480.36 475.23 470.11

Use Newton’s backward interpolating polynomial to find the surface tension of mercury

at 450c. Use 5-digit floating-point arithmetic with rounding.

2. (a) Construct the piecewise linear interpolating polynomial for the given data:

x −2 0 3 4 5 6

f(x) 3 1 2 4 1 5

3. What should be the minimum number of tabular points required so that the piecewise

linear interpolation for f(x) = cosx on [0, π] yields values correct upto 5 significant

digits.

4. Find the minimum number of equispaced tabular points required for piecewise quadratic

interpolation of the function

f(x) = e−3x +2

3(1 + x)−2 ,

on the interval [0, 3] so that the values of f are correct upto 4 decimal places.

5. We define the backward difference operator

∇yi = yi − yi−1.

Then find the value of ∇3yi.

17

Page 20: NA-Tutorial-Booklet.pdf

6. A car travelling along a straight road is clocked at a number of points. The data from

the observations are given in the following table, where the time is in seconds, the

distance is in feet, and the speed is in feet per second

Time 0 3 5 8 13

Distance 0 225 383 623 993

Speed 75 77 80 74 72

Use cubic spline to predict the position of the car and its speed when t = 10 seconds.

Use 5-digit floating point arithmetic with chopping.

7. Find f ′(x) corresponding to the data points (0, 1), (1, 1), (2, 10), (3, 40) and (4, 85) at

x = 1.5.

8. Compute the first and second order derivatives of the function y = f(x) at x = 1 and

x = 2 by Newton’s forward difference formula using the following table:

x 1 2 3 4 5 6

y 3.9183 4.5212 5.2535 6.1523 7.2498 8.5892

Use 5-digit floating point arithmetic with rounding.

9. The distance y(t) traversed in time t by a point moving in a straight line is given below:

t (sec) 0 0.01 0.02 0.03 0.04 0.05 0.06

y(t) 0.00 1.53 6.04 13.41 23.42 35.74 50.12

Find the approximate velocity dydt

and acceleration d2ydt2

at t = 0.01 using Newton’s

forward interpolation. Use 5-digit floating point arithmetic with chopping.

10. Fit a curve of the type y = aebx for the following data set:

x 77 100 185 239 285

y 2.4 3.4 7.0 1.1 19.6

Use 5-digit floating point arithmetic with rounding.

18

Page 21: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-10

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Use the composite Trapezoidal rule to approximate the following integrals

(i)

∫ 2

1

x ln(x) dx, (ii)

∫ 2

−2

x3 ex dx

with n = 4 equal parts.

2. Approximate∫ 2

0

x2 e−x2

dx

using h = 0.25,

(a) Use the composite Trapezoidal rule.

(b) Use the composite Simpson’s rule.

3. The Trapezoidal rule applied to∫ 2

0f(x) dx gives the value 4 and Simpson’s rule gives

the value 2. What is f(1)?

4. Determine the number of subintervals N so that the composite Trapezoidal rule give

the value of the integral∫ 1

0

1

1 + x2dx,

correct up to 4-decimal digits.

5. Use Simpson’s 13rd rule to approximate the integral

∫ 1

0

1

1 + xdx,

with 4 equal subintervals.

19

Page 22: NA-Tutorial-Booklet.pdf

6. Given the function f at the following values

x 1.8 2.0 2.2 2.4

f(x) 3.1213 4.4214 6.0424 8.0302

approximate∫ 2.4

1.8f(x) dx using Simpson’s 3

8th rule.

7. The quadrature formula

∫ 1

−1

f(x) dx = c0 f(−1) + c1 f(0) + c2 f(1)

is exact for all polynomial of degree less than or equal to 2. Determine c0, c1 and c2.

8. Find a, b and α in the integration rule

∫ 1

0

f(x) dx = a f(α) + bf(1),

so that it is exact for polynomial of as high degree as possible.

9. Determine values for the coefficients A0, A1 and A2 so that the quadrature formula

∫ 1

−1

f(x) dx = A0f

(

−1

2

)

+ A1f(0) + A2f

(

1

2

)

,

has degree of precision atleast 2.

10. Evaluate the integral∫ 4

1

xe2x

1 + x2dx,

by using 3-point Gauss-Legendre quadrature formula.

11. Use three-point Gauss-Legendre quadrature formula to evaluate the integral

∫ 3

2

cos 2x

1 + sin xdx.

20

Page 23: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-11

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Find the general solutions of the following difference equations

(a)

yn+2 − 2yn+1 + yn = 0.

(b)

yn+2 + yn+1 − 6yn = 0.

(c)

yn+2 + yn = 0.

2. Use Euler’s method to find the approximate solution y(0.5) of the initial value problem

y′ = te3t − 2y,

y(0) = 0 with h = 0.5.

The exact solution is given by

y(t) =1

5te3t − 1

25e3t +

1

25e−2t.

Compute the relative error between the exact solution and the approximate solution.

3. Use Euler’s method to find the approximate solution y(0.25) of the initial value problem

y′ = cos 2t+ sin 3t,

y(0) = 1 with h = 0.25.

The exact solution is given by

y(t) =1

2sin 2t− 1

3cos 3t+

4

3.

Compute the relative error between the exact solution and the approximate solution.

21

Page 24: NA-Tutorial-Booklet.pdf

4. Use Taylor’s method of order 2 to find the approximate value of y(1.1), y(1.2) and

y(1.3) as a solution of the equation

dy

dx= x2 + y3

with y(1) = 2 and spacing h = 0.1.

5. Use modified Euler and second-order Taylor’s method to find x(1.5) of the following

initial value problem (IVP)

dx

dt= 1 +

x

t, 1 ≤ t ≤ 2

with

x(1) = 1, step size h = 0.5.

6. Find the approximate solution y(0.1) of the initial value problem

dy

dx= 2y + x,

y(0) = 1.75,

by using forward Euler, backward Euler and modified Euler method with step size

h = 0.1. Hence, compare the solutions obtained with the exact solution

y = 2e2x − x

2− 1

4.

22

Page 25: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-12

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Find the approximate solution y(0.2) of the initial value problem

y′ + 2xy2 = 0,

y(0) = 1 with h = 0.2

using second-order Runge-Kutta method.

2. Find the approximate solution x(1.1) of the initial value problem

dx

dt= 3t− x

t,

x(1) = 2 with h = 0.1

using second-order Runge-Kutta method. Compare the approximate solution with the

exact solution

x(t) = t2 +1

t.

3. Compute the approximate solution α(0.1) and β(0.1) of the catalyzed reaction problem

α′ = −α(1− β + α),

β ′ = −β(β − α),

α(0) = 1, β(0) = 1,

using 4th order Runge-Kutta method with step size h = 0.1.

4. Consider the mass-spring-damper system with nonlinear damping

u′1 = u2, u1(0) = 0.75,

u′2 = ǫ

(

1− u21

)

u2 − u1, u2(0) = 0,

where ǫ = 4. Compute u1(0.5) and u2(0.5) by using Runge-Kutta 4th order method

with h = 0.5.

23

Page 26: NA-Tutorial-Booklet.pdf

5. Use 4th order Runge-Kutta (RK) method to find the approximate value y(0.1) of the

following initial value problem (IVP)

y′′ − 2y′ + 2y = e2t sin t,

y(0) = −0.4, y′(0) = −0.6.

6. Use two-step Adams-Bashforth method to approximate the solution x(0.2) of the initial

value problem

dx

dt= t x3 − x,

x(0) = 1 with h = 0.1.

Use any second-order one-step method to determine x(0.1).

7. Find y(1.4) by Adams-Moulton 4th order predictor-corrector pair with modifier as a

solution of

y′ = x3 + x y,

y(1) = 2, y(1.1) = 1.6, y(1.2) = 0.34, and y(1.3) = 0.594 with spacing h = 0.1.

24

Page 27: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-13

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Find the approximate solution of the boundary value problem (BVP)

y′′ + xy′ + y = x2,

y(0) = 0, y(1) = 1,

using the finite difference method. Use uniform partition of [0, 1] with N = 4 sub

intervals and replace y′ and y′′ by second order accuracy finite differences.

2. Find the approximate solution of the boundary value problem (BVP)

y′′ = −3y′ + 2y + 2x+ 3, 0 < x < 1

y(0) = 2, y(1) = 1,

using the finite difference method. Use uniform partition of [0, 1] with N = 4 sub

intervals and replace y′ and y′′ by second order accuracy finite differences.

3. Use central finite difference method to solve the following boundary value problem

(BVP)

y′′ + y = 0, 0 < x <π

4,

y(0) = 1, y(π

4

)

= 1

with h = π16. Compare the approximate solution with the exact solution

y(x) = cosx+(√

2− 1)

sin x.

4. Use central finite difference method to solve the following boundary value problem

(BVP)

u′′ − xu = 0, 0 ≤ x < 1,

u(0) + u′(0) = 1, u(1) = 1

25

Page 28: NA-Tutorial-Booklet.pdf

with h = 13. Does the method give unique solution for any 0 < h < 1. Justify your

answer.

5. Use second order finite difference method to solve the following boundary value problem

(BVP)d2y

dx2+

y

4= 0, 0 ≤ x ≤ π

with boundary conditions

y′(0) = 0, y′(π) = 1.

Use uniform partition of [0, π] with two subintervals.

6. The boundary value problem

y′′ = 4(y − x), 0 < x < 1,

y(0) = 0, y(1) = 2, with step sixe h = 0.5

has the solution y(x) = e2(e2x−e−2x)

(e4−1)+ x. Use the shooting method to approximate the

solution y(0.5) and compare the approximate solution with the exact solution.

7. The boundary value problem

y′′ = y′ + 2y + cos x, 0 < x <π

2,

y(0) = −0.3, y(π

2

)

= −0.1, with step sixe h =π

4

has the solution y(x) = − 110(sin x+ 3 cosx). Use the shooting method to approximate

the solution y(

π4

)

and compare the approximate solution with the exact solution.

26

Page 29: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla Goa Campus

Second Semester 2011-2012

Numerical Analysis

(AAOC C341)

Tutorial Sheet-14

Note: All the problems use 5-digit floating point arithmetic with rounding.

1. Let A be an n × n matrix with eigenvalues λ1, λ2, · · · , λn that satisfy the relations

|λ1| > |λ2| ≥ |λ3| ≥ · · · |λn|. Then prove that the power method converges linearly.

2. Perform three iterations to find the numerically largest eigenvalue and corresponding

eigenvector of the matrix

1 −1 0

−2 4 −2

0 −1 2

,

using power method. Use ξ(0) = [−1, 2, 1]T .

3. Perform four iterations of the Power method to find numerically largest eigenvalue and

corresponding eigenvector of

A =

1 −0.4 −0.6

−0.4 1 0.4

0.6 0.4 1

and ξ(0) =[

1, 1, 1]T

.

4. Compute the largest eigenvalue and its corresponding eigenvector for the matrix

A =

7 6 −3

−12 −20 24

−6 −12 16

.

using inverse power method. Use ξ(0) =[

1, 1, 1]T

.

27

Page 30: NA-Tutorial-Booklet.pdf

5. Use the QR algorithm to determine all the eigenvalues of the matrix

A =

2 −1 0

−1 −1 −2

0 −2 3

.

28

Page 31: NA-Tutorial-Booklet.pdf

Numerical Analysis(AAOC C341)

(Model Test Papers)

29

Page 32: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla, GOA Campus

FIRST SEMESTER 2011-2012

18th September, 2011

Test-1 (Closed Book)

Course Title: NUMERICAL ANALYSIS Max. Marks: 75

Course No: AAOC C341 Time: 1 hour

Instructions

Answer all the questions. There are 25 questions, each worth 3 marks. Round

the circle in your choice of the correct answer for multiple questions and write

the correct answer by filling up the blanks.

Answer only in the given blank space. No rough work in anywhere of this sheet will be allowed.

NAME Id No.

Section No. Instructor Name:

Note: Use 5-digit floating point arithmetic with rounding whereever nec-

essary.

1. Find intervals that contain a solution to the equation x3 − 2x2 − 4x+ 3 = 0.

(A) (−2,−2/3), (0, 1), (2, 5/2) (B) (−2,−2/3), (−1, 0), (2, 4)

(C) (−2,−2/3), (0, 1), (2, 4) (D) none of these.

2. Use bisection method to determine the number of iterations necessary to solve

x3+x−4 = 0 with an accuracy 10−3 on the interval [1, 4].

3. Consider a variation of Newton’s method in which only one derivative is needed, that

is pn+1 = pn − f(pn)f ′(x0)

, where x0 is a fixed constant. Find α such that en+1 = λeαn.

(A) α = 2 (B) α = 3 (C) α does not exist

(D) none of these.

4. Find a and b such that the order of the convergence is quadratic while finding a root

α, using fixed point iteration with the iterative function g(x) = ax+ bx2 + 1.

30

Page 33: NA-Tutorial-Booklet.pdf

5. If Newton’s method is applied to the equation 1x− a = 0 then resulting iteration

function is

(A) g(x) = x(1 − ax) (B) g(x) = x(2 − a) (C) g(x) = 2(x − ax)

(D) none of these.

6. Suppose the sequence pn = 12n

converges linearly to p = 0. Find the minimum number

of terms required to have |pn − p| < 5× 10−2.

(A) n = 10 (B) n = 12 (C) n = 5 (D) none of these.

7. Find one iteration of Muller’s method to find a root of the equation 4x3−3x2+2x−1 =

0. The starting initial values are given x = 0, 0.6, 1

8. The function f(x) = ex

xwill be ill-conditioned for

(A) |x − 1| = 0.00001 (B) |x − 1| = 5 (C) All values of x

(D) none of these.

9. Find one iteration of Newton’s method to find a root of system of equations:

x2 − x+ y = 0.5, x2 − 5xy − y = 0.

Use X(0) = [1, 1]T .

10. The fixed points of the iterative function g(x) where g(x) = x3+3xα3x2+α

11. Find an iteration p1 to find a root of the equation f(x) = 2ex sin x − x = 0 using

Newton’s method with p0 = 0.5.

12. The condition number for f(x) = xα where α > 0 is

(A) 1α

(B) does not exist (C) α2 (D) none of these.

13. The asymptotic error constant λ in the secant method is:

14. One wants to compute the positive root of the equation x = a− b x2 (a, b > 0) by using

the iterative method xn+1 = a− b x2n. What is the condition for convergence?

(A) ab > 3/4 (B) a + b = 0 (C) ab < 4/3

(D) none of these.

31

Page 34: NA-Tutorial-Booklet.pdf

15. Find the solution of the system of linear algebraic equations using Gaussian elimination

with partial pivoting

0.03 x1 + 58.9 x2 = 59.2, 5.31 x1 − 6.10 x2 = 47.0.

16. Suppose p∗ approximates p = 150 with relative error at most 10−3 then the largest

interval in which p∗ must lie

(A) (149.85, 150.51) (B) (148.85, 150.15) (C) (149.85, 150.15)

(D) none of these.

17. The equation f(x) = x2 − 2 = 0 has a zero on the interval [1, 2]. Choose p0 = 1 and

p1 = 2 then find a root correct upto 2-significant digits using secant method:

18. The most accurate value of f(x) = cos2 x− sin2 x at x = 0.78530 is

(A) 0.00019633 (B) 0.99999 (C) 0.00020 (D) none of these.

19. Do one iteration of the method of false position to find the root of f(x) = 3x4 − 4x3 +

3x− 2 = 0 on the interval (0, 1.5):

20. Evaluate the polynomial f(x) = 1.1071 x3+0.3129 x2−0.0172 x+1.1075, for x = 0.1234

in nested form.

21. One root of the quadratic equation x2 + 62.10x + 1 = 0 is x = −62.085, then other

root is:

22. The most accurate value of e−x at x = 0.99999 (under the freedom that any first degree

Taylor’s polynomial can be used) is:

23. Let the equation f(x) = 0 that has a root of multiplicity 5. To obtain quadratic

convergence which iteration formula has to be used:

32

Page 35: NA-Tutorial-Booklet.pdf

(A) xn+1 = xn−5 f ′(xn)f(xn)

(B) xn+1 = xn−2 f(xn)f ′(xn)

(C) xn+1 = 5xn− f(xn)f ′(xn)

(D) none of these.

24. The relative propagated error in the product√2× π is nearly equal to

(A) 1.1928 × 10−7 (B) 1.1928 × 10−6 (C) 1.1928 × 10−5

(D) none of these.

25. State the intermediate value theorem (IVT):

**********THE END**********

33

Page 36: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla, GOA Campus

FIRST SEMESTER 2011-2012

23rd October, 2011

Test-2 (Closed Book)

Course Title: NUMERICAL ANALYSIS Max. Marks: 75

Course No: AAOC C341 Time: 1 hour

Instructions

(i) Answer all the four questions. Start a new question in a new page and answer

all its parts in the same place.

(ii) Write all the steps clearly and give explanations for the complete credit.

(iii) Make an index on the front page of the main answer sheet. Incomplete

index costs you 5 marks.

NOTE: Use 5-digit floating point arithmetic with rounding wherever nec-

essary.

1. (a) Let xe be the solution of Ax = b, assuming that det(A) 6= 0 and x be the solution

of Ax = b+ δb. Then prove that (5 + 12 marks)

‖xe − x‖‖xe‖

≤ K(A)‖δb‖‖b‖ ,

where K(A) is the condition number of matrix A.

(b) Solve the following system of linear equations by Gauss-Seidel iterative method.

6x+ 3y + 12z = 36,

4x+ 11y − z = 33,

8x− 3y + 2z = 20.

Use (x(0), y(0), z(0)) = (0, 0, 0) and perform two iterations.

2. (a) For what postive values of α and β, the given matrix (3 + 3 + 3 + 12 marks)

A =

3 2 β

α 5 β

2 1 α

is strictly diagonally dominant?

34

Page 37: NA-Tutorial-Booklet.pdf

(b) Suppose A and B are symmetric positive definite n × n matrices. Is A + B sym-

metric positive definite? Justify your answer.

(c) Find the minimum value of condition number for any n× n matrix.

(d) Use Doolittle decomposition to solve the following system of linear equations

−3x+ 2y − z = 7,

6x+ 8y + z = 3,

4x+ 2y + 7z = −33.

3. (a) Suppose that f is continuous and has continuous first and second derivatives on the

interval [x0, x1]. Then prove the following bound on the error due to linear interpolation

of f (8 + 9 marks)

|f(x)− P1(x)| ≤h2

8max

x∈[x0,x1]|f ′′(x)|, where h = x1 − x0.

(b) A bus traveling along a straight road is clocked at a number of points. The data

from the observations are given in the following table, where the time is in seconds and

the distance is in feet:

Time 0 3 5 8 13

Distance 0 225 383 623 993

Construct the piecewise linear interpolation and hence predicit the position of the bus

when t = 10 seconds.

4. (a) The table below gives the values of tan x: (10 + 10 marks)

x 0.10 0.15 0.20 0.25 0.30

y = tanx 0.1003 0.1511 0.2027 0.2553 0.3093

Use Newton’s forward interpolating polynomial to find the value of tan(0.12).

(b) Fit a curve of the type y = a bx for the following data:

x 4 6 8 10 12

y 13.72 12.90 12.01 11.14 10.31

using method of least squares.

**********THE END**********

35

Page 38: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla, GOA Campus

FIRST SEMESTER 2011-2012

12th December, 2011

Comprehensive Examination (PART-A)

(Closed Book)

Course Title: NUMERICAL ANALYSIS Max. Marks: 60

Course No: AAOC C341 Time: 1 hour 15 min

Instructions

(i) Answer all the questions. There are 20 questions, each worth 3 marks.

(ii) Round the circle in your choice of the correct answer for multiple questions

and write the correct answer by filling up the blanks.

Answer only in the given blank space. No rough work in anywhere of this sheet will be allowed.

NAME: Id No.

Section No. Instructor Name:

Note: Use 5-digit floating point arithmetic with rounding wherever nec-

essary.

1. Evaluate the polynomial

f(x) = 2.752 x3 − 2.957 x2 + 3.273 x− 4.765,

in nested form at x = 1.077.

2. The following difference equation is

un+2 + un+1 + un − 3 = 0.

(A) homogeneous with order 2 (B) inhomogeneous with order 1

(C) inhomogeneous with order 3 (D) none of these

3. The convergence of the sequence generated by the formula

pn+1 =p3n + 3pna

3p2n + a,

toward√a is third order. Then the asymptotic error constant is:

36

Page 39: NA-Tutorial-Booklet.pdf

4. Consider the bisection method starting with the interval [1.5, 3.5]. What is the

maximum distance possible between the root p and the mid point of this interval?

(A) 2−n (B) 2−n+2 (C) 2n+1 (D) none of these

5. The l∞-norm of the vector X , where

X =

[

4

(k + 1),

2

k2, k2 e−k

]T

,

for a fixed positive integer k is:

6. An interpolating polynomial P (x) of degree at most 2 such that P (0) = 1, P (1) = 1

and P (2) = 1 is

(A) P (x) = 2x2 − 2x + 1 (B) P (x) = x2 − 2x + 1 (C) P (x) = 1

(D) none of these

7. How many equal subintervals would be required to approximate∫ 1

04

1+x2 dx to within

0.0001 by the composite Trapezoidal rule?

8. Use Newton’s method to approximate 3√9. Start with p0 = 2 then find p1:

9. Use first order Taylor’s method to find the approximate solution x(1.1) of the initial

value problem (IVP):

x′ = (t x)3 −(x

t

)2

,

x(1) = 0.5, h = 0.1

x(1.1) =

10. Consider the table:xi 1 2 3 4 5

ui = u(xi) 2 5 10 20 30where i = 1, · · · , 5

then the value of ∇2u4 is:

11. The Trapezoidal rule applied to∫ 2

0f(x) dx gives the value 8 and 1

3rd Simpson’s rule

gives the value 6. What is f(1)?

(A) 2.55 (B) 3.0 (C) 2.0 (D) none of these

12. Let g(x) = f [x0, x1, x2, x] then g′(x) =

37

Page 40: NA-Tutorial-Booklet.pdf

13. Perform one iteration of Newton’s method for the system

4x21 − x2

2 = 0,

4x1x22 − x1 = 1

with[

x(0)1 , x

(0)2

]

= [0, 1].

14. Determine the LU -factorization of the matrix

1 5

3 16

in which both L and U have

unit diagonal elements.

15. For what value(s) of α, the integration formula

∫ 1

−1

f(x) dx ≈ f(α) + f(−α),

is exact for all quadratic polynomials?:

16. Use 2nd-order Runge-Kutta method to find the approximate solution x(2.5) of the

initial value problem (IVP)

x′(t) = t (x+ 1)2,

x(2) = 1/2, h = 0.5.

x(2.5) =

17. Let A and B be n×n matrices and let k∞(A) is the condition number of A in l∞-norm,

then

(A) k∞(AB) = k∞(A) k∞(B) (B) k∞(AB) ≥ k∞(A) k∞(B)

(C) k∞(AB) ≤ k∞(A) k∞(B) (D) none of these.

18. Find the first approximation for the eigenvector corresponding to the dominant eigen-

value of the matrix using Power method:

3 2 −2

−3 −1 3

1 2 0

, ξ(0) =

0.1

0.2

0.3

:

38

Page 41: NA-Tutorial-Booklet.pdf

19. Find l2-norm of the matrixA, where A =

2 −1

−1 2

.

20. Which of the following method has order of convergence 1.

(A) Secant method (B) Method of false position (C) Newton’s method

(D) Muller’s method

***************THE END**************

39

Page 42: NA-Tutorial-Booklet.pdf

Birla Institute of Technology and Science, Pilani-K. K. Birla, GOA Campus

FIRST SEMESTER 2011-2012

12th December, 2011

Comprehensive Examination: Part-B

(Closed Book)

Course Title: NUMERICAL ANALYSIS Max. Marks: 70

Course No: AAOC C341 Time: 1 hour 45 min

Instructions

(i) Answer all the four questions. Start a new question in a new page and answer

all its parts in the same place.

(ii) Write all the steps clearly and give explanations for the complete credit.

(iii) Make an index on the front page of the main answer sheet. Incomplete

index costs you 5 marks.

Note: Use 5-digit floating point arithmetic with rounding wherever nec-

essary.

1. (a) The distance y(t) traversed in time t by a point moving in a straight line is given

below: (10 + 8 M)

t (sec) 0 0.01 0.02 0.03 0.04 0.05 0.06

y(t) 0.00 1.53 6.04 13.41 23.42 35.74 50.12

Find an approximate velocity at t = 0.015 by using Newton’s forward interpolation.

(b) Use Crout decomposition to solve the following system of linear equations

x1 + x2 + 2x3 = −2,

−x1 + 2x3 = −1,

3x1 + 2x2 − x3 = 0.

2. (a) Find the values of α, β and γ such that the quadrature rule (10 + 8 M)

∫ 1

0

f(x)√

x(1− x)dx = α f(0) + β f

(

1

2

)

+ γ f(1),

40

Page 43: NA-Tutorial-Booklet.pdf

is exact for polynomials of highest possible degree and use the formula to evaluate

∫ 1

0

1√x− x3

dx.

(b) Derive the 2-point Gaussian-Legendre quadrature formula and use it to find the

approximate value of the integral

∫ 1

0

x2 e−x dx.

3. (a) Neglecting the effect of air resistance, the motion of a pendulum can be modeled

by the second-order initial value problem (IVP) (12 + 10 M)

Lθ′′ + g sin θ = 0,

θ(0) = θ0, θ′(0) = 0,

where θ denotes the angle which the pendulum rod makes with the vertical, L is the

length of the pendulum rod and g is the acceleration due to gravity. Take L = 1 meter,

g = 9.8m/s2 and θ0 = 1.5 radians then compute θ(0.5) by using 4th order Runge-Kutta

method with h = 0.5.

(b) Find y(0.4) by Adams-Bashforth-Moulton 4th order predictor-corrector pair with

modifier as a solution of

dy

dx= x y +

√y,

y(0) = 1,

with y(0.1) = 1.1079, y(0.2) = 1.2337, y(0.3) = 1.3807 and spacing h = 0.1.

4. Use second order finite difference method to solve the following boundary value problem

(BVP): (12 M)

y′′ =2y − 4

(1 + x)2, 0 < x ≤ 1,

y(0) = 0, y(1)− 2 y′(1) = 0.

Use uniform partition of [0, 1] with two subintervals.

*************The End*************

41

Page 44: NA-Tutorial-Booklet.pdf

Numerical Analysis(AAOC C341)Formula Sheet

1. Secant Method:

pn+1 = pn − f(pn)pn − pn−1

f(pn)− f(pn−1), n = 1, 2, 3, · · · ,

2. Newton’s Method:

pn+1 = pn −f(pn)

f ′(pn), n = 0, 1, 2, · · · ,

3. Newton’s Method for Multiple Roots:

xn+1 = xn −mf(xn)

f ′(xn), n = 0, 1, 2, · · · , for f(x) = (x− r)m h(x), h(r) 6= 0.

4. Fixed Point Iteration:

pn+1 = g (pn) , n = 0, 1, 2, · · · .

5. Newton’s Method for system of equations: f1(x) = 0, f2(x) = 0, · · · , fn(x) = 0:

x(n+1) = x(n)+∆x, n = 0, 1, 2, · · · , where

∂f1∂x1

∂f1∂x2

· · · ∂f1∂xn

∂f2∂x1

∂f2∂x2

· · · ∂f2∂xn

......

. . ....

∂fn∂x1

∂fn∂x2

· · · ∂fn∂xn

∆x = −

f1(x)

f2(x)...

fn(x)

.

6. Norms for x ∈ ℜn:

‖x‖1 =n∑

j=1

|xj |, ‖x‖∞ =n

maxj=1

|xj |, ‖x‖2 =(

n∑

j=1

x2j

)1/2

.

7. Norms for A ∈ ℜn×m:

‖A‖1 =m

maxj=1

n∑

i=1

|aij|, ‖A‖∞ =n

maxi=1

m∑

j=1

|aij|.

8. The Frobenius norm for A ∈ ℜn×m is defined as

‖A‖f =

(

n∑

i=1

m∑

j=1

a2ij

)1/2

.

42

Page 45: NA-Tutorial-Booklet.pdf

9. Condition Number:

k(A) = ‖A‖ ‖A−1‖.

10. Lagrange Interpolation for points (xi, fi), i = 0, 1, 2, · · · , n;

li(x) = Πnj=0, j 6=i

x− xj

xi − xj

, pn(x) =n∑

i=0

li(x) fi.

11. Divided differences: example of f [x0, x1, x2] =f [x0,x1]−f [x1,x2]

x0−x2

:

pn(x) = f(x0) + f [x0, x1](x− x0) + f [x0, x1, x2](x− x0)(x− x1) + · · ·

+ f [x0, x1, x2, · · · , xn] (x− x0) (x− x1) (x− x2) · · · (x− xn−1).

12. Interpolation Error for pn(x):

E(x) =f (n+1)(ξ)

(n+ 1)!(x− x0) (x− x1) · · · (x− xn).

13.

u′(x) ≈ ∆u(x)

h=

u(x+ h)− u(x)

h, (forward difference formula)

u′(x) ≈ ∇u(x)

h=

u(x)− u(x− h)

h, (backward difference formula)

u′(x) ≈ δu(x)

2h=

u(x+ h)− u(x− h)

2h, (central difference formula)

14. Central difference formula:

u′′(x) =u(x+ h)− 2u(x) + u(x− h)

h2+O(h2), h > 0.

15. Trapezoidal rule:

∫ x1

x0

f(x) dx =h

2[f(x0) + f(x1)]−

h3

12f ′′(ξ), where x0 < ξ < x1.

16. Simpson’s 13rd rule:

∫ x2

x0

f(x) dx =h

3[f(x0) + 4f(x1) + f(x2)]−

h5

90f (4)(ξ), where x0 < ξ < x2.

17. Simpson’s 38th rule:

∫ x3

x0

f(x) dx =3h

8[f(x0) + 3f(x1) + 3f(x2) + f(x3)]−

3h5

80f (4)(ξ), where x0 < ξ < x3.

43

Page 46: NA-Tutorial-Booklet.pdf

18. Gaussian Quadrature (n-point) rule:

∫ 1

−1

f(x) dx ≈n∑

j=1

wj f(ξj),

where wj are weights and ξj are Gaussian points.

19. Single step methods to solve the initial value problem (IVP):

dy

dx= f(x, y(x)),

y(x0) = y0.

(a) Forward Euler’s method:

yn+1 = yn + h f(xn, yn), n = 0, 1, 2, · · ·

(b) Backward Euler’s method:

yn+1 = yn + h f(xn+1, yn+1), n = 0, 1, 2, · · ·

(c) Modified Euler’s method:

yn+1 = yn +h

2

[

f(xn, yn) + f(xn+1, y∗n+1)

]

, n = 0, 1, 2, · · · ,

here y∗n+1 = yn + h f(xn, yn).

(d) A second-order Runge-Kutta Method:

yn+1 = yn +h

2(k1 + k2) , n = 0, 1, 2, · · ·

where k1 = f(xn, yn) and k2 = f(xn + h, yn + h k1).

(e) A fourth-order Runge-Kutta method:

yn+1 = yn +h

6(k1 + 2 k2 + 2 k3 + k4) , n = 0, 1, 2, · · ·

where

k1 = f(xn, yn), k2 = f(xn +h

2, yn +

k12),

k3 = f(xn +h

2, yn +

k22), k4 = f(xn + h, yn + k3).

20. Multi step methods to solve the initial value problem (IVP):

dy

dx= f(x, y(x)),

y(x0) = y0.

44

Page 47: NA-Tutorial-Booklet.pdf

(a) Two step Adams-Bashforth method:

yn+1 = yn +h

2[3f(xn, yn)− f(xn−1, yn−1)] , n = 1, 2, 3, · · ·

(b) Four step Adams-Bashforth method:

yn+1 = yn+h

24[55f(xn, yn)− 59f(xn−1, yn−1) + 37f(xn−2, yn−2)− 9f(xn−3, yn−3)] ,

where n = 3, 4, 5, · · ·

(c) Three step Adams-Moulton method:

yn+1 = yn +h

24[9f(xn+1, yn+1) + 19f(xn, yn)− 5f(xn−1, yn−1) + f(xn−2, yn−2)] ,

where n = 2, 3, 4, · · ·

(d) Adams-Moulton Predictor-Corrector formula:

y∗n+1 = yn +h

24[55f(xn, yn)− 59f(xn−1, yn−1) + 37f(xn−2, yn−2)− 9f(xn−3, yn−3)] ,

yn+1 = yn +h

24

[

9f(xn+1, y∗n+1) + 19f(xn, yn)− 5f(xn−1, yn−1) + f(xn−2, yn−2)

]

.

45

Page 48: NA-Tutorial-Booklet.pdf

Bibliography

[1] R. L. Burden and J. D. Faires, Numerical Analysis; Theory and Applications, India

Edition Cengage Learning (2010).

[2] Brian Bradie, A friendly introduction to Numerical Analysis, Pearson Education, 2007.

[3] S. D. Conte and Carl de Boor, Elementary Numerical Analysis: An Algorithmic Ap-

proach, International Series in Pure and Applied Mathematics, 3rd Edition, 1980.

[4] Curtis F. Gerald, Patrick O. Wheatley, Applied Numerical Analysis, Pearson Education,

7th Edn., 2009.

[5] Joe D. Hoffman, Numerical Methods for Engineers and Scientists, CRC Press, Second

Edition, 2010.

[6] Kendall E Atkinson, An Introduction to Numerical Analysis, John Wiley & Sons, 2001.

[7] Srimanta Pal, Numerical Methods Principles, Analyses and Algorithms, Oxford Univer-

sity Press, 2009.

[8] Saumyen Guha and Rajesh Srivastava, Numerical Methods for Engineering and Science,

Oxford University Press, 2010.

[9] Steven C Chapra, Applied Numerical Methods with MATLAB for Engineers and Scien-

tists, Tata McGraw-Hill, Second Edition, 2007.

[10] Victor S. Ryaben’kii and Semyon V. Tsynkov, A theoretical Introduction to Numerical

Analysis, Chapman & Hall/CRC, 2007.

46

Page 49: NA-Tutorial-Booklet.pdf

1

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI-K. K. Birla GOA CAMPUS

INSTRUCTION DIVISION SECOND SEMESTER 2011-2012

Course Handout (Part II) Date: 06/01/2012

In addition to part I (General Handout for all courses appended to the time table) this portion gives further specific details regarding the course.

Course No. : AAOC C341 Course Title : Numerical Analysis Instructor-in-charge : P. DHANUMJAYA Instructors : Sangeeta Jaiswal, Muslim, Balchand Prajapati, Samanta Gauranga

1. Scope and Objective of the Course: This course enables one to devise algorithms for numerical solutions of different mathematical problems and also discuss the error analysis of different algorithms. 2. Text Books: T1. Numerical Analysis; Theory and Applications, R. L. Burden and J. D. Faires, Cengage Learning, India Edition (2010). T2. Applied Numerical Analysis, Curtis F. Gerald, Patrick O. Wheatley, Pearson Education, 7th Edn., 2009.

3. Reference Books: R1. A friendly introduction to Numerical Analysis, Brian Bradie, Pearson Education, 2007. R2. An Introduction to Numerical Analysis, Kendall E Atkinson, John Wiley & Sons, 2001.

R3. Numerical Methods Principles, Analyses and Algorithms, Srimanta Pal, Oxford University Press, 2009. 4. Course Plan:

Lect. No. Learning Objective Topics to be Covered (Refer to T1, T2)

1-3 To understand the potential and pitfall of the numerical computation.

Computer arithmetic, Kinds of Errors in Numerical Computation, Significant digits, Error bounds and Evaluation of polynomials.

4-10 To find the roots of nonlinear equations and understand the relative strengths and weaknesses of each method.

Bisection method, Fixed-point iteration method, Newton’s method, Secant method, False–position method, Muller’s method, Newton’s method for multiple roots, Order of convergences of all the above methods. Newton’s method and fixed-point iteration method for the system of non-linear equations.

11-16

To solve the system of linear algebraic equations by using direct methods and iterative methods. Compute the determinant of a matrix, matrix inverse and understand the relative strengths and weakness of each method.

The Gaussian elimination method, Pathology in linear systems-singular matrices, Determinants and matrix inversions, Doolittle and Crout decompositions, Tridiagonal and positive definite matrices, Norms, Condition numbers and errors in solutions; Iterative methods: Jacobi, Gauss-Seidel and SOR Methods.

Page 50: NA-Tutorial-Booklet.pdf

2

17-22 To construct an interpolating polynomial and evaluate at unknown points

Lagrange interpolation, Existence and uniqueness of interpolating polynomial, Divided differences, Newton's forward and backward interpolations, Errors of interpolations, Piecewise linear, Piecewise quadratic interpolations, Cubic spline construction and Least-Square Regression.

23-29

To compute numerical derivatives and integrations using discrete data points and learn how to integrate functions containing singularities

Numerical differentiation, Newton-Cotes integration formulae, Composite rules, Error terms for Newton-Cotes formulae and composite rules, Method of undetermined coefficients, Two point and Three point Gaussian-Legendre quadrature rules.

30-36

To compute the numerical solution of initial value problems (IVPs)

Difference Equations, Forward Euler, Backward Euler and Modified Euler methods, Taylor Series methods, 2nd order and 4th order Runge-Kutta methods, System of ODEs and Higher order ODEs. Multistep methods: Adams-Bashforth methods, Adams-Moulton methods, Adams-Moulton Predictor-Corrector Method.

37-39 To solve two point boundary value problems (BVP) Finite difference methods and Shooting methods

40-42 Eigenvalues and eigenvectors of matrices Power method, Inverse power method, QR methods of finding eigenvalues and eigenvectors of matrices.

5. Self Learning Component (SLC):

(i) Implementation of Bisection, Secant, False-position, Newton's method, Fixed-Point method and verifying order of convergence of each method by using MATLAB.

(ii) Implementation of Gaussian elimination method and iterative methods (Jacobi, Gauss-Seidel and SOR methods) using MATLAB.

(iii) Finding numerical integration using different quadrature rules. (iv) Solving initial value problems (IVPs) and boundary value problems (BVPs) using MATLAB.

6. Evaluation Scheme:

EC No. Evaluation Component

Duration

Weightage (%) Date, Time Remarks

1 Test 1 60 Min. 25 22/02/2012, 8.30-9.30 AM CB 2 Test 2 60 Min. 25 30/03/2012, 8.30-9.30 AM CB

3 Tutorial Test/Quiz/

Self Learning Component/ Assignments/Lab Exam

*** 10 ***

4 Comprehensive Exam 3 Hours 40 03/05/2012, 9:00-12:00 Noon CB

*** To be announced latter. 7. Problems: Students are strongly advised to workout all the problems in the text-books (T1, T2) and do similar problems from the reference books (R1, R2, R3, R4). It is also strongly recommended that the students should implement all the algorithms on computers to get a better understanding of the subject.

8. Chamber Consultation Hours: To be announced by the respective instructor.

9. Make-up: Make up for any component of evaluation will be given only in the genuine cases.

10. Notices: All the notices regarding this course will be put up only in the course ftp. Instructor-In-Charge

AAOC C341

Page 51: NA-Tutorial-Booklet.pdf

Numerical Analysis(AAOC C341)

Important Dates

S. No Evaluation Component Date Time

1 Test-1 22-02-2012 8:30 - 9:30 AM

2 Test-2 30-03-2012 8:30 - 9:30 AM

3 Comprehensive Exam 03-05-2012 9:00 - 12:00 Noon

47