CHAPER 6d. NUMERICAL INERPOLAION A. J. Clark School o Egieerig Departmet o Civil ad Evirometal Egieerig by Dr. Ibrahim A. Assakka Sprig ENCE - Computatio Methods i Civil Egieerig II Departmet o Civil ad Evirometal Egieerig Uiversity o Marylad, College Park Fiite Dierece Iterpolatio Example 4 Repeat Example usig a iite dierece table x (x) 5 8 x ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 99
Fiite-dierece able x x (x) (x) (x) x + x (x + x) (x) (x + x) x + x (x + x) (x + x) (x + x) x + x (x + x) (x + x) (x + x) (x + x) : : : : x +( -)x [x +( -)x] [x +( -)x] [x +( -)x] x +( -)x [x +( -)x] [x +( -)x] [x +( -)x] (x) (x + x) (x + x) : [x +( -)x] ::: (x) x + x (x + x) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Example 4 (cot d): x (x) 5 8 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No.
Fiite Dierece Iterpolatio First ad Secod Fiite Dierece he a quadratic polyomial o the orm () x bx + b x + b () he irst ad secod iite dierece are give as ad ( + b x) ( x) x + b ( x) b ( ) b x (8) (7) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Example 4 (cot d): Equatio 8 gives b ( x) (). 5 b b Equatio 7 gives b b b ( x) x + b ( x) + b ()() + b () + (.5)().5 ( x) [ ] ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No.
Fiite Dierece Iterpolatio Example 4 (cot d): Equatio gives () x b x.5 + b x + b () +.5() b Hece, the quadratic polyomial is + b () x.5x +.5x + ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Fiite Dierece Iterpolatio Example 4 (cot d): hereore, (.7) ca be estimated as (.7).5(.7) +.5(.7) + 6. 995 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 5 4
Fiite Dierece Iterpolatio Newto s Method Newto s method is a coveiet algorithm to id a th-order iterpolatio uctio with the use o a iite-dierece table developed or a give set o data poits. Reerrig to geeral orm o the iitedierece table, it ca be show that the irst diagoal row are give by ( x + x) () x () x ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 6 Fiite-dierece able x x (x) (x) (x) x + x (x + x) (x) (x + x) x + x (x + x) (x + x) (x + x) x + x (x + x) (x + x) (x + x) (x + x) : : : : x +( -)x [x +( -)x] [x +( -)x] [x +( -)x] x +( -)x [x +( -)x] [x +( -)x] [x +( -)x] (x) (x + x) (x + x) : [x +( -)x] ::: (x) x + x (x + x) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7 5
Fiite Dierece Iterpolatio Newto s Method From the iite-dierece table, i the irst diagoal, we otice the ollowig: () x ( x + x) () x () x ( x + x) () x () () x ( x + x) () x M () x ( x + x) () x ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8 Fiite Dierece Iterpolatio Newto s Method Equatio ca be rearrage to give ( x + x) ( x) + ( x) ( x + x) ( x) + ( x) ( x + x) () x + () x ( x + x) ( x) + ( x) M () ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 9 6
Fiite Dierece Iterpolatio Newto s Method he same procedure could be used or ay diagoal row. For example, the equatios or the ext diagoal row are ( x + x) () x + () x + () x ( x + x) () x + () x + () x 4 ( x + x) () x + () x + () x M ( x + x) () x + () x + () x () ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Newto s Method All these expasios have the orm o biomial expasio; thus they ca be rewritte as i ( x + mx) bi ( x) m i ( x + mx) ( x) + m ( x) ( ) m m + m () x + L+ () x (4) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7
Fiite Dierece Iterpolatio Newto s Method I geeral r r r+ ` ( x + mx) bi ( x) m i r r + r + m ( x + mx) () x + m () x + L+ () x (5) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Newto s Iterpolatio Formula Previous equatio ives the ollowig ormula: ( x) ( x ) + ( x ) + + ( ) ( ) L( m + ) m!! ( x ) m + L ( x ) (6) i which x x x (7) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8
Fiite Dierece Iterpolatio Example 5 Repeat example 4 usig Newto s ormula. x (x) 5 8 x ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Fiite Dierece Iterpolatio Example 5 (cot d): he ollowig iite-dierece table ca be costructed: x (x) 5 8 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 5 9
Fiite Dierece Iterpolatio Example 5 (cot d): he Newto s ormula i this case will be writte as ( ) ( ) ( ) ( ) x x + x + ( x ) (8) where the ollowig values ca be obtaied rom the iite-dierece table: x! (), (), ad (), ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 6 Fiite Dierece Iterpolatio Example 5 (cot d): x ( x ) ( ) ( x ) ( ) ( x ) ( ) i x (x) 5 8 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7
Fiite Dierece Iterpolatio x Example 5 (cot d): hereore, Equatio 8 ca be expressed as () () ( ) x + + () (9) ( x ) ( ) ( x ) () ( x ) ( ) ( x) ( x ) + ( x ) + ( )! ( x ) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8 Fiite Dierece Iterpolatio Example 5 (cot d): Equatio 9 gives the quadratic iterpolatio uctio or this example: () x + + o estimate (.7), we eed to id rom Eq. 7 as ollows x x.7.7 x.7 () (.7 ) x + (.7) + 6.995 ENCE CHAPER 6d. NUMERICAL INERPOLAION ( ) Slide No. 9
Fiite Dierece Iterpolatio Example 6 τ Use the Newto s iterpolatio ormula to id the agle o twist ad the largest torque which may be applied to the ocircular brass bar as show. Assume τ 4 6 Pa, a.64 m, b.5 m, L m, ad G 77 9 Pa. max c ab L φ c ab G b a L τ max ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio he ollowig table gives the costat c ad c values τ max c ab L φ c ab G a/b.5..5. c..46.58.67. c.96.9.49.6. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No.
Fiite Dierece Iterpolatio We eed to id two iterpolatio uctios or c ad c usig Newto s ormula. his will require two iite-dierece tables or c ad c as ollows: τ max c ab L φ c ab G b a L τ max ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Fiite-dierece able or c a/b c c c c.5..5..5..46.58.67..9 -. -. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No.
Fiite Dierece Iterpolatio Fiite-dierece able or c a/b c c c c.5.96...5..9.49.6..4 -. -.6.7 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Fiite Dierece Iterpolatio For c ad c, the Newto s iterpolatio ormula o Eq. 6 gives ( x) ( x ) + ( x ) + ( )! ( x ) + ( )( )! ( x ) () ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 5 4
Fiite Dierece Iterpolatio Fidig the Largest orque: a b a b.64.5 x.56 x.5 a x.5.5 b x x.56.5. x.5 ENCE CHAPER 6d. NUMERICAL INERPOLAION b a L τ max Slide No. 6 Fiite Dierece Iterpolatio Fidig the Largest orque: From the iitedierece table or c a b a b a b a b ( x ) c (.5). ( x ) c (.5) ( x ) c (.5).5 ( x ) c (.5). ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7 5
Fiite Dierece Iterpolatio Substitutig above values ito Newto s iterpolatio ormula o Eq., we have or c () x.+ (.5) () x +.+.5. ( ) ( ) ( )( ). + () ( ) 6 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8 Fiite Dierece Iterpolatio hereore For a / b.56,. c (.) ad..+.5(.). (. ) τ max c ab 6 4.594(.64)(.5) a τ max b L 44.8 N.m.594 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 9 6
Fiite Dierece Iterpolatio Fidig the Agle o wist: a b a b.64.5 x.56 x.5 a x.5.5 b x x.56.5. x.5 ENCE CHAPER 6d. NUMERICAL INERPOLAION b a L τ max Slide No. Fiite Dierece Iterpolatio Fidig the Agle o wist: From the iitedierece table or c a b a b a b a b ( x ) c (.5).96 ( x ) c (.5) ( x ) c (.5).. ( x ) c (.5). 7 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7
Fiite Dierece Iterpolatio Fiite-dierece able or c a/b c c c c.5.96...5..9.49.6..4 -. -.6.7 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. Fiite Dierece Iterpolatio Substitutig above values ito Newto s iterpolatio ormula o Eq., we have or c () x.96 + (.) () x +.96 +.. ( ) ( ) ( )( ). + (.7 ) ( ) ( )( ) +.7 6 6 ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8
Fiite Dierece Iterpolatio hereore, For a / b.56,. c (.).96 +.(.).586. +.7.. (. )(. ) 6 (. ) ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Fiite Dierece Iterpolatio hereore, a τ max φ c L ab G 44.8() φ 9.586(.64)(.5) (77 ).495 Agle o wist b L ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 5 9
Lagrage Polyomials Lagrage iterpolatio polyomials are useul whe the give data cotais uequal itervals or the idepedet variables x. I act, this is the case or may egieerig problems. he data collectio caot be cotrolled. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 6 Lagrage Polyomials he data are collected or oe variables (x), which is the idepedet variables, as a uctio o secod variable x. I the Newto s iterpolatio ormula, the idepedet variable x was assumed to be measured at a costat iterval, x. Lagrage method ca hadled problem with a varyig x. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 7
Lagrage Polyomials Deiitio he Lagrage iterpolatio polyomial is simply a reormulatio o Newto s polyomial that avoids the computatio usig iite dierece, ad that ca hadled problems with varyig iterval. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 8 Lagrage Polyomials Deiitio o erms he data sample is assumed to cosist o pairs o values measured o x ad (x), with x i beig the ith measured value o the idepedet variable. he method provides a estimate o the value o (x) at a speciied value o x, which is deoted x. ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 9
Lagrage Polyomials Deiitio o erms (x ) estimated value (x i ) measured value o depedet variable i,,,, he method ivolves a weightig uctio, with the weight give to the ith value o or x deoted as w i (x ). ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Lagrage Polyomials Lagrage Polyomial he Lagrage iterpolatig polyomial or estimatig the value o (x ) is give by ( x ) w ( x ) ( ) i i x i () ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4
Lagrage Polyomials Lagrage Polyomial Where i ( x ) i j j i j i j i ( x x j ) ( x x ) w () (x ) estimated value (x i ) measured value o depedet variable i,,,, w i (x ) weightig uctio Π the product o j ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4 Lagrage Polyomials Lagrage Polyomial Combiig Equatios ad, the result is ( x ) w ( x ) ( x ) + w ( x ) ( x ) + w ( x ) ( x ) + K+ w ( x ) ( ) x () ENCE CHAPER 6d. NUMERICAL INERPOLAION Slide No. 4