수치해석기초 (Elemetary Numercal Aalyss II. Iterpolato 8. 9 담당교수 : 주한규 ooha@su.ac.r, x94, Rm 3-5 5 원자핵공학과
Iterpolato Itroducto to Iterpolato Approxmato of Fucto Iterpolato ad Polyomal Approxmato Polyomal Iterpolato Lagrage Iterpolato t Newto Iterpolato Hermte Iterpolato Pecewse Polyomal Iterpolato Pecewse Lear Iterpolato Cubc Sple Iterpolato
Approxmato of Fucto What s approxmato of a fucto? Approxmate a true fucto f(x by a easly mapulated, lower order fuc. P(x f f(x P(x x Two Forms of Approxmate Fucto P(x Lear Combato Ratoal Form Px ( = ag( x ag( x L ag( x Px ( = bg ( x bg ( x L bg ( x ag ( x ag ( x L a g ( x Types of Approxmato Problems Iterpolato of tabulated data, passg through all data pots gve Curve Fttg of expermetal or ucerta data wth least squared error Mmze the maxmum error of approxmato (mmax m m 3
Polyomal Iterpolato What s polyomal terpolato? Gve base pots x x x x f f f f Fd a fucto passg through all gve pots by a polyomal = = f ( x P ( x a x Needs Replace f(x, whch would be dffcult to evaluate ad mapulate, by a smpler, more ameable fucto P(x Estmate the fuctoal values, dervatves or tegrals of f(x whch s ow quattatvely for a fte umber of argumets called base pots Forms of Polyomal Power Form P( x = a ax ax L ax Shfted Power FormP( x = a a( x c a( x c L a ( xc Newto Form L L P( ( x = a a ( x c a ( xc ( x c a ( xc ( xc 4
Lagrage Iterpolato Lagrage Polyomal Theorem If f(x s a real-valued fucto whose values are gve at the dstct pots, x, x,, x, the there exsts a uque polyomal P(x of degree at most such that f ( x = P( x =,, L, where P ( x = f ( x L ( x = ad Lagrage Kerel L ( x = ( x x ( x x ( x x ( x x L( x x ( x x L( x x ( ( ( ( ( = = x x x x L x x x x L x x 5
Dervato of Lagrage Iterpolato Formula Let ( ( f x P x = a ax ax L ax At pots gve, requre f = f( x = P( x, f = a a x a x L a x M f = a a x a x L a x T } l T T T P( x = p α = pg f= lf= L( x f = Costrat: f = P( x = L( x f L( x = δ = Let L( x = C ( x x = T p α T p = xx f f = M f f=gα α = G f Lx [ L x L L x ] T pg = l= a α = M a L ( x ( (, M, L ( x x xl x x G = M O M x x x x L C = ( x x L ( x = ( x x ( x x = = 6
Rolle s Theorem Ex. for = 6, 7 zeros for g(t zeros f (x f ( x a b a η b There exsts ξ (, for whch f ( ξ = ạb f ( x zeros If there are zerosof f ( x, x, L, x, the there s a pot wth [ x, x ] ( such that f ( ξ = ( f ( x ( f ( x ξ zeros zero 7
Error of Lagrage Iterpolato Let f( x = P ( x E( x Ex ( = f( x P( x Ex ( =, =,,..., Ex ( = Sx ( ( x x = f(x E(x f(x Df Defe gt ( = f ( t P( t S ( x ( tx t [ a, b] gx ( = =,,..., gx= ( = [ x, x ] [ a, b] zeros [ a, b] P(x x ( ( Rolle's Theorem: g ( ξ = = f ( ξ (! S( x for some ξ = ξ( x ( ( f ( ξ ( x f ( ξ Sx ( = ξ ( ab, Ex ( = ( xx at least order of o x (! (! = 8
Newto Iterpolato Drawbacs of Lagrage Iterpolato Excessve amout of calculato s requred whe may terpolatos are to be doe usg the same data set. No estmated error ca be made, uless the hgh order dervatves ca be evaluated. The addto of a ew term requres complete recomputato. These are avoded by Dvded Dfferece scheme. Dvded Dfferece ( 차분상 Defto. f[ x ] = f( x. 3. 4... f[ x, x ] = f [ x, x, x ] = f [ x ] f [ x ] f ( x f ( x = x x x x x x f[ x, x ] f[ x, x ] x x The order of x ' s [... ] does ot matter. f( x f( x f( x = ( x x ( x x ( x x ( x x ( x x ( x x 9
Newto Iterpolato Let f ( x = P ( x E( x = a a ( x x a ( xx ( x x L a ( x x E( x = f ( x = P( x = a E( x Requre Ex ( = a = fx [ ] f [ x] = f[ x ] a ( x x a ( xx ( x x L a ( xx ( xx L( x x E( x Dvde by x x after movg f[ x ] to LHS f[ x] f[ x ] Ex ( f [ x, x ] = a a ( x x L a ( x x L ( x x Isert x = x a = f[ x, x ] = f[ x, x ] x x x x Ex ( f[ x, x] = f[ x, x] a( x x L a( xx L( x x ( x x f [ xx, ] f[ x, x] Ex ( = f[ x, x, x ] = a L a ( xx L( x x x = x a = f[ x, x, x] = f[ x, x, x] ( ( x x xx xx Ex ( f[ x, x, x] = f[ x, x, x] a3( x x3 L a( x x L( x x ( x x ( x x I geeral, a = f[ x, x, Lx, x ] Ex ( L L f[ x, x, L, x ] = f[ x, x, L, x] f[ x, x,, x ] f[ x, x,, x] Ex ( = ( xx = f [ xx,, L, x] ( x x ( x x x x = = = P ( x = f [ x ] f [ x, x ]( x x L f [ x, x, L, x ] ( xx =
f [ x ] = f( x = f f[ x, x ] = M f x x x More About Dvded Dfferece f [ x ] f[ x ] x x -th order D.D ( 계차분상 f[ x, x, L, x ] f[ x, x, L, x ] [,, L, ] = : Defto x x = f = = x x Proof f f f f f[ x, x] = = x x x x x x x x Let f[ x, L, x ] = f = = x x
By Defto f [ x, L, x, x ] More About Dvded Dfferece f [ x, L, x ] f[ x, L, x] = x x = x x x x x x f f = = = = = f f f f x x = x x = = x x = = x x = x x = f f x x f x x x x x x x x = = = = x x = x x = f f f = x x = = x x x x x x x x = x x
More About Dvded Dfferece x x = f f f ( ( = x x = = x x x x x x x x = x x = f f f = x x = = x x = x x = f = = x x QED... s uchaged f x values are gve regardless of the order of x 's. x : y = [ y ] [ y, y ] x y y y y y [, ] [,,, ] x y y y y y : = [ ] [,, ] y y y y y y3 : = [ ] [,, 3] [ y, y3] 3: 3 = [ 3] x y y 3
Polyomal Propertes of Dvded Dfferece ( f ( ξ( x f( x = P ( x ( x x (! = ( f ( ξ = a a( x x L a( x x ( x x = (! = a f( x f( x = = f[ x, x ] x x Dvde oce by ( x x Dvde (-tmes ( f ( ξ = (! = f [ xx, ] = a a( x x L a ( x x ( xx = f[ x, x ] a ( x x L ( f ( ξ f [ x, x, L, x] = f[ x, x, L, x ] a( x x ( xx ( xx (! f xx x f x x x f ξ ( [,, L, ] [,, L, ] ( ξ = a ( xx x x (! ( f ( f [ x, x L = L ξ,, x ] [,,,, ] ( f x x x x x x (! a = f [ x, x, L, x ] ( f ( ξ (! = f[ x, x, L, x, x ] Exact Error at x 4
Hermte Polyomal Obectve: Fd a polyomal satsfyg the dervatve as well as fucto value x x x x f f f f costrats f f f f Defe a (-th order polyomal as:, 3 Codtos, (=,, L, H( x = δ Hˆ ( x = 3 Hˆ ( x = δ 4 H ( x = Px ( = fh( x fh ˆ ( x = = Hˆ ( x = c ( xx ( xx L ( xx ( x x ( xx L ( xx ˆ ( ( ( ( H x = c x x c xx xx = = ull after dfferetato except = c( x x ( xx = 5
Hermte Polyomal H x c x x c x x x x ˆ ( ( = ( ( = = = ˆ H ( x = ( xx ( xx = ( x x = c = = ( x x = ( xx = ( x x ( x x = ( x x L( x Note : L ( x = δ Let H ( x = ( ax b L ( x H ( x = ( ax b δ = : ax b= H x = al x ax b L x L x H ( x = aδ ( ax b δ L ( x ( ( ( ( ( = a ( ax b L ( x = a= L ( x b= ax ( H ( x = L( x ( xx L ( x ( f ( ξ Error E( x = ( xx (! = 6
Pecewse Polyomal Iterpolato Why pecewse polyomal pterpolato? The oscllatory ature of hgh-degree polyomals ad the property that a fluctuato over a small porto of terval ca duce large fluctuatos over the etre rage restrcts ther use. Ths form s more useful for seeg the umercal approxmato for the soluto of the system equatos. What s pecewse terpolato polyomal? Let P( x x [ x, x ] P ( x x [ x, x] f ( x pp( x = pp( x = P( x x [ x, x] M P( x x [ x, x] -polyomal l order depeds d o cotuty t f ( x (,,,, requremets = pp x = L f ( x = pp ( x f ( x = pp ( x f x P (x P (x P (x x x x x x 7
Cubc Sple Let P( x = a b( x x c ( x x d ( xx 3 P( x = a = y P( x = y bh ch dh = y ( =, L, 3 (fucto value o the rght ed 3 hb hc hd y y P ( x = = L( b c ( x x 3 d ( x x Cotuty of slope P ( x = P ( x : b ch 3dh = b b ch dh b 3 = L( P ( x = c 6 d( x x Cotuty of secod dervatve P ( x = P ( x = c 6dh = c c 3 hd c = L(3 8
Cubc Sple uows 4 Fucto values cotuty 3(- costrats mssg 4- Use two slopes at the eds ( x x ( x x ( x x ( xx ( xx ( xx f( x = yo y y ( x x ( x x ( x x ( x x ( x x ( x x ( xx ( xx ( x x ( xx ( xx ( xx = yo y y h h h hh h h h ( ( x x xx x x xx x x xx f ( x = yo y y h h h hh h h h ( ( ( h h h h h h f ( x = y y y ( ( o h h h hh h h h = yo y y h h h h h h h h = y( γ y( γ y γ = h h γ γ h h 9
Cubc Sple f ( x = y( γ y( γ y h h γ γ f h = h = h γ = 3 y = f ( x = y y y h 3 = ( y y ( y y extrapolato of slopes h =b At the rght ed h h h h h h f ( x = y y y h( h h hh h( h h = ( y ( γ y y( γ h h γ γ h γ = h 3 y = f ( x = y y y h 3 = ( y y ( y y = b c h 3d h h
Lear System for Cubc Sple 3 hb hc hd y y b ch dh b = L( 3 = L( c 3hd c = L(3 3 h h h b y y c y O d y y M 3 h b h h y y h 3h c = 3h d M M O b 3 h h h c y y h 3h d y f gve fucto values at the rght ed (- f, f cotuty at the termedate pots (3- costrats slopes at both eds for 3 uows (except a