Sei sulla pagina 1di 17

Numerical Methods with EXCEL (Part 1)

Microsoft Excel is a very powerful and widely used spreadsheet. For our Numerical calculations we shall use Scientific Calculators as well as MS Excel.

Chapter 1: Numbers and Errors


Approximation to Numbers ecimal places (d!p!): The number of di its counted after the decimal mar!er. "i#ni$icant $i#ures (s!$!): "ll di its includin #ero are counted from the first non$#ero di it. %oundin#: The last retained di it is corrected up if the succeedin di it is reater than or e%ual to &' otherwise chopped off. Errors: "bsolute error ( True value "pproximate value )elative error (
T ru e v a lu e " p p ro x . T ru e v a lu e v alu e

*ercenta e of error ( )elative error +,, From the definition' if x ( -.&. /to . d.p.0' then
- &+& x < - &.&
.

or

. . + -.& . + . + , x < -.& .+ . + ,

. and the absolute error is + +, .

&$ a number is rounded to n decimal places' the maximum absolute error is + +, n ! . Consider two numbers .-&.- and ,.,,-.12 which are rounded to 3 s.f.. The errors can be estimated as follows For .-&.-' the relative error is
+ +, + .

..-&- +,

+ +, .

..-&-

<+ +, .
+ +, .

For ,.,,-.12. the relative error is

+ +, 1 .

&$ a number is rounded to n si#ni$icant $i#ures the maximum relati(e error is + +, n ++ ! . )a*lor+s )heorem with %emainder
f / x0 = f /a 0 + / x a 0 f /a 0 + / x a0 . / x a 0 n+ f /a 0 + + f .4 / n +0 4
/n0

-..12 +,

-..12

<+ +, .

/ n +0

/ a 0 + Rn / x 0

where

Rn / x 0 =

/ x a0 n f n4

/c 0 '

c lies between a and x.

Numerical Calculations usin# Excel


To calculate mathematical expressions we need to enter formula in the Excel. ata Entr*: There are three types of data that can be entered in a cell.

9 9

data t*pes examples descriptions 5"6E5 Solution text for caption C7NST"NT -..3& fixed numerical data F7)M85" (.9sin/a.0:. for calculation "ll formulas M8ST be in with an e%ual si n /(0. Most of the common functions are available in MS Excel with usual name. The function name can be typed in either upper or lower case' but Excel displays it in upper case. 5ist of functions can be searched by clic!in f x select a cate ory Select a function.

Curve Sketching Select data range. In the Insert menu, select Chart In the Chart Wizard, select Char type: XY (Scatter) and Chart sub-type. Select Finish t c mplete the diagram.

Example: Calculate f / x 0 = sin + x + e . ; x rounded to 3 d.p. for x ( ,.&' ,.2& and +.,. C 3 x f/x0 & ,.& (round/asin/c&0:exp/$.;c&0'30 1 ,.2& 2 +.,

Chapter ,: "olution o$ E-uations in .ne /ariable


Number o$ %eal %oots b* 0raphical Method )ewrite the e%uation f / x 0 = , as f+ / x 0 = f . / x0 . Then s!etch the raph of y = f+ / x0 and y = f . / x 0 *oints of intersection indicate the number of real roots of f / x 0 = , . Location o$ %oots <f f / x 0 is continuous in > a' b= and f / a 0 and f /b0 are opposite in si ns i.e. f /a 0 f /b0 < , ' then there exists odd number of real roots /at least one root0 of f / x 0 = , in /a' b0 . Method o$ "olution 1! 1isection Method 5et f / x 0 be continuous in >a , ' b, = and f /a , 0 f /b, 0 < , ' then an approximation to the root of f / x 0 = , is
x, = + / a, + b, 0 .

)epeat the process usin appropriate interval. ,! 2alse Position Method3%e#ula 2alsi Method3Linear Approximation " root of f / x 0 = , in /a' b0 may be approximated by the value of the x$intercept of the line ?oinin the points / a' f / a 00 and /b' f /b00 .
.

x+ = a

/b a 0 f /a0 f /b0 f / a 0

)epeat the process usin appropriate interval. 4! "ecant Method


" root near x, and x+ of f / x 0 = , may be approximated by the x$intercept of the secant line /chord0 ?oinin the points / x, ' f / x, 00 and / x+ ' f / x+ 00 . The iteration formula of the root is iven by / xn xn+ 0 xn++ = xn f / x n 0 ' n + f / xn 0 f / xn+ 0

5! Newton6%aphson Method The root of the e%uation f / x 0 = , may be approximated by x$intercept of the tan ent line throu h a uess value x , . The iterative formula for successive iteration is

x n+ + = x n

f / xn 0 ' n = ,' +' .' -' f / xn 0

For a simple root the conver ence of the method is of order two and for a multiple root it is linear. For a multiple root the rate of conver ence can be increased by the modi$ied Newton6 %aphson formula of the form

xn+ + = x n m
7! 2ixed Point &teration 2ormula

f / xn 0 ' n = ,' +' .' -' f / xn 0

where m is the multiplicity of the root.

<n order to find a root of the e%uation f / x 0 = , by iteration' rearran e the e%uation into a form x = g / x0. The iteration formula is then

xn+ + = g / xn 0 ' n = ,' +' .' -'

<f x, is an approximation close to a root of f / x 0 = , and x n ++ = g / x n 0 is an iterative formula used to find a root of the e%uation near x,' then
/i0

if g / x, 0 <+ the se%uence

x+ ' x. ' x- ' will conver

e to the root.

<n particular' /a0 if + < g / x, 0 < , ' then the se%uence will oscillate and conver e to the root. /b0 if , < g / x, 0 < + ' then the se%uence will conver e to the root without oscillation.
/ii0

if g / x, 0 + the se%uence

x+ ' x. ' x- ' will diver

e.

Example ,!1 @iven that f / x0 = . cos . x + . x . /a0 Find the number of real roots of the e%uation f / x 0 = , . /b0 Show that the e%uation f / x 0 = , has a root in /,.A' +.10 .
-

8se 6isection method twice to find the new smaller interval where the root lies. "pply false position /)e ula Falsi0 method in the interval obtained by the 6isection method to estimate this root correct to 3 decimal places.

/c0 /d0 /e0

8se Secant method twice to estimate the root of f / x0 = , to & decimal places with startin values x, = -.- and x+ = -.& . Show also that the root is correct to & d.p. The e%uation f / x0 = , has a root in the interval /..3' ..10 . 8se Newton$)aphson formula to estimate this root correct to & decimal places with a suitable startin value. "n iterative formula x n ++ = /+ k 0 x n + .k /+ + cos . xn 0 can be used to estimate the root of f / x0 = , . Find the ran e of values of k for which the iterative formula will conver e to the root near -.1 . 8se this iterative formula with a suitable value of k to estimate the root correct to - decimal places.

"olution /a0 The e%uation f / x 0 = , i.e. . cos . x + . x = , can be written as consider the
. cos . x = x . raphs of y = . cos . x

and y = x . .
3 .
-. -. -3

The two curves intersect at three points and hence the number of real roots is -. /b0
f /,.A0 =+.+3. f /+.10 = +.&B1 Cere f /,.A0 f /+.10 < , . Thus a root lies in /,.A' +.10 . "pplyin 6isection method on /,.A' +.10 ' we have ,.A ++.1 x+ = = +.. . f /+..0 = ,.12& and f /,.A0 =+.+3. . Now / , . A ' + . . 0 The root lies in . "pplyin 6isection method on /,.A' +..0 ' we have

<t can be seen that

x. =

f /+.,0 = ,.+122+ Now The root lies in /+.,' +..0 .

,.A ++.. = +., .

,.1232B and. f /+..0 =

Now applyin false position method on /+'+..0 ' we have


x+ = +

Now and 8sin false position method a ain

+ +.. /,.+122+ 0 = +.,-BA+ +.,-BA ,.+122+ / ,.1232B 0 f /+.,-BA+ 0 = ,.,+3++ f /+0 = ,.+122+ as the root lies in /+' +.,-120

x. = +

+ +.,-BA+ /,.+122+ 0 = +.,-12. +.,-12 ,.+122+ /,.,+3++ 0

" ain and hence

f /+.,-12. 0 = ,.,,,.+ f /+0 = ,.+122+ + +.,-12. x- = + /,.+122+ 0 = +.,-112 +.,-12 ,.+122+ / ,.,,,.+ 0

Thus x. and x- are same to 3 d.p. Cence the root correct to 3 d.p. is +.,-12. /c0 @iven startin values for Secant method is x , = -.- and x+ = -.& f /-.-0 = ,.1,,31& and and f /-.&0 = ,.,,2A,& 8sin Secant formula
x. = -.&
f /-.&,.1-3 0 = ,.,,+22. . Now )epeatin the calculation with x+ = -.& and x. = -.&,.1-3 we have

-.& -. /,.,,2A,& 0 = -.&,.1-3 ,.,,2A,& ,.1,,31&

-.&,.1-3 -.& /,.,,+22. 0 = -.&,.+32 ,.,,+22. ,.,,2A,& "fter .nd iteration' root to & d.p. is -.&,.+& . x- = -.&,.1-3

Similarly next iter&ation ives

x3 = -.&,.+32 -.&,.+&

Comparin "lternative if x. -.&,.+& is correct to & d.p. then

x- and x3 we can conclude that the root is correct to & decimal places.

x. = x-.&,.+& + +, &
.
-.&,.+3& x x -.&,.+&&
1 6ut f /-.&,.+3& 0 =A.2+ +, and f /-.&,.+&& Cence the root is correct to & decimal places. & 0 =A.2 + + , .

/d0 Dhen Newton$)aphson method applied to the e%uation' we have


f / x0 = 3 sin . x + ,...& and f / ..10 = ,.--2 and we may ta!e a startin value x, = ..& . Cere f / ..30 = 8sin Newton$)aphson formula we may proceed as follows:
x, = ..& f / x, 0 = f / ..&0 = ,.,12-.3
f / x 0 = . cos . x + . x

f / x, 0 = f /..&0 = ..A-&1B2

f / x, 0 ,.,12-.3 = ..& = ..321.&A ..321.1 f / x, 0 ..A-&1B2 f / x+ 0 ,.,,,1,2 x . = x+ = ..321.&A = ..32131A ..32132 f / x+ 0 ..AA&.-+ x+ = x,
x- = x . f / x. 0 +.-1 +, 2 = ..32131A = ..32131A ..32132 f / x . 0 ..AA3A-+
&

The root correct to & d.p. is ..32132.

/e0 <n this case the iterative function g / x0 is iven by


g / x 0 = + k 3k sin . x g /-.10 = + 3.+2& k and The iterative formula will conver e to the root near -.1 if + 3.+ 2 & k < + g /-.10 <+ or + < + 3.+2& k < + . < 3.+2& k < , /addin + to each expression0 . > 3.+2& k > , /multiplyin by + 0 ,.3AB1 > k > , /dividin by 3.+2&0 which ives the ran e of values of k. " suitable choice of k is
+ 3.+2& k , which ives k =
g / x 0 = /+ k 0 x + .k /+ + cos . x 0

Dith k = ,..3 ' the iteration formula becomes

+ = ,..-B& ,..3 . 3.+2&

x n ++ = + ,..3 0 x n + ./,..3 0/+ + cos . x n 0 = ,.21 x n + ,.3A /+ + cos . x n 0 Dith x, = -.1 ' the successive iterates are iven below:

n , + . 3

xn -.1 -.&,A,+ -.&,.A1 -.&,..3 -.&,.+1

xn /to 3 d.p.0 -.1,,, -.&,A, -.&,.B -.&,.. -.&,..

The root correct to 3 d.p. is -.&,...

Chapter 4: "olution o$ "*stem o$ Linear E-uations


De shall consider the followin techni%ues which are suitable for numerical solution of linear system. 1 0aussian Elimination with Partial Pi(otin# /a0 Select pivotal e%uation for a variable for elimination /the e%uation with maximum numerical coefficient of that variable in the system0. /b0 Eliminate the chosen variable from the remainin e%uations with respect to the pivotal e%uation. /c0 )epeat the process for the subsystem. /d0 8sin bac!$substitution find solutions by usin pivotal e%uations. Example 4!1 Solve the followin linear system by the @aussian elimination with partial pivotin ' ivin your answers to - decimal places.
& x ++. y + B z = &' A x +++ y + ., z = -& ' +1 x + & y + 2 z = .B

Ta!in first e%uation as the pivotal e%uation we can write the system as .pration Coe$$icient o$ %! 8! E-! 9 Chec: "! "um x y z +1 & 2 .B E%+9 &2 & +. B & E%. -+ A ++ ., -& E%23 E%+;+1 + ,.-+. ,.3-2& +.A+.& E%39 -.&1.& E%.;& + & +.A,,, +.,,,, E%& 1..,,, E%-;A + ..3,, ..&,,, 3.-2&, E%1 B..&,, , +.-2& , ..,A2 +.-1.& E%299 ..1-2& E%& E%3 ,.A+.& & ..,1.& &.1A2& ..&1.& E%A E%1 E%3 +.,1. & E%2;..,A2& + ,.1&.2 E%B99 +..1-& ,.-AB. E%A;+.,1.& + +.B3+. &.-&-, ..3++A E%+, +..AA& ..A,+, E%++ 3.,AB& E%+, E%B E%++;+..1A& + ..+2-A E%+. -.+22A Solution of the system is obtained by the bac! substitution as follows: From /E%+.0 z == ..+2-A y = ,.-AB. ,.1&.2 ..+2-A = +.A,A, From /E%B0 x =+.A+.3 ,.-+.& / +.A,A, 0 ,.3-2& ..+2-A =+.3.13 From /E%30 Note: To chec! the calculations an extra column headed by chec: sum is included which is the sum of the numbers in the row. <t is also wor!ed out in exactly the same way as the other numbers in the line. ,! Matrix 2actori;ation Method
2

<n this method the coefficient matrix A is decomposed into the product of a lower trian ular matrix L and an upper trian ular matrix <. A=L< The system of e%uations becomes L<X=1 De rewrite this system as <X=> L>=1 De first solve for > usin forward substitution and then find X usin the bac! substitution. <n practice we use one of the followin alternatives to et uni%ue factori#ation: /a0 Crout+s formalism: "ll the dia onal elements of 8 is choesen +. /b0 olittle+s formalism: "ll the dia onal elements of 5 is choesen +.

Example 4!,:

@iven that A (

+ . - - 3 + + & + 3+ .
'

1(

& . + + &

'

X(

x y z

/i0 Eetermine a lower trian ular matrix L and an upper trian ular matrix < such that 5 8 ( ". /ii0 8se the above factori#ation to solve the e%uation A X = 1!

"olution:

(i)

5et

A(

+ . - - 3 + + & + 3+ .

(L<(

a ,, + ml db , +, n fec +,,

a al am b bl + d b m + d n c cl + e cm + en + f

E%uatin the correspondin elements of the two matrices' we have


a =+ b =c =&

a l =.
a m =b l +d = 3 c l + e =+3

or or or

. =. + m =or d = 3 -/ .0 = .

or

l=

e =+3 &/ .0 = 3

b m + d n =++

or

n=

c m + e n + f =+.

f =+. &/-0 3/ +0 =+

+ (++ -/-0 ) = + .

Thus

L(

+ , - . & 3

, , +

<(

+ . - , + + , , +

/ii0 The e%uation can be written as AX = L<X = L? = 1 where

<X = ?

and

?(

y+ y. y -

Consider the solution of L? = 1

or

+ , - . & 3
y+ = &'

, y+ , y. + y-
y . = -'

& . + + &

8sin forward elimination' we have Now consider the solution of <X = ?

y- = .

or

+ . - x & , + + y - , , + z .
(
x =+' y = +' z =.

8sin bac!ward elimination' we have and hence

F(

+ + .

4! &terati(e Method <terative method for linear system is similar as the method of fixed$point iteration for an e%uation in one variable. To solve a linear system by iteration' we solve each e%uation for one of the variables' in turn' in terms of the other variables.
+,

"n iterative method conver es' for any choice of the first approximation' if every e%uation satisfies the condition that the ma nitude of the coefficient of solvin variable is reater than the sum of the absolute values of the coefficients of the other variables. " system satisfyin this condition is called dia onally dominant. " linear system can always be reduced to dia onally dominant form by elementary operations. (a) @acobi+s Method Startin with an initial set of values' if not iven' derive a new set of solution. )epeat the calculations till the re%uired accuracy is obtained. (b) 0auss6"eidel Method Start with initial values and update the value of variables in each calculation. Example 4!4 8se three$di it roundin arithmetic to solve the followin system by@auss$Seidel iteration method.
+. x . y + & z = ., ' 3 x + & y +++ z = A' 2 x ++. y ++, z = .2

Dithout chan in the order of the e%uations' we have + . > . +& +. x . y + & z = ., /E+0 & < 3 + + + 3 x + & y +++ z = A /E.0 + , < 2 ++ . 2 x ++. y ++, z = .2 /E-0 and is not dia onally dominant. "rran in the system as /E+0' /E-0 /E.0' /E.0' we have
+ . > . +& 2 > - + + + + > 3 +&

for x for y for z

+. x . y + & z = ., - x + 2 y z = +B 3 x + & y +++ z = A

The system reduces to dia onally dominant form. The @auss$Seidel iterative formulas of the above system are xn + + = + ( . , + . y n & z n ) +. y n + + = + ( +B -xn + + + z n ) 2 z n + + = + ( A 3 xn + + & yn + + ) ++ Startin with initial values
x, = ,' y , = ,' z , = ,

we et the solutions as follows: First approximation: x+ = + >., + , + ,= = +.12 +. y+ = + >+B -/+.120 + ,= = ..,, 2 z+ = + >A 3/+.120 &/.0= = ,.2B ++
++

Second approximation: x . = + >., + ./..,,0 &/ ,.2B0= = ..-+. y . = + >+B -/..--0 ,.2B= = +.1, 2 z . = + >A 3/..--0 &/+.1,= = ,.AB ++ Third approximation: x- = + >., + ./+.1,0 &/ ,.A&0= = ...B +. y- = + >+B -/...B0 ,.A&= = +.1+ 2 z- = + >A 3/...B0 &/+.1+= = ,.A3 ++ Fourth approximation: x 3 = + >., + ./+.1+0 &/ ,.A30= = ...B +. y 3 = + >+B -/...B0 ,.A3= = +.1+ 2 z 3 = + >A 3/...B0 &/+.1+= = ,.A3 ++ which ives the results correct to . d.p. <t can be observed that the @auss$Seidel method conver es twice as fast as the Gacobi method.

Chapter 5: &nterpolation and 2inite i$$erences


Pol*nomial &nterpolation @iven the values of a function f/x0 at /n:+0 distinct points x, ' x+ ' x . ' ' x n we can construct a uni-ue polynomial of de ree less than e%ual to n which satisfies the conditions
p / xi 0 = f / xi 0' i = ,' +' .' -' ' n

0eneral 2orm "n nth de ree polynomial can be ta!en as


p / x0 = a , + a+ x + a . x . + a- x - + + a n x n

To fit this polynomial to /n:+0 set of points we have to solve /n:+0 simultaneous e%uations and is very tedious.

Newton 2orm " form which is convenient to use is su


p / x 0 = a , + a+ / x x, 0 + a . / x x, 0/ x x+ 0 + + a n / x x, 0/ x x+ 0 / x x n + 0

ested by Newton is

i(ided i$$erences Eivided differences are defined as follows:


f > x, = = f / x, 0

+.

f > x+ = f > x, = x+ x, f > x+ ' x . = f > x, ' x+ = f > x, ' x+ ' x- = = x . x, AAAAAAAAAAAAAAAAAAAAA!! f > x+ ' x . ' ' x n = f > x, ' x+ ' ' x n + = f > x, ' x+ ' x- ' ' x n = = x n x, Note that divided differences are symmetric about their ar uments. f > x, ' x+ = =

Newton &nterpolation 2ormula <n terms of the divided differences interpolatin polynomial can be written as
p/ x 0 = f > x , = + f > x , ' x+ =/ x x , 0 + f > x , ' x+ ' x . =/ x x , 0/ x x+ 0 + + f > x, ' x+ ' x . ' ' x n =/ x x, 0/ x x+ 0 / x x n + 0

+-

Example 5!1

The table below ives the values of x and f/x0: x: f/x0 : + 2 + + . A .B 3 1A

/i0 Construct a divided$difference table for the above data. /ii0 Find the polynomial of least de ree that incorporates the values in the table and find f /&0 . /iii0 Find by linear interpolation a real root of f / x 0 = , . /iv0 Find the polynomial g / x0 that ta!es the values of the above table and g /&0 = .,- . "olution: /i0 The divided difference table for the iven data is as follows: x f(x) !"# $ !%# $ !&# $ !'# $ -" -( " -" & % ) * % & %* %" + " ' +) &* * " ,

/ii0 The needed differences are enclosed by the double lined box. 6y NewtonHs divided difference formula' we et and
= 2 ++A + 3A + 2. = +-+

f / x0 = 2 +-/ x ++0 +./ x ++0/ x +0 ++/ x ++0/ x +0/ x .0 f /&0 = 2 +-/10 +./10/ 30 ++/10/ 30/ -0

f /+0 f / .0 = / +0/ A0 = A <, /iii0 Cere Thus a root is in /+' .0. From the table' we have x f/x0 +EE + + . A B Thus the root is the solution of f / x 0 = + +B/ x +0 = ,

or

x = ++ + +.+++ B
g / x 0 = f / x 0 +b/ x ++0/ x +0/ x .0/ x -0/ x 30

/iv0 The polynomial g / x0 can be written as where b is a constant. Ta!in x = & ' we have or Cence

g /&0 = f /&0 +b/10/ 30/ -0/ .0/+0

.,- = +-+ ++33 b .,- +-+ 2. + b= = = +33 +33 .

The re%uired polynomial is g / x 0 = f / x0 + + / x + +0/x +0/x .0/x -0/x 30 . 2inite i$$erence .perators
+3

"ssume that the tabular points x, ' x+ ' x . ' ' x n are e%uispaced' that is
x r = x, + rh' r = ,'+'.' ' n

with step si#e h. De define f / x r 0 = f / x r + h0 "hi$t .perator: f / x r 0 = f / x r + h0 f / x r 0 2orward i$$erence .perator: 1ac:ward i$$erence .perator: f / x r 0 = f / x r 0 f / x r h0 Central i$$erence .perator: f / xr 0 = f / xr + h 0 f / xr h 0 . . A(era#in# .perator: f / xr 0 = f / xr + h 0 + f / xr h 0 . . )epeated applications of the difference operators ive the followin hi her order differences:
n f / x r 0 = f / x r + nh 0
+ + n f / x r 0 = n f r ++ n fr n n + n + f / xr 0 = f r ++ fr

where f r = f / x r 0 . De also have

f > x , ' x+ ' x . ' ' x k = =

+ k 4h
k

k f, =

+ k 4h k

k f k

Newton60re#or* 2orward i$$erence &nterpolation )eplacin the divided differences in the Newton interpolation formula by the forward differences' we have
p / x0 = f , +

/ x x, 0 / x x, 0/ x x+ 0 . / x x, 0/ x x+ 0 / x x n+ 0 n f , + f , + + f, . h .4h n 4h n

x x, x x+ = s + and so on ' we have h h The above interpolation formula becomes

Substitutin

s=

p / x 0 = f , + s f, +

s / s +0 . s / s +0/ s .0 / s n ++0 n f , + + f, .4 n4

x x, . h Newton60re#or* 1ac:ward

where s =

i$$erence &nterpolation

)eplacin the divided differences in the Newton interpolation formula by the bac!ward differences' we have / x xn 0 / x xn 0/ x xn+ 0 . / x xn 0/ x xn++ 0 / x x+ 0 n p/ x0 = f n + f n + fn + + fn . h .4h n 4h n x xn x xn+ u= = u + + and so on Substitutin ' we have h h The above interpolation formula becomes
p / x 0 = f n + u fn + u /u ++0 . u /u ++0/ u + .0 /u + n +0 n f n + + fn .4 n4

where u = / x xn 0 ; h .

+&

Example 5!, The followin are the number of deaths in five successive ten years a e roups. Find the number of deaths for the a e roup -+ I 3& and exactly at the a e of 1,. " e roup Eeaths /in thousand .+ $ -, +2.3 -+ I 3, .+.& 3+ I &, .1.2 &+ $ 1, -..-

"olution Eata is iven in roups and hence it cannot be fitted with a polynomial directly. Consider the cumulative fre%uency and then construct the difference table. " e less than x /years0 -+ 3+ &+ 1+ No. of deaths f/x0 /in thousands0 1B!5 -A.B 1&.1 B2.B
f
. f f

,1!7 .1.2 -..-

7!, &.1

C!5
x -+ +,

The interpolated polynomial is


f / x 0 +2 .3 +.+ .& s +

The number of deaths for the a For x = 31 ' s =

31 -+ = +.& and +,

&.. ,.3 s / s +0 + s / s +0/ s .0 .4 -4 e roup -+ I 3& ( f / 31 0 f /-+ 0

where s =

f / 31 0 =+2 .3 + .+ .&/+.&0 +

&.. ,.3 /+.&0/ ,.&0 + /+.&0/ ,.&0/ ,.&0 =&+.&1B . 1

The number of deaths for the a e roup -+ I 3& ( &+.&1B +2.3 ( -3.+1B thousands. The number of deaths at the a e of 1, can be estimated from f /1+ 0 f /1, 0. For x = 1, ' s =
1, -+ = ..B and +,

f /1, 0 =+2 .3 + .+ .&/ ..B0 +

&. . ,.3 /..B0/+.B0 + / ..B0/+.B0/ ,.B0 = . 1

The number of deaths at the a e 1, ( B2.B I B3.3,2 ( -.3B- thousands.

La#ran#e &nterpolatin# Pol*nomial


5a ran e polynomial of de ree one passin throu h two points / x, ' y , 0 and / x+ ' y+ 0 is written as x x, x x+ L+ / x 0 = y, + y+ x, x+ x+ x, 5a ran e polynomial of de ree two passin throu h three points / x, ' y , 0 ' / x+ ' y+ 0 and / x . ' y . 0 is written as / x x, 0/ x x. 0 / x x, 0/ x x+ 0 / x x+ 0/ x x. 0 L. / x0 = y, + y+ + y. / x, x+ 0/ x, x. 0 / x+ x, 0/ x+ x. 0 / x. x, 0/ x. x+ 0
+1

5a ran e polynomial of de ree three passin throu h four points / x, ' y , 0 ' / x+ ' y+ 0 ' / x . ' y . 0 and / x- ' y - 0 is written as / x x+ 0/ x x. 0/ x x- 0 / x x, 0/ x x. 0/ x x- 0 L- / x 0 = y, + y+ / x, x+ 0/ x, x. 0/ x, x- 0 / x+ x, 0/ x+ x. 0/ x+ x- 0 / x x, 0/ x x+ 0/ x x- 0 / x x, 0/ x x+ 0/ x x. 0 + y. + y/ x. x, 0/ x. x+ 0/ x. x- 0 / x- x, 0/ x- x+ 0/ x- x. 0 Similar for hi her de ree polynomials. Example 5!4 The followin table ives the values of an empirical function f/x0 for certain values of x. x , + . f/x0 3 + A .B 8se the 5a ran e interpolation formula to estimate /i0 the value of f / ..&0 /ii0 the root of the e%uation f/x0 ( , to - decimal places. /i0 "pplyin 5a ran eHs formula' we have
f / x0 = 3 / x +0/ x .0/ x -0 / x ,0/ x .0/ x -0 + /, +0/ , .0/ , -0 /+ ,0/+ .0/+ -0 / x ,0/ x +0/ x -0 / x ,0/ x +0/ x .0 +A + .B / . ,0/ . +0/ . -0 /- ,0/ - +0/ - .0
/+.&0/ ,.&0/ ,.&0 / ..&0/ ,.&0/ ,.&0 + / +0/ .0/ -0 /+0/ +0/ .0

and

f / ..&0 = 3

/ ..&0/+.&0/ ,.&0 / ..&0/+.&0/ ,.&0 +.B / .0/+0/ +0 /-0/ .0/+0 = ,..& + ,.-+.& + 2.& + B.,1.& +A

/ii0 5et y = f / x0 . Then the root of f / x 0 = , corresponds to y =, . To find the root let us use the 5a ran e formula in reverse order i.e. consider the polynomial in terms of y. y 3 + A .B x , + . Then
x = , ++

=+1 .1.&

/ y + 30/ y A0/ y .B 0 / y + 30/ y ++0/ y .B 0 / y + 30/ y ++0/ y A0 +. +/ + + 30/ + A0/ + .B 0 /A + 30/ A ++0/ A .B 0 / .B + 30/ .B ++0/ .B A0 x = , ++ / 30/ A0/ .B 0 / 30/+0/ .B 0 / 30/+0/ A0 +. +/-0/ B0/ -, 0 /+. 0/ B0/ .+ 0 /-- 0/ -, 0/ .+ 0

Dhen y =, ' then

Thus a root of the e%uation f / x 0 = , to - d.p. is +..3- .

= +.+3&2 + ,.+,.- ,.,,31 =+..3-3

+2

Potrebbero piacerti anche