PGE 30: Formulato ad Soluto Geosystems Egeerg Dr. Balhoff Iterpolato Numercal Methods wth MATLAB, Recktewald, Chapter 0 ad Numercal Methods for Egeers, Chapra ad Caale, 5 th Ed., Part Fve, Chapter 8 ad Appled Numercal Methods wth MATLAB, Chapra, d Ed., Part Four, Chapters 5 ad 6 How Fast are you gog? What tme s t?
Basc Ideas of Iterpolato Mathematcal equvalet of readg betwee the les Data - dscrete samples of some fucto, f() Uses a terpolatg fucto betwee pots Data mght Est as a epermet Aalytc fucto that s dffcult to evaluate 3 Iterpolato versus Curve Fttg (Regresso) Iterpolato Data assumed eact Iterpolatg fucto betwee pots Curve passes EXACTLY through the data pots Curve Fttg Ucertaty data Uses a regresso curve to ft data Curve passes ear the pots 4
Types of Iterpolato Sgle Polyomal Dvded Dfferece Lagrage Idetcal Multple polyomals Hermte Lagrage 5 Newto s Dvded-Dfferece s a Useful Form For pots, I ca always ft a - degree polyomal Le b/w pots Parabola b/w 3 pots 5 th order polyomal b/w 6 pots Fd coeffcets of polyomal Stadard Form P( ) a a a a 0 Newto s Dvded Dfferece P ( ) bb b( ) ( ) 6
Lear Iterpolato (Smplest Dvded-Dfferece) Newto-Form: P( ) b b Image Smlar Tragles: f ( ) f ( ) f ( ) f ( ) f( ) f() f( ) f( ) f ( ) f( ) f( ) 7 Geeral Form- Newto s Iterpolatg Polyomals P( ) bb b( ) ( ) Where the b s are: b f( ) b f[, ] b f,, 3 3 b f,,,, The dvded dffereces are: f ( ) f( j) f, j j f [, j] f[ j, k] f, j, k,,, f k f [,, ] f[,,, ] 8
Lear Iterpolato for f()=l() 9 Quadratc Iterpolato eample 0
Hgher Order Estmate Lagrage Iterpolatg Polyomals Stadard Form: Newto s Form: P( ) a a a a 0 P ( ) bb b( ) ( ) Lagrage s smply a reformulato of the Newto polyomal!!!! Avods computato of Dvded Dffereces P ( ) L ( ) f( ) Lj ( ) j j j k k j k k j Lagrage Form: P( ) L f( ) L f( ) L f( ) 3 L 3
Problems wth Sgle Polyomal Iterpolato N- Order polyomal through N pots Forces oscllatos whch probably do t est aturally Addg More pots ca make t worse How do we f the problem? Coect a seres of terpolatg fuctos 3 Revew Ulke Curve Fttg, Iterpolato goes eactly through the data pots Iterpolatg Polyomals: ft - order polyomal to data pots Newto Dvded Dfferece P ( ) bb b( ) ( ) Lagrage Polyomals P ( ) Lf( ) Lf( ) Lf( ) L ( ) j k k j k k j Dvde Dfferece ad Lagrage are equvalet! 4
Pecewse Polyomals Not always a good dea to ft a sgle polyomal to data pots Especally whe gets really bg (lke 0 or so) Lots of oscllatos ca result error Coect together a seres of pecewse polyomals Sples A few dfferet types of sples Lear fuctos match at kot pots Quadratc dervatves ALSO match at kot pots Cubc st ad d dervatves match at kot pots 5 Pecewse Polyomal Iterpolato Practcal soluto to hgh-degree polyomal terpolato Use set of lower degree terpolats Each defed o sub-terval of doma Used stead of sgle fucto appromato Relatoshp b/w adjacet pecewse fuctos s of fudametal mportace Shape s affected by costrats o cotuty 6
Pecewse Lear Iterpolato Smplest scheme uses lear terpolats Cotuty I fucto at breakpots But NOT the dervatves Calculate lear terpolats usg Lagrage ) ( y y y L y L f Lear Lagrage polyomal For each (-) sub-secto,,..., ) ( y y f 7 Cubc Sple 8
Cubc Sple Iterpolato Stadard Form: Lagrage Form: f ( ) a 3 We wll derve. b c d Fd the coeffcets for each - polyomals Basc Idea: Force cotuty st ad d dervatves at kots (-) sples & 4 coeffcets each = 4*(-) ukows. (-) kow fucto values. - dervatves must be equal at INTERIOR kots 3. - secod dervatves must be equal at INTERIOR kots 4-6 costrats, but 4-4 ukows eed more costrats! 9 Optos for Addtoal Costrats o Ed Pots?. Fed-slope ed codtos costra the frst dervatve o the ed pots. Not-a-kot ed codtos requres cotuty thrd dervatve at frst teral kot. Most accurate codto 3. Natural sple ed codto force secod dervatve equal to zero (We ll use ths oe) f "( ) 0 ad f "( ) 0 (These are the last two costrats I eed!) 0
Cubc Sple Dervato Forcg cotuty d dervatve gves: f f f " " "( ) ( ) ( ) Itegratg equato twce gves cubc sple formula f ( ) f ( ) f " " 3 3 ( ) 6( ) 6( ) " f ( ) f ( )( ) 6 " f ( ) f ( ) ( ) 6 Ca plug s ad f( ) s, but stll do t kow the d dervatves Calculate Secod Dervatves for Cubc Sple But Frst dervates must be equal at the teral kots f ( ) f ( ) ' ' Dfferetate the cubc sple equato ad equate: ( ) f ( ) ( ) f "( ) ( ) f "( ) " 6 6 [ f( ) f( )] f( ) f( ) Wrte the above equato for each teral kot ad substtute secod dervatve = 0 for ed pots (atural ed codto) results as may equatos as ukows. Solvg for secod dervatves, I ca the plug back to cubc sple equato
Cocluso Curve Fttg: Best Ft curve to data Iterpolato: Fucto passes THROUGH all the data Newto/Lagrage: - order polyomal for pots Hermte ad Sple: Pecewse polyomals Cubc Sple Does ot requre kowledge of dervatves a pror Forces cotuty of frst ad secod dervatve 3