• No results found

assigments

N/A
N/A
Protected

Academic year: 2021

Share "assigments"

Copied!
12
0
0

Loading.... (view fulltext now)

Full text

(1)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 11 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Mathematical Preliminaries

Mathematical Preliminaries

I.

I. Applications of Intermediate-Value TheoremApplications of Intermediate-Value Theorem 1.

1. Show that the following equatShow that the following equations have atleions have atleast one ast one solutisolution in on in the intervthe interval [0al [0,, 1]1] (a) (a) xx1010+ 5+ 5xx55

1 1 = = 0 0 ((bb) ) 22xx66

55xx44+ 2 = 0 + 2 = 0 (c)(c) ee22xx

sinsin

��

ππ 2 2xx



2 = 2 = 00 (d) tan (d) tan

��

ππ 2

2xx



1122 = 0 (e) sin= 0 (e) sin xx ++ xx22 = = 1 1 ((aa) ) ((xx

1)tan1)tan

��

xx

π π

20

20



++ xx22tanh(tanh(πxπx) ) = 0= 0

2.

2. Show thShow that the equationat the equation f f ((xx) ) == xx, where, where f  f ((xx) = sin) = sin

πxπx + 1+ 1 22

, , xx

[[

11,, 1]1] has atleast one solution in [

has atleast one solution in [

11,, 1].1]. 3. Let

3. Let I I  = [0= [0,, 1] be 1] be the closed unit the closed unit inteintervrval. Supposeal. Suppose f f  is a continuous function fromis a continuous function from I I  ontoonto I I . Prove. Prove that

that f f ((xx) ) == xx for at least onefor at least one xx

I I .. 4. Let

4. Let f f ((xx) be continuous on [) be continuous on [a,a, bb], let], let xx11,,

·· ·· ··

,, xxnn be points in [be points in [a,a, bb], and let], and let gg11,,

·· ·· ··

,, ggnn be realbe real

numbers all of same sign. Then show that numbers all of same sign. Then show that

n n

i i=1=1 f  f ((xxii))ggii == f f ((ξ ξ )) n n

i i=1=1 ggii,, for some

for some ξ ξ 

[[a,a, bb].]. 5. If 

5. If f f ((xx) ) == xx33

22xx22++ xx, show that there is a number, show that there is a number cc such thatsuch that f f ((cc) ) = 1= 1//2.2. 6.

6. Show thShow that the equatiat the equationon eexx

+

+ xx

2 = 0 has a real root. Use a graphical device to find the smallest2 = 0 has a real root. Use a graphical device to find the smallest positive root of this equation.

positive root of this equation. II.

II. Applications of Mean-Value TheoremsApplications of Mean-Value Theorems 7. Suppose

7. Suppose f f  is differentiable in the open interval (is differentiable in the open interval (a,a, bb).). (a) If 

(a) If f f ��((xx))

0 for all0 for all xx

((a,a, bb), then), then f f  is non-decreasing.is non-decreasing.

(b) If 

(b) If f f ��((xx) = 0 for all) = 0 for all xx

((a,a, bb), then), then f f  is constant.is constant. (c) If 

(c) If f f ��((xx))

0 for all0 for all xx

((a,a, bb), then), then f f  is non-increasing.is non-increasing. 8.

8. FForor f f ((xx) ) == xx22, find the point, find the point ξ ξ  specified by the mean-value theorem for derivatives. Verify thatspecified by the mean-value theorem for derivatives. Verify that this point lies in the interval (

this point lies in the interval (a,a, bb).). 9.

9. In the In the mean-mean-vavalue theorem for integlue theorem for integrals, letrals, let f f ((xx) ) == eexx

, , gg((xx) ) == xx, , [[a,a, bb] = [0] = [0,, 1]. Find the point1]. Find the point ξ ξ  specified by the theorem and verify that this point lies in the interval (0

specified by the theorem and verify that this point lies in the interval (0,, 1).1). III.

III. Application of Taylor’s FormulaApplication of Taylor’s Formula 10. Show that the remainder

10. Show that the remainder RRnn((xx) in the Taylor’s expansion of a) in the Taylor’s expansion of a nn + 1 continuously differentiable+ 1 continuously differentiable

function

function f f  can be written ascan be written as R Rnn+1+1((xx) ) == ((xx

cc))nn+1+1 ((nn + 1)!+ 1)! f f  ((nn+1)+1) ((ξ ξ )),, where where ξ ξ 

((c,c, xx).).

11. Find the Taylor’s expansion for the following functions with remainder

11. Find the Taylor’s expansion for the following functions with remainder RRnn+1+1((xx) about) about cc = = 00

(a)

(a) f f ((xx) ) == eexx (b)(b) f f ((xx) = sin) = sin xx (c)(c) f f ((xx) = cos) = cos xx

12. Find the Taylor’s expansion for

12. Find the Taylor’s expansion for f f ((xx) ) ==

√ 

√ 

xx + 1 upto+ 1 upto nn = 2 (ie. the Taylor’s polynomial of order= 2 (ie. the Taylor’s polynomial of order 2) with remainder

(2)

Appendix - A

Appendix - A

Mathematical Preliminaries

Mathematical Preliminaries

Few theorems which are frequently used in this course are listed below. The students are assumed to Few theorems which are frequently used in this course are listed below. The students are assumed to be familier with these theorems and their proof.

be familier with these theorems and their proof.

Theorem 6.16 (Intermediate-Value Theorem for Continuous Functions). Theorem 6.16 (Intermediate-Value Theorem for Continuous Functions).

Let 

Let f f ((xx)) be a continuous function on the interval be a continuous function on the interval [[a,a, bb]]. . If If f f ((xx))

αα

f f (¯(¯xx)) for some number for some number αα and some and some 

x,

x, ¯¯xx

[[a,a, bb]], then , then 

α

α == f f ((ξ ξ )),, for some for some ξ ξ 

[[a.ba.b]]..

Theorem 6.17 (Extreme-Value Theorem for Continuous Functions). Theorem 6.17 (Extreme-Value Theorem for Continuous Functions).

Let 

Let f f ((xx)) be a continuous function on the interval be a continuous function on the interval  [[a,a, bb]]. Then there exists a point . Then there exists a point mm

[[a,a, bb]] such that such that 

f ((mm))

f f ((xx)) for all for all xx

[[a,a, bb]], and a point , and a point M M 

[[a,a, bb]] such that such that f f ((M M ))

f f ((xx)) for all for all xx

[[a,a, bb]]. Moreover,. Moreover,

f achieves its maximum and minimum values on achieves its maximum and minimum values on [[a,a, bb]]either at the endpoints either at the endpoints aa or or bb, or at a critical point , or at a critical point  (ie. at the point where the first derivative of 

(ie. at the point where the first derivative of f f is zero).is zero).

Theorem 6.18 (Mean-Value Theorem for Derivatives). Theorem 6.18 (Mean-Value Theorem for Derivatives).

If 

If f f ((xx)) is continuous on a bounded interval is continuous on a bounded interval [[a,a, bb]] and differentiable on and differentiable on ((a,a, bb)), then , then 

f ((bb))

f f ((aa)) bb

aa == f f 

��((ξ ξ )),,

for some 

for some ξ ξ 

((a,a, bb)) Theorem 6.19 (Mean-Value Theorem for Integrals).

Theorem 6.19 (Mean-Value Theorem for Integrals).

Let 

Let gg((xx)) be a non-negative or non-positive integrable function on be a non-negative or non-positive integrable function on [[a,a, bb]]. . If If f f ((xx)) is continuous on is continuous on [[a,a, bb]],, then  then 

 

 

bb a a f  f ((xx))gg((xx))dxdx == f f ((ξ ξ ))

 

 

b b a a

gg((xx))dx,dx, for some for some ξ ξ 

[[a,a, bb]].. Theorem 6.20 (Rolle’s Theorem).

Theorem 6.20 (Rolle’s Theorem).

Let 

Let f f ((xx)) be continuous on the bounded interval [ be continuous on the bounded interval [ a,a, bb ] and differentiable on (  ] and differentiable on ( a, bba, ). If ). If f f ((aa) ) == f f ((bb) = ) = 00, then , then 

f ��((ξ ξ ) ) = 0= 0,,

for some 

for some ξ ξ 

[[a,a, bb]].. Theorem 6.21 (Taylor’s Formula with Remainder).

Theorem 6.21 (Taylor’s Formula with Remainder).

If 

If f f ((xx)) has has nn + 1+ 1 continuous derivatives on continuous derivatives on [[a,a, bb]] and and cc is some point in is some point in [[a,a, bb]], then for all , then for all xx

[[a,a, bb]] f  f ((xx) ) == f f ((cc) +) + f f ��((cc)()(xx

cc) +) + f f  �� ��((cc)()(xx

cc))22 2! 2! ++

·· ·· ··

++ f  f ((nn))((cc)()(xx

cc))nn n n!! ++ RRnn+1+1((xx)),, where  where  R Rnn+1+1((xx) ) == 11 n n!!

 

 

xx c c ((xx

ss))nn f  f ((nn+1)+1) ((ss))ds.ds.

(3)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 22 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Error Analysis

Error Analysis

I.

I. Floating-Point RepresentationFloating-Point Representation

1.

1. WWrite the rite the storage schstorage scheme for eme for the IEEE the IEEE double precisdouble precision floating-poinion floating-point represent representation of tation of a a realreal number with the precision of 53 binary digits. Find the overflow limit (in binary numbers) in this number with the precision of 53 binary digits. Find the overflow limit (in binary numbers) in this case.

case. 2.

2. In a In a binary reprbinary represenesentation, if 2 bytes (ie., 2tation, if 2 bytes (ie., 2 ×× 8 = 16 bits) are used to represent a floating-point8 = 16 bits) are used to represent a floating-point number with 8 bits used for the exponent. Then, as of IEEE 754 storage format, find the largest number with 8 bits used for the exponent. Then, as of IEEE 754 storage format, find the largest binary number that can be represented.

binary number that can be represented. II.

II. Chopping and RoundingChopping and Rounding

3.

3. One lakh people borrowOne lakh people borrowed ten thousand rupeeed ten thousand rupees per head from a s per head from a bank for a period of bank for a period of twtwo months.o months. The bank charges simple annual interest rate of 7%. Find the change in total interest that the The bank charges simple annual interest rate of 7%. Find the change in total interest that the bank gains if the calculation is performed using rounding to two decimal places after the decimal bank gains if the calculation is performed using rounding to two decimal places after the decimal point.

point. 4.

4. The The machine epsilonmachine epsilon (also called (also called unit roundunit round) of a computer is the smallest positive floating-) of a computer is the smallest positive floating-poin

point t number number  δ δ  such that fl such that fl (1 (1 ++ δ δ )) >> 11. . Thus, for Thus, for any floatinany floating-pg-point number oint number  ˆˆδ δ < < δ δ , we have , we have   fl 

 fl (1 +(1 + ˆˆδ δ ) ) = 1= 1, and , and  1 +1 + ˆˆδ δ  and 1 are identical within the computer’s arithmetic.and 1 are identical within the computer’s arithmetic. For rounded arithmetic on a binary machine, show that

For rounded arithmetic on a binary machine, show that δ δ  = = 22−−nn is the machine epsilon.is the machine epsilon.

III.

III. The Absolute and Relative ErrorsThe Absolute and Relative Errors

5.

5. Let the nLet the numberumberss xx11,, xx22,, ·· ·· ·· ,, xxnn be approximations tobe approximations to X X 11,, X X 22,, ·· ·· ·· ,, X X nn such that the absolute errorsuch that the absolute error

in each case is

in each case is ��. Find the absolute error in. Find the absolute error in

n n

i i=1=1 x xii.. 6. If fl(

6. If fl(xx) is the machine approximated number of a real number) is the machine approximated number of a real number xx andand �� is the corresponding relativeis the corresponding relative error, then show that fl(

error, then show that fl(xx) = (1) = (1 −− ��))x.x. 7.

7. If the relativIf the relative error of fl(e error of fl(xx) ) isis ��, then show that, then show that

||��|| ≤≤ β β −−nn+1+1 (for chopped fl((for chopped fl(xx)),)), ||��|| ≤≤ 11

22β β 

−nn+1+1 (for rounded fl(x(for rounded fl(x)),)),

where

where β β  is the radix andis the radix and nn is the number of digits in the machine approximated number.is the number of digits in the machine approximated number. 8.

8. Find the truncaFind the truncation error aroution error aroundnd xx = 0 for the following functions= 0 for the following functions (a)

(a) f f ((xx) = sin) = sin xx, (b), (b) f f ((xx) = cos) = cos xx.. IV.

IV. Loss of Significant Digits and Propagation of ErrorLoss of Significant Digits and Propagation of Error

9.

9. FFor or the the follofollowing numberwing numberss xx and their corresponding approximationsand their corresponding approximations xxAA, find the number of , find the number of 

signifi

significant digits cant digits inin xxAA with respect towith respect to xx. (a). (a) xx = 451= 451..0101, , xxAA = 451= 451..023,023,

(b)

(b) xx == −−00..0451804518, , xxAA == −−00..045113, (c)045113, (c) xx = = 2323..46044604, , xxAA = 23= 23..42134213..

10.

10. GivGive e waways to ys to avoavoid loss-of-sigid loss-of-significannificance in ce in compucomputating the tating the functfunctionion f  f ((xx) ) == 11 −− coscos xx x x22 ,, when when xx ≈≈ 0.0. 11. Let

11. Let xxAA = = 33..14 and14 and yyAA = 22..651 be correctly rounded from= 651 be correctly rounded from xxT T  andand yyT T , to the number of digits, to the number of digits

shown. Find the largest interval that contains shown. Find the largest interval that contains (i)

(4)

12. Let

12. Let xxAA andand yyAA, , the approximthe approximation toation to xx andand yy, respectively, be such that the relative errors, respectively, be such that the relative errors E E rr((xx))

and

and E E rr((yy) are very much smaller than 1. Then show that (i)) are very much smaller than 1. Then show that (i) E E rr((xyxy)) ≈≈ E E rr((xx) +) + E E rr((yy) and (ii)) and (ii)

E rr((x/yx/y)) ≈≈ E E rr((xx)) −− E E rr((yy).).

(This shows that

(This shows that relatirelative errors propagate slowly with ve errors propagate slowly with multmultipliciplication and ation and divisidivision).on). 13. The ideal gas law is given by

13. The ideal gas law is given by PP V V  == nRT nRT , where, where RR is a gas constant given (in MKS system) byis a gas constant given (in MKS system) by R

R = = 88..31314343 ++ ��, with, with ||��|| ≤≤ 00..1212 ×× 1010−−22. By taking. By taking P P  == V V  == nn = 1, find a bound for the relative= 1, find a bound for the relative

error in computing the temperature error in computing the temperature T T ..

14. Find the condition number for the following functions 14. Find the condition number for the following functions

(a)

(a) f f ((xx) ) == xx22, (b), (b) f f ((xx) ) == ππxx

, (c)

, (c) f f ((xx) ) == bbxx

.. 15. Given a value of 

15. Given a value of  xxAA = = 22..5 with an error of 0.01. Estimate the resulting error in the function5 with an error of 0.01. Estimate the resulting error in the function

f ((xx) ) == xx33..

16.

16. Compute and interpret (find whether the funtions are weCompute and interpret (find whether the funtions are well or ill-conditioned) the condition numberll or ill-conditioned) the condition number for

for (i)

(i) f f ((xx) = tan) = tan x,x, atat xx == ππ22 + 0+ 0..11

ππ 2 2

..

(ii)

(ii) f f ((xx) = tan) = tan x,x, atat xx == ππ 2 2 + 0+ 0..0101

ππ 2 2

.. 17. Let 17. Let f  f ((xx) ) = = ((xx −− 1)(1)(xx −− 2)2) ·· ·· ·· ((xx −− 8)8).. Estimate

Estimate f f (1 + 10(1 + 10−−44) using mean-value theorem with) using mean-value theorem with xx = 1 and= 1 and xxAA = 1 + 10= 1 + 10−−44..

18. Show that the function 18. Show that the function

f ((xx) ) == 11 −− coscos xx x x22

leads to

leads to unstabunstable computationle computation. . FFurtheurther r checheck the ck the stablistablity of ty of the equivathe equivalent definitilent definition on of of thisthis function in avoiding loss-of-significance error.

function in avoiding loss-of-significance error. V.

V. MiscellaneousMiscellaneous

19.

19. Big-oh:Big-oh: If If  f f ((hh)) and and  gg((hh)) are two functions of are two functions of  hh, then we say that , then we say that  f 

f ((hh) ) == OO((gg((hh)))),, as as  hh →→ 00 if there is some constant 

if there is some constant  C C  such that such that 

f  f ((hh)) gg((hh))

< C  < C    for all 

  for all hh sufficiently small, or equivalently, if we can bound sufficiently small, or equivalently, if we can bound  ||f f ((hh))|| < C < C ||gg((hh))||   for all 

  for all hh sufficiently small.sufficiently small. Intuitively, this means thatIntuitively, this means that f f ((hh) decays to zero at least as fast as the) decays to zero at least as fast as the function

function gg((hh).).

Little-oh:

Little-oh: We say that We say that 

f ((hh) ) == oo((gg((hh)))),, as as  hh →→ 00 if  if 

f  f ((hh)) gg((hh))

→ → 00,, as as  hh →→ 00..

Note that this definition is stronger than the ”big-oh” statement and means that

Note that this definition is stronger than the ”big-oh” statement and means that f f ((hh) decays to) decays to zero faster than

zero faster than gg((hh).). (a) If 

(a) If f f ((hh) ) == oo((gg((hh)), then show that)), then show that f f ((hh) ) == OO((gg((hh)).)). (b) Give an example to show that the converse is not true. (b) Give an example to show that the converse is not true. (c) What is meant by

(c) What is meant by f f ((hh) ) == oo(1) and(1) and f f ((hh) ) == OO(1)?(1)? (d) Give an example of 

(d) Give an example of  f f ((hh) and) and gg((hh) such that) such that f f ((hh) is much bigger than) is much bigger than gg((hh), but still), but still f 

f ((hh) ) == OO((gg((hh)) as)) as hh →→ 00.. 20. Assume that

20. Assume that f f ((hh) ) == pp((hh)) ++ OO((hhnn

) and

) and gg((hh) ) == q q ((hh)) ++ OO((hhmm

), for some positive integers

), for some positive integers nn andand mm.. Find the order of approximation of their sum, ie., find the smallest integer

Find the order of approximation of their sum, ie., find the smallest integer rr such thatsuch that f 

(5)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 33 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Interpolation by Polynomials

Interpolation by Polynomials

I.

I. Lagrange InterpolationLagrange Interpolation

1.

1. When a When a functfunction is ion is tabulatabulated at ted at equal interequal intervvals, obtain a als, obtain a more concise Lagrangmore concise Lagrange interpolate interpolationion formula.

formula. 2.

2. Using Lagrange interUsing Lagrange interpolation formulpolation formula, express the a, express the rationrational functional function f 

f ((xx) ) == 33xx

2

2++ xx + 1+ 1

((xx

1)(1)(xx

2)(2)(xx

3)3) as a sum of partial fractions.

as a sum of partial fractions. 3.

3. ConstrConstruct the uct the LagranLagrange interpolage interpolation polynomial for the tion polynomial for the functifunctionon f f ((xx) = sin) = sin πxπx, choosing the, choosing the points

points xx00 = 0= 0, , xx11 = = 11//66, , xx33= = 11//22.. Answer:Answer: 77//22xx

33xx22

4.

4. ApplyApplying Lagrange’s forming Lagrange’s formula, find ula, find a a cubic polynomiacubic polynomial l whicwhich h approapproximateximates the s the follofollowing data:wing data: x x --2 2 --1 1 1 1 33 f  f ((xx) -) -1 1 3 -3 -1 11 199 Answer: Answer: pp33((xx) ) == xx33

33xx + 1+ 1 5.

5. Use Lagrange intUse Lagrange interpolatierpolation formula to find on formula to find a quadratic polynomia quadratic polynomialal pp22((xx) that interpolates) that interpolates

f ((xx) ) == ee−−xx22 at

at xx00==

1,1, xx11 = 0 and= 0 and xx22 = 1. Further, find the value of = 1. Further, find the value of  pp22((

00..9) with rounding to six decimal9) with rounding to six decimal

places after decimal point and compare the value with the true value

places after decimal point and compare the value with the true value f f ((

00..9) of 9) of same figure. Findsame figure. Find the percentage error in this calculation.

the percentage error in this calculation. Answer:Answer: pp22((xx) ) = 1= 1

00..367879367879xx22, Error, Error

99..69%69%

6.

6. GivGiven a table of en a table of vvalues of the functioalues of the functionn f f ((xx)) x

x 332211..0 0 332222..8 8 332244..2 2 332255..00 f 

f ((xx) ) 2.50651 2.50893 2.51081 2.511882.50651 2.50893 2.51081 2.51188 Compute the value

Compute the value f f (323(323..5)5).. Answer:Answer: 22..5098750987 7. Let

7. Let pp((xx) be a polynomial of degree) be a polynomial of degree

nn. For. For nn distinct nodesdistinct nodes xxkk,, kk = = 00,, 11,,

·· ·· ··

,, nn, show that we, show that we

can write can write  p  p((xx) ) == n n

k k=0=0  p  p((xxkk))llkk((xx)).. 8.

8. The functions The functions llkk((xx) ) == n n

ii=0=0,i,i��==kk x x

xxii x xkk

xxii

,, kk = = 00,,

·· ·· ··

,, nnare the weight polynomials of the corresponding are the weight polynomials of the corresponding  no

nodes des and and arare e often calleoften called d  LagraLagrange nge multmultipliersipliers.. Prove that for anyProve that for any nn

1,1,

n n

k k=0=0 llkk((tt) = 1 .) = 1 .

[[Hint:Hint: Use problem 7 with an appropriate polynomialUse problem 7 with an appropriate polynomial pp]] 9. Let

9. Let xxkk

∈∈

[[a.ba.b],], kk = = 00,, 11,,

·· ·· ··

,, nn bebe nn + 1 distinct nodes and let+ 1 distinct nodes and let f f ((xx) be a continuous function) be a continuous function

on

on [[a,a, bb]. Show that for]. Show that for xx

��

== xxkk,, kk = = 00,, 11,,

·· ·· ··

,, nn, the Lagrange interpolating polynomial can be, the Lagrange interpolating polynomial can be

represented in the form represented in the form

 p  pnn((xx) ) == ww((xx)) n n

k k=0=0 f  f ((xxkk)) ((xx

xxkk))ww((xxkk)) where

(6)

II.

II. Newton Interpolation and Divided DifferenceNewton Interpolation and Divided Difference

10.

10. FFor the function data given in the table below, fit a polynomial using Newton interpolation formulaor the function data given in the table below, fit a polynomial using Newton interpolation formula and find the value of 

and find the value of  f f (2(2..5).5).

x x --3 3 --1 0 1 0 3 3 55 f  f ((xx) -30 -22 -12 330 3458) -30 -22 -12 330 3458 Answer: Answer: pp44((xx) ) = = 55xx44+ 9+ 9xx33

27x27x22

2121xx

12,12, pp44(2(2..5) = 1025) = 102..68756875.. 11. Calculate the

11. Calculate the nnth divided difference of th divided difference of  f f ((xx) ) = 1= 1/x/x Answer:Answer: ((

1)1)nn//((xx

0

0xx11

·· ·· ··

xxnn))

12. Let

12. Let xx00,, xx11,,

·· ·· ··

,, xxnn be nbe n ++ 1 distinct nodes in the closed interv1 distinct nodes in the closed interval [al [a,a, bb] and let] and let f f ((xx) ) bebe nn ++ 1 tim1 timeses

continuously differentiable function on [

continuously differentiable function on [a,a, bb]. Then,]. Then, i) show that

i) show that f f [[xx00,, xx11,,

·· ·· ··

,, xxii−−11,, xx] ] == f f [[xx00,, xx11,,

·· ·· ··

,, xxii−−11,, xxii]] ++ f f [[xx00,, xx11,,

·· ·· ··

,, xxii,, xx](](xx

xxii)),, for eachfor each

ii = = 11,,

·· ·· ··

,, nn and for alland for all xx

∈∈

[[a,a, bb].]. ii)

ii) dd dx

dxf f [[xx00,,

·· ·· ··

,, xxii−−11,, xx] ] == f f [[xx00,,

·· ·· ··

,, xxii−−11, x , x]].., x , x iii)

iii) the divided differenthe divided differences are symmetric functices are symmetric functions of ons of their argumetheir arguments, that is, for nts, that is, for an arbitraryan arbitrary permutation

permutation ππ of the indices 0of the indices 0,, 11,,

·· ·· ··

,, ii, we have, we have f 

f [[xx00,,

·· ·· ··

,, xxii] ] == f f [[xxππ00,,

·· ·· ··

,, xxπiπi]]..

13. Let

13. Let f f ((xx) be a real-valued function defined on) be a real-valued function defined on I I  = = [[a,a, bb] and] and kk times differentiable in (times differentiable in (a,a, bb). If ). If  xx00,,

x

x11,,

·· ·· ··

,, xxkk are kare k + 1 distinct points in [+ 1 distinct points in [a,a, bb], then show that there exists], then show that there exists ξ ξ 

∈∈

((a,a, bb) such that) such that

f  f [[xx00,,

·· ·· ··

,, xxkk] =] = f  f ((kk))((ξ ξ )) k k!! ..

[[Hint:Hint: Refer the proof of the theorem on error formula for interpolation]Refer the proof of the theorem on error formula for interpolation] III.

III. Error in Interpolating PolynomialsError in Interpolating Polynomials

14. Let

14. Let xx00,, xx11,,

·· ·· ··

,, xxnn bebe nn + 1 distinct nodes where instead of the function values+ 1 distinct nodes where instead of the function values f f ((xxii), the cor-), the

cor-respond

responding ing approapproximate ximate vavalueslues ˜˜f f ((xxii) rounded to 5 decimal digits are given. If the Lagrange) rounded to 5 decimal digits are given. If the Lagrange

interpolation polynomial obtained from the approximate values

interpolation polynomial obtained from the approximate values ˜˜f f ((xxii) is ˜) is ˜ p pnn((xx), then show that), then show that

the error at a fixed point ˜

the error at a fixed point ˜xx satisfies the inequalitysatisfies the inequality

||

 p pnn(˜(˜xx))

 p p˜˜nn(˜(˜xx))

|| ≤

11 221010 − −55 n n

k k=0=0

||

llkk(˜(˜xx))

||

,, where

where ppnn(˜(˜xx) is the Lagrange interpolated polynomial for exact values) is the Lagrange interpolated polynomial for exact values f f ((xxii) ) ((ii = = 00,, 11,,

·· ·· ··

,, nn).).

15. Let

15. Let pp11((xx) be the linear Newton interpolation polynomial for data) be the linear Newton interpolation polynomial for data

(6000

(6000,, 00..33333) and (600133333) and (6001,,

00..66667)66667)..

If the calculation is performed with 5 decimal digit rounding, then show that the process of  If the calculation is performed with 5 decimal digit rounding, then show that the process of  evaluating

evaluating pp11((xx) in the form) in the form pp11((xx) ) == xx00 ++ ∆f ∆f 00((xx

xx11) ) atat xx = 6000 and= 6000 and xx = 6001 is stable,= 6001 is stable,

whereas evaluating the same linear polynomial in the form

whereas evaluating the same linear polynomial in the form pp11((xx) ) == ∆f ∆f 00xx ++ ((xx00

∆f ∆f 00xx11) at these) at these

points is unstable. Find the percentage error in each case. Give reason for these behaviors. points is unstable. Find the percentage error in each case. Give reason for these behaviors. 16. Let

16. Let xx00,, xx11,,

·· ·· ··

,, xxnn be distinct real numbers, and letbe distinct real numbers, and let f f  be a given real-valued function withbe a given real-valued function with nn + 1+ 1

continuous derivatives on an interval

continuous derivatives on an interval I I  = = [[a,a, bb]. Let]. Let tt

∈∈

I I  be such thatbe such that tt = x=

��

xii forfor ii = = 00,,

·· ·· ··

,, nn..

Then show that there exists an

Then show that there exists an ξ ξ 

∈∈

((a,a, bb) such that) such that eenn((tt) ) :=:= f f ((tt))

n n

k k=0=0 f  f ((xxkk))llkk((tt) ) == ((tt

xx00))

·· ·· ··

((tt

xxnn)) ((nn + 1)!+ 1)! f f  ((nn+1)+1)((ξ ξ )),, where where llkk((tt) ) == n n

ii=0=0,i,i��==kk tt

xxii x xkk

xxii

,, kk = = 00,,

·· ·· ··

,, n.n. [[Hint:Hint: Proof is the same as that for theorem on errorProof is the same as that for theorem on error formula for interpolation done in the class 5]

formula for interpolation done in the class 5] 17. Given the square of the integers

17. Given the square of the integers N N  andand N N  + 1, what is the largest error that occurs if linear+ 1, what is the largest error that occurs if linear inte

interpolatiorpolation n is is used to used to approapproximateximate f f ((xx) ) == xx22 forfor N 

(7)

18. The following table gives the data for

18. The following table gives the data for f f ((xx) = sin) = sin x/xx/x22.. x

x 00..1 1 00..2 2 00..3 3 00..4 4 00..55 f 

f ((xx) ) 9.9833 4.9667 3.2836 2.4339 1.91779.9833 4.9667 3.2836 2.4339 1.9177 Calculate

Calculate f f (0(0..25) as accurately as the number of figures shown in the table25) as accurately as the number of figures shown in the table (a) by using the data in the table and using Newton’s interpolation formula (a) by using the data in the table and using Newton’s interpolation formula (b) by first tabulating

(b) by first tabulating xf xf ((xx) with rounding the same number of figures as in the table and then) with rounding the same number of figures as in the table and then using Newton’s interpolation formula.

using Newton’s interpolation formula.

(c) Find the error in each case and explain the difference between the results in (a) and (b). (c) Find the error in each case and explain the difference between the results in (a) and (b).

Answer:

Answer: (a) 3.8647 (b) 3.9585 (c) 0.0469 for (a) and 0.000005625 for (b) (you may perform this(a) 3.8647 (b) 3.9585 (c) 0.0469 for (a) and 0.000005625 for (b) (you may perform this calculation with more accurace)

calculation with more accurace) 19. Determine the spacing

19. Determine the spacing hh in a table of equally spaced values of the functionin a table of equally spaced values of the function f f ((xx) ) ==

√ 

√ 

xx betweenbetween 1 and 2, so that interpolation with a second-degree polynomial in this table will yield a desired 1 and 2, so that interpolation with a second-degree polynomial in this table will yield a desired accuracy.

accuracy. IV.

IV. Cubic Spline InterpolationCubic Spline Interpolation

20. Obtain the cubic spline approximation for the function given in the tabular form 20. Obtain the cubic spline approximation for the function given in the tabular form

x x 0 0 1 2 1 2 33 f  f ((xx) 1 2 33 244) 1 2 33 244

Lab Assignment - 1

Lab Assignment - 1

Write a computer program (language of your choice) to read

Write a computer program (language of your choice) to read nn distinct nodes and the correspondingdistinct nodes and the corresponding funct

function ion vavalues in lues in the the follofollowing format:wing format:

n n x x00 f f ((xx00)) x x11 f f ((xx11))

·· ·· ·

· ·· ·· ··

·· ·· ·

· ·· ·· ··

·· ·· ·

· ·· ·· ··

x xnn f f ((xxnn))

and gives the value of the tabulated function at a given point ˜

and gives the value of the tabulated function at a given point ˜xx

∈∈

((xx00,, xxnn) using) using

(i) Lagrange interpolation formula (i) Lagrange interpolation formula (ii) Newton’s interpolation formula. (ii) Newton’s interpolation formula.

Note:

Note: The program should be ready by first week of April, 2009. On 8th April, 2009, an input data fileThe program should be ready by first week of April, 2009. On 8th April, 2009, an input data file in the above prescribed format will be uploaded in the site

in the above prescribed format will be uploaded in the site

http://www.math.iitb.ac.in/ baskar/baskar t.htm http://www.math.iitb.ac.in/ baskar/baskar t.htm

The expected output will be given in a printed sheet. Students are expected to submit their output at The expected output will be given in a printed sheet. Students are expected to submit their output at the time of their oral viva (date will be announced later).

the time of their oral viva (date will be announced later).

Weightage: 3% Weightage: 3%

(8)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 44 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Numerical Differentiation and Integration

Numerical Differentiation and Integration

I.

I. Numerical DifferentiationNumerical Differentiation

1.

1. Give geometric interpretation for the three primitive numerical differentiation formGive geometric interpretation for the three primitive numerical differentiation formulae (forward,ulae (forward, central and backward).

central and backward). 2.

2. Obtain the central diffeObtain the central difference formrence formula forula for f f ��((xx) ) using quadratic polynomial using quadratic polynomial approapproximatiximation.on.

3.

3. Use the forward, central and backward Use the forward, central and backward difference formulas to determinedifference formulas to determinef f ��((xx

0

0),),f f ��((xx11) and) and f f ��((xx22))

respectively for the following tabulated values: respectively for the following tabulated values: (a) (a) xx 00..5 5 00..6 6 00..77 f  f ((xx) 0.4794 0.5646 0.6442) 0.4794 0.5646 0.6442 (b)(b) x x 00..0 0 00..2 2 00..44 f  f ((xx) 0.0 0.7414 1.3718) 0.0 0.7414 1.3718 The corresponding functions are (a)

The corresponding functions are (a) f f ((xx) = sin) = sinxx and (b)and (b)f f ((xx) ) ==eexx

− − 22xx

2 2

+

+ 33xx++ 1. Com1. Computpute thee the error bounds.

error bounds.

4. Given the values of the function

4. Given the values of the function f f ((xx) = log) = logxx atat xx00 = = 22..0,0, xx11 = = 22..2 and2 and xx22 = = 22..6, find the6, find the

approximate value of 

approximate value of f f ��(2(2..0) using the methods based on linear and quadratic interpolation.0) using the methods based on linear and quadratic interpolation.

Obtain the error bounds. Obtain the error bounds. 5.

5. EstimaEstimate the te the roundirounding ng error behavioerror behavior r of of the three the three primiprimitive numertive numerical differenical differentiatiotiation n formformulae.ulae. 6.

6. Find an approximaFind an approximation to the tion to the derivderivative of ative of f f ((xx) evaluated at) evaluated at xx,, xx++hhandand xx++ 22hhwith truncationwith truncation error of 

error of OO((hh22

). ). 7.

7. Use the Use the method of method of undetundeterminermined ed coefficicoefficients to find ents to find a formula for numericaa formula for numerical differenl differentiation of tiation of 

f ����((xx) evaluated at points) evaluated at points

(a)

(a) xx+ 2+ 2hh,, xx++hh andand xx, (b), (b) xx+ 3+ 3hh,, xx+ 2+ 2h h xx++hh andand xx

with truncation error as small as possible. with truncation error as small as possible. 8.

8. FForor

S ((hh) ) == −−f f ((xx+ 2+ 2hh) + 4) + 4f f ((xx++hh)) −− 33f f ((xx))

22hh ,,

find the values of 

find the values of cc11,, cc22 andand cc33 such thatsuch that

f  f ��((xx)) − −S S ((hh) ) ==cc11hh 2 2 + +cc22hh 3 3 + +cc33hh 4 4 + + · · ·· · ·.. 9.

9. FFor the methodor the method

f  f ����(( x x) ) == 44f f ((xx++hh)) −−f f ((xx+ 2+ 2hh)) −− 33f f ((xx)) 22hh ++ h h22 33 f f  ��� ���(( ξ  ξ )), , x x < < ξ < ξ < xx+ 2+ 2hh

determine the optimal value of 

determine the optimal value of hh for which the total error (which is the sum of the truncationfor which the total error (which is the sum of the truncation error and the rounding error) is minimum.

error and the rounding error) is minimum. 10. In computing

10. In computingf f ��((xx) using central difference formula find the value of ) using central difference formula find the value of hhwhich minimizes the boundwhich minimizes the bound

of the total error. of the total error.

(9)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 55 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Numerical Differentiation and Integration (contd.)

Numerical Differentiation and Integration (contd.)

II.

II. Numerical IntegrationNumerical Integration

1.

1. Apply RectanglApply Rectangle, Trapeze, Trapezoidal, Simpson and oidal, Simpson and GaussGaussian methods ian methods to to evevaluatealuate (a)

(a) I I  ==

� � 

π/ π/22 0 0 cos cos xx 1 + cos

1 + cos22xxdxdx (exact value(exact value ≈≈0.623225)0.623225)

(b) (b) I I  ==

� � 

π π 0 0 dx dx 5 + 4

5 + 4 cocoss xx (exact value(exact value ≈≈ 1.047198)1.047198) (c) (c) I I  ==

� � 

1 1 0 0 ee−−xx 2 2 dx

dx (exact value(exact value ≈≈ 0.746824),0.746824),

(d) (d) I I  ==

� � 

π π 0 0 sin

sin33xx coscos44

x

x dxdx (exact value(exact value ≈≈0.114286)0.114286)

(e)

(e) I I  ==

  

0011(1 +(1 + ee−x−xsin(4sin(4xx))))dx.dx. (exact value(exact value ≈≈ 1.308250)1.308250)

2.

2. WWrite down the errors in rite down the errors in the approximthe approximation of ation of 

� � 

11 0 0 x x44 dx dx andand

� � 

1 1 0 0 x x55 dx dx

by the Trapezoidal rule and Simpson’s rule. Hence find the value of the constant

by the Trapezoidal rule and Simpson’s rule. Hence find the value of the constant C C  for which thefor which the Trapezoidal rule gives the exact result for the calculation of 

Trapezoidal rule gives the exact result for the calculation of 

� � 

11 0 0 ((xx55 − −CxCx44))dx.dx. 3.

3. EstimaEstimate the te the effect of effect of data inaccuradata inaccuracies on results computed by cies on results computed by TTrapezoirapezoidal and dal and SimpsSimpson’s rule.on’s rule. 4.

4. Under what condition does the Under what condition does the composicomposite Trapete Trapezoidal and composite Simpson rules be zoidal and composite Simpson rules be conconver- ver-gent? Give reason.

gent? Give reason. 5.

5. ConsidConsider the er the inteintegral in gral in probleproblem 1(e).Use the m 1(e).Use the partitpartitionion xx00 = = 0,0, xx11 = = 00..2525 xx22 = = 00..5,5, xx33 = = 00..7575

and

and xx44 = 1 to evaluate this integral using composite Trapezoidal and composite Simpson rule and= 1 to evaluate this integral using composite Trapezoidal and composite Simpson rule and

compare the result with the exact value 1.30825060 compare the result with the exact value 1.30825060·· ·· ··..

6.

6. Obtain error formObtain error formula for the ula for the compositcomposite trapezoidal and composite Simpse trapezoidal and composite Simpson rules.on rules. 7.

7. Find the number of subinFind the number of subintervals and tervals and the step sizethe step size hh so that the error for the composite trapezoidalso that the error for the composite trapezoidal rule is less than 5

rule is less than 5××1010−−99 for the approximationfor the approximation

  

77

2

2 dx/x.dx/x.

8.

8. DeterDetermine the coefficientmine the coefficients in s in the quadraturthe quadrature formulae formula

� � 

22hh 0 0 x x−−11//22f f ((xx))dxdx = = (2(2hh))11//22((ww 0 0f f (0) +(0) + ww11f f ((hh) +) + ww22f f (2(2hh)))).. 9.

9. Use the Use the twtwo-poind Gaussio-poind Gaussian quadratuan quadrature rule to re rule to approapproximatximatee

� � 

11 − −11 dx dx x x + 2+ 2 ≈≈11..0986109861

and compare the result with the trapezoidal rule and Simpson rule. and compare the result with the trapezoidal rule and Simpson rule. 10. Assume that

10. Assume that xxkk == xx00++ khkh are equally spaced nodes. The quadrature formulaare equally spaced nodes. The quadrature formula

� � 

xx33 x x00 f  f ((xx))dxdx≈≈ 33hh 88 ((f f ((xx00) + 3) + 3f f ((xx11) + 3f ) + 3f ((xx22) +) + f f ((xx33)))) is called the Simpson’s

is called the Simpson’s 33 8

8 rule. Determine the degree of precision of Simpson’srule. Determine the degree of precision of Simpson’s 3 3 8 8 rule.rule.

(10)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 77 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Nonlinear Equations

Nonlinear Equations

I.

I. Fixed-Point Iteration MethodFixed-Point Iteration Method

1.

1. FFor each of the following equations, find the correct iteration function that converges to the desiredor each of the following equations, find the correct iteration function that converges to the desired solution:

solution: (a)

(a) xx

tantan xx = 0, (b)= 0, (b) ee−−xx

coscos xx = 0= 0..

Study geometrically how the iterations behave with different iteration functions. Study geometrically how the iterations behave with different iteration functions. 2. Show that

2. Show that gg((xx) ) == ππ ++ 1122sin(sin(x/x/2) has a unique fixed point on [02) has a unique fixed point on [0,, 22ππ]. Use fixed-point iteration]. Use fixed-point iteration method with with

method with with gg as the iteration function andas the iteration function and xx00 = 0 to find an approximate solution for the= 0 to find an approximate solution for the

equaton

equaton 1122sin(sin(x/x/2)2)

xx ++ ππ = 0. Stop the iteration when the residual error is less than 10= 0. Stop the iteration when the residual error is less than 10−−44

.. 3. If 

3. If αα andand β β  be the roots of be the roots of  xx22++ axax ++ bb = 0. If the iterations= 0. If the iterations x xnn+1+1 ==

ax axnn ++ bb x xnn and and xxnn+1+1 ==

bb x xnn++ aa

converges, then show that they converge to

converges, then show that they converge to αα andand β β , respectively, if , respectively, if 

||

αα

||

>>

||

β β 

||

.. 4. Let

4. Let

{{

xxnn

}

} ⊂

[[a,a, bb] be a sequence generated by a fixed point iteration method with continuous] be a sequence generated by a fixed point iteration method with continuous

iteration function

iteration function gg((xx). If this sequence converges to). If this sequence converges to xx∗∗, then show that, then show that

||

xxnn+1+1

xx∗∗

| | ≤

λ λ 11

λλ

||

xxn+1n+1

xxnn

||

,, where where λλ := := mamaxx x x∈∈[[a,ba,b]]

||

gg ��

((xx))

||

.. (This enables us to use(This enables us to use

||

xxnn+1+1

xxnn

||

to decide when to stop iterating.)to decide when to stop iterating.)

5.

5. GivGive reason for why the sequencee reason for why the sequence xxnn+1+1 = = 11

00..99xx22nn, with initial guess x, with initial guess x00 = 0, does not converge= 0, does not converge

to any solution of the quadratic equation 0

to any solution of the quadratic equation 0..99xx22++ xx

1 = 0? [Hint: Observe what happens after1 = 0? [Hint: Observe what happens after 25 iterations]

25 iterations] 6. Let

6. Let xx∗∗

be the smallest positive root of the equation 20

be the smallest positive root of the equation 20xx33

2020xx22

2525xx ++ 4 = 0. If 4 = 0. If the fixethe fixed-pod-poinintt iteration method is used in solving this equation with the iteration function

iteration method is used in solving this equation with the iteration function gg((xx) ) == xx33

xx22

xx44++1155

for all

for all xx

∈∈

[0[0,, 1] and1] and xx00 = 0, then find the number of iterations= 0, then find the number of iterations nn required in such a way thatrequired in such a way that

||

xx∗∗

xxnn

||

<< 1010−−33..

II.

II. Bisection MethodBisection Method

7. Find the number of iterations to be performed in the bisection method to obtain a root of the 7. Find the number of iterations to be performed in the bisection method to obtain a root of the

equation equation

22xx66

55xx44+ 2 = 0+ 2 = 0 in the interval [0

in the interval [0,, 1] with absolute error1] with absolute error ��

1010−−33

. Find the approximation solution. . Find the approximation solution. 8.

8. Find the approxiFind the approximate solutmate solution of the ion of the equatiequationon xx sinsin xx

1 = 0 (sine is calculated in radians) in the1 = 0 (sine is calculated in radians) in the interval [0

interval [0,, 2] using Bisection method. Obtain the number of iterations to be performed to obtain2] using Bisection method. Obtain the number of iterations to be performed to obtain a solution whose absolute error is less than 10

a solution whose absolute error is less than 10−−33..

9. Find the root of the equation 10 9. Find the root of the equation 10xx++ xx

4 = 0 correct to four significant digits by the bisection4 = 0 correct to four significant digits by the bisection method.

method. III.

III. Secant and Newton-Raphson MethodSecant and Newton-Raphson Method

10. Given the following equations: 10. Given the following equations:

(a)

(a) xx44

xx

10 = 0, (b)10 = 0, (b) xx

ee−−xx

= 0 = 0

Determine the initial approximations for finding the smallest positive root. Use these to find the Determine the initial approximations for finding the smallest positive root. Use these to find the roots upto a desired accuracy with secant and Newton-Raphson methods.

roots upto a desired accuracy with secant and Newton-Raphson methods. 11. Find the iterative method based on Newton-Raphson method for finding

11. Find the iterative method based on Newton-Raphson method for finding

√ 

√ 

N N  andand N N 11//33, where, where

N  is a positive real number. Apply the methods tois a positive real number. Apply the methods to N N  = 18 to obtain the results correct to two= 18 to obtain the results correct to two significan digits.

(11)

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

INDIAN INSTITUTE OF TECHNOLOGY BOMBAY

Department of Mathematics

Department of Mathematics

M

MA A 22114 4 IInnttrroodduuccttiioon n tto o NNuummeerriiccaal l AAnnaallyyssiis s TTuuttoorriiaal l SShheeeet t NNoo. . 88 S

Spprriinngg 22000099 SS.. BBaasskkaarr

Linear System of Equations

Linear System of Equations

I.

I. Direct MethodsDirect Methods

1. Use Gaussian elimination method (both with and without pivoting) to find the solution of the 1. Use Gaussian elimination method (both with and without pivoting) to find the solution of the

following systems: following systems: (i) 6

(i) 6xx11+ 2+ 2xx22+ 2x+ 2x33 == −−22,, 22xx11+ 0+ 0..66676667xx22+ 0+ 0..33333333xx33= = 11, , xx11+ 2+ 2xx22−− xx33 = 0= 0

Answer:

Answer: xx11 = 2.599928,= 2.599928, xx22 = -3.799904,= -3.799904, xx33 = -4.999880, Number of Pivoting = 1.= -4.999880, Number of Pivoting = 1.

(ii) 0

(ii) 0..729729xx11+ 0+ 0..8181xx22+ 0..99x+ 0 x33 = 0= 0..68676867, , xx11++ xx22++ xx33= = 00..83388338,, 11..331331xx11+ 1+ 1..2121xx22+ 1+ 1..11xx33 = = 11

Answer:

Answer: xx11 = 0.224545,= 0.224545, xx22 = 0.281364,= 0.281364, xx33 = 0.327891, Number of Pivoting = 2.= 0.327891, Number of Pivoting = 2.

(iii)

(iii) xx11−− xx22+ 3x+ 3x33 = = 22,, 33xx11−− 33xx22++ xx33 == −−11, , xx11++ xx22= 3= 3..

Answer:

Answer: xx11 = 1.187500,= 1.187500, xx22 = 1.812500,= 1.812500, xx33 = 0.875000, Number of Pivoting = 2.= 0.875000, Number of Pivoting = 2.

2.

2. DeterDetermine the number of operations to be mine the number of operations to be performperformed for Gaussian elimied for Gaussian elimination methnation method od for solvingfor solving an

an nn ×× nn systemsystem AAxx ==bb..

Answer:

Answer: Addition/Subtraction =Addition/Subtraction = nn((nn−−1)(21)(2nn+5)+5) 6 6 , Multiplication/Division =, Multiplication/Division = n n((nn22+3+3nn − −1)1) 3 3 .. 3.

3. Obtain the LU factoriObtain the LU factorization of the matrixzation of the matrix

4 4 1 1 11 1 1 44 −−22 3 3 22 −−44

Use this factorization to solve the system with

Use this factorization to solve the system with bb= (4= (4,, 44,, 6)6)T T ..

4.

4. Show that the followShow that the following matrix cannot be written in the ing matrix cannot be written in the LU factorizLU factorization form:ation form:

1 1 2 2 66 4 4 88 −−11 − −2 2 3 3 55

II.

II. Errors and NormsErrors and Norms

5.

5. SolvSolve the systee the systemm

x

x11+ 1+ 1..001001xx22= 2= 2..001001, , xx11++ xx22 = = 22

(i) Compute the residual

(i) Compute the residual rr == AAyy −−bb forfor yy = = (2(2,, 0)0)T T . (ii) Compute the relative error of . (ii) Compute the relative error of yy withwith

respect to the exact solution

respect to the exact solution xx of the above system (use Euclidean norm inof the above system (use Euclidean norm in RR22).).

6. Let 6. Let A A((αα) ) ==

00..11αα 00..11αα 11..0 0 22..55

Determine

Determine αα such that the such that the condicondition number of tion number of AA((αα) is minimized. Use the maximum row norm.) is minimized. Use the maximum row norm.

Answer:

(12)

7. Show that is

7. Show that is BB is a singular matrix, then the condition numberis a singular matrix, then the condition number κκ((AA) of a non-singular matrix) of a non-singular matrix AA satisfies satisfies 11 κ κ((AA)) ≤≤ ��AA −− BB�� ��AA�� ..

Use this estimate to get the lower bound for the condition number of the matrix (use the maximum Use this estimate to get the lower bound for the condition number of the matrix (use the maximum row norm) row norm) A A ==

11 −−1 1 11 − −11 � � �� 11 � � ��

Hint:

Hint: Definition of matrix norm implies, we can find a non-zero vectorDefinition of matrix norm implies, we can find a non-zero vector yy such that 1such that 1/κ/κ((AA)) ≤≤ ��AAyy��//((��AA����yy��). Since). Since BB is singular, there is a non-zero vectoris singular, there is a non-zero vector yy such that Bsuch that Byy = 0 which also= 0 which also satisfies above inequality. Use these facts to derive the desired inequality. The lower bound of  satisfies above inequality. Use these facts to derive the desired inequality. The lower bound of  κ

κ((AA) is 3) is 3//(2(2��) (ie.) (ie. 33 2

2�� ≤≤ κκ((AA)).)).

8.

8. EstimaEstimate the effect of a te the effect of a distudisturbance (rbance (��11,, ��22))T T  on the right hand side of the system of equationson the right hand side of the system of equations

x

x11+ 2+ 2xx22 = = 55,, 22xx11−− xx22 = 0= 0

if 

if  ||��11||,, ||��22|| ≤≤ 1010−−44 (use Euclidean norm for vector and maximum row norm for matrix).(use Euclidean norm for vector and maximum row norm for matrix).

Answer:

Answer: If If  δ δ xx denotes the effect of disturbance in solution, thendenotes the effect of disturbance in solution, then ��δ δ xx�� ≤≤ 11..1414 ×× 1010−−44..

III.

III. Iteration MethodIteration Method

9.

9. FFor an or an iteratiterative methive methodod xx((kk)) == BBxx((kk−−1)1)++cc, show that the error, show that the error ee((kk)) has the estimatehas the estimate

��ee((kk))�� ≤≤ ��BB��

k k+1+1

11 −− ��BB����cc��..

Use this estimate to find the number of iterations needed to compute the solution of the system Use this estimate to find the number of iterations needed to compute the solution of the system

10 10xx11−− xx22+ 2x+ 2x33−− 33xx44 = = 00,, x x11+ 10+ 10xx22−− xx33+ 2+ 2xx44 = = 55,, 22xx22+ 3+ 3xx22+ 20+ 20xx33−− xx44 == −−1010,, 33xx11+ 2+ 2xx22++ xx33+ 20+ 20xx44 = = 1515

using Jacobi method with absolute error within 10

using Jacobi method with absolute error within 10−−44 andand xx(0)(0)==cc..

Hint:

Hint: In class, we have provedIn class, we have proved ��ee((kk))�� ≤≤ ��BB��kk��ee(0)(0)��.. ButBut ��ee(0)(0)�� == ��xxxx(0)(0)�� ≤≤ ��xx(1)(1)xx(0)(0)�� ++

��BB����xx−−xx(0)(0)��.. In this inequality, solve forIn this inequality, solve for ��xx−−xx(0)(0)�� and substitute on the RHS of the firstand substitute on the RHS of the first inequality to get inequality to get ��ee((kk))�� ≤≤ ��BB�� k k 11 −− ��BB����xx (1)

(1)xx(0)(0)��.. Finally, takeFinally, take xx(0)(0)==cc to get the desired result.to get the desired result.

For Jacobi method, to have error

For Jacobi method, to have error ≤≤ 1010−−44, we need to have, we need to have k k >> 1818..9 and therefore,9 and therefore, kk may be takenmay be taken

as 19. Here we use Euclidean norm for vector and maximum row norm for matrix. as 19. Here we use Euclidean norm for vector and maximum row norm for matrix. IV.

IV. Eigenvalue ProblemEigenvalue Problem

10. Use Gerschgorin’s theorem to the following matrices and determine the intervals in which the 10. Use Gerschgorin’s theorem to the following matrices and determine the intervals in which the

eigenvalues must lie. eigenvalues must lie. (i) (i) AA ==

1 1 2 2 00 0 0 4 4 55 0 0 5 5 77

(ii)(ii) AA ==

4 4 1 1 00 1 1 4 4 11 0 0 1 1 44

(iii) A(iii) A ==

4 4 2 2 00 1 1 4 4 22 0 0 1 1 44

Use Power method to compute the eigenvalue which is largest in the absolute value and the Use Power method to compute the eigenvalue which is largest in the absolute value and the corresponding eigenvector for each of the above matrices.

References

Related documents

Table 3: black color, PC with MATLAB6, red color :quartet1 with MATLAB 7, green color :octet1.. In quartet1 and octet1, MATLAB use

VERIZON WIRELESS’S PRACTICES TO PREVENT MOBILE CRAMMING Verizon Wireless’s practices to prevent cramming fall into three broad categories: (1) adherence to the

NOMINATION : After selection of students or staff for the exchange programme, the liaison officer of the Sending University will transmit nominations to the

If both Web Credit Card 3.1 and eCheck 1.2 are installed on your college's Web server, BM1871 (Agent Program) and job group FG007D (Web Credit Card Processing) will run both types

a Transfer of purified rmIn α primed CD4+ T cells into naïve BALB/c recipient male mice provided highly significant protection against the growth of subsequently inoculated I-10

Wada E, Ishii R, Aita MN, Ogawa NO, Kohzu A, Hyodo F, Yamada Y (2013) Possible ideas on carbon and nitrogen trophic fractionation of food chains: a new aspect of food-chain

Our findings suggest that sitting time is significantly associated with diabetes and overall chronic disease, independent of physical activity; buil- ding upon existing literature

Fourth, there are also gender- based differences regarding the migrant parent: sons in primary school are a strong motivation for a longer length of stay of their migrant