5.1 Evaluating a polynomial

Size: px
Start display at page:

Download "5.1 Evaluating a polynomial"

Transcription

1 5 Evluting polynomil We will now look t evluting polynomil t point Your first tougt my be: tis is esy: just substitute te vlues, nd presto Unfortuntely, tis is not te cse 5 Execution time First, tere is te cost of performing tis evlution: ow do we efficiently evlute polynomil? Horrible evlution Suppose tt te coefficients of polynomil re stored in n rry coeffs of lengt n suc tt coeffs() is te coefficient of t n nd coeffs(n + ) is te constnt coefficient In tis cse, we could implement function [result] = polyvl( coeffs, t ) result = 0; n = lengt(coeffs); end for k = :lengt(coeffs) result = result + coeffs(k)*pow( t, n - k ); end If you were to implement powering s follows: function [result] = pow( t, n ) if n < 0 result = 0/pow( t, -n ); else result = 0; end end for i = :n result = result*t; end ten tere is specil plce in ell reserved for you: evluting polynomil of degree n would ve run-time of (n )

2 Less orrible evlution If you were to implement powering s follows: function [result] = pow( t, n ) if n < 0 result = 0/pow( t, -n ); elseif n == 0 result = 0; elseif n == result = t; else result = pow( t, n/ ); result = result*result; end end if (n % ) == result = result*t; end In tis cse, evluting polynomil of degree n would ve run-time of (n ln(n)) but would lso require (ln(n)) dditionl memory due to te size of te cll stck Getting tere Suppose, insted, we used: function [result] = polyvl( coeffs, t ) result = 0; term = 0; n = lengt(coeffs); end for k = :lengt(coeffs) result = result + coeffs(n - k + )*term; term = term*t; end Te run time is now (n), but tere re still mny unnecessry clcultions, for we ve n multiplictions Fortuntely, te memory required is only ()

3 Horner s rule Suppose, insted, we used Horner s rule for evluting polynomils: p t t t t t n n n n 0 t t t t n n n n 0 t t t t n n3 n n 0 n t t t t t n 0 For exmple, te polynomil 3t t 9t + 80 cn be written s (3t + 47)t 9)t + 80 From descriptive point-of-view, tis looks ugly; owever, from n implementtion point-of-view it is elegnt: function [result] = polyvl( coeffs, t ) result = 00; end for k = :lengt(coeffs) result = result*t + coeffs(k); end Te run time is now (n) nd tere re only n multiplictions nd n dditions Prctice questions Evlute te polynomil x 3x + t te points x = 0 nd x = 0 using Horner s rule 3

4 5 Numericl stbility Second, ow do we evlute te polynomil p t t t 0 so s to void numericl instbility? For exmple, t is lrge reltive to t, but is comprble to 0, ten unfortuntely, te following my occur if we re using four significnt digits: Suppose t = 000 nd = but = 0, so t + = 000 Suppose now tt 0 = In tis cse, our polynomil, evlutes to 0000; owever, te correct nswer is 00, so te result is not so ccurte Te solution to tis is to find te coefficients reltive to point close to were we intend to evlute our polynomil For exmple, suppose tt we were evluting our polynomil in te vicinity of t = 0000 In tis cse, we could rewrite te polynomil s In tis cse, we cn rewrite tis s p t t t 0 p t 000 t t Tis new polynomil, wen evluted t t = 000 does indeed evlute to 000, but not only tt, it does resonbly well for ll vlues round t = 000 Now Horner s rule my be written s: function [result] = polyvl( coeffs, t, t0 ) result = 00; dt = t - t0; end for k = :lengt(coeffs) result = result*dt + coeffs(k); end Note tt if we re evluting results close to te vlue of t 0, ten p t t t t t, ten t t 0 is smll, so we re lwys multiplying te previous result by smll vlue nd only ten dding on te next coefficient Tus, ssuming tt t t 0 is smll reltive to te coefficients, tis will often be quite resonble In generl, rewriting polynomil in te form were we re multiplying by t to one were we multiply by t t 0 is noting more tn solving system of liner equtions Tis is not te most difficult tsk, so it cn be done quite simply Insted, more likely, we re going to be sked: given set of points (t 0, y 0 ), (t, y ), (t, y ),, find polynomil tt psses troug tese points Prctice questions Evlute te polynomil (x 5) 3(x 5) + t te points x = 5 nd x = 49 using Horner s rule 4

5 53 Differentition We will look t number of mens of pproximting te derivtive, including: simple centered divided difference formul, bckwrd divided difference formul, nd 3 using interpolting polynomils to get better pproximtions Centered divided difference Suppose we wnt to evlute te derivtive of function f t point x One wy of doing tis is to smple te function s follows: Tis is bsed on te limit f f x x f x f x f x f x lim, 0 so if is smll enoug, tis sould be resonble pproximtion Alterntively, suppose tt we ve signl y t some time t, so we don t ctully know wt y is in te future; tt is, t time t + In tis cse, we must use te pproximtion nd so our pproximtion is y t y t y t lim, 0 y t y t y t Now, ow good is ec of tese pproximtions? Using Tylor series, we ve Subtrcting tese two, we ve Dividing bot sides by, we get f x f x f x f x f 6 f x f x f x f x f f x f x f x f 3 f f x f x f x f 3 f 3 5

6 Becuse x x nd x x, by te intermedite vlue teorem, tere must be point x x suc tt f f f, so we will simply write Now, ssuming tt te tird derivtive is not too wild, ten tis is pproximtely for some vlue x x f x f x f x f 6 3 Note tt if we reduce by lf, te error drops by pproximtely one qurter If we reduce by fctor of 0, te error drops by fctor of 00 We cn see tis wit tis exmple: sin 00 sin 00 sin , 00 nd subtrcting te pproximtion from te exct solution, we get Now we ve to find f We don t know te exct vlue of, but te cosine function on tt intervl is monotonic, so we need only look t te endpoints nd ensure tt our error ppers in tt intervl: 3 3 f nd f nd te error does fll between tese two vlues We lso see tt sin 000 sin 000 sin nd subtrcting te pproximtion from te exct solution, we get Tus, you cn see tt by dividing by 0, te error drops by fctor of 00 Additionlly, te two end-points of te error bounds re nd f 6 f Now, tis is importnt: wile we see ere tt yes, te estimte of te error is very successful, we will not know tis in generl However, wt is criticl ere is tt te formul does work Prctice questions Estimte te derivtive of f(x) = xe x t x = using = 0 nd ten = 00 using tis formul Demonstrte tt te estimtor of te error is resonble by estimting te verge vlue of te pproprite derivtive by evluting tt derivtive t x = 9 nd x = nd gin t x = 99 nd x = 0 6

7 Sow tt te error of f x f x f x is O( ) 3 You re prticipting in project were you re ttempting to detect te source of pollution long river Your sensors re plced 05 km prt, nd te most recent reding give concentrtions of HCO 3 t tree of te sensors s being 89 mg/l, 095 mg/l nd 97 mg/l, wit te lst reding being te furtest upstrem Wt is n estimte s to te grdient of te concentrtion (mg/l/m) t te middle sensor in te downstrem direction? ( 007 mg/l/m) Bckwrd divided difference On te oter nd, te one-sided derivtive is not so successful: we ve te Tylor series nd solving tis for te derivtive yields yt yt y t y y t y t y t y Tis is n interesting contrst to te previous: now te error depends on te verge vlue of te second derivtives multiplied by : divide by nd te error drops by, divide by 0, te error drops by 0: sin sin 00 sin , 00 wic, if we subtrct tis from te exct nswer, s n error of , weres sin sin 000 sin wic, if we subtrct tis from te exct nswer, s n error of Tus, you cn see tt by dividing by 0, te error drops by fctor of 0 Now, to see tt te error fll witin te expected intervls, we ve nd f nd f f nd f Consequently, te first formul is better tn te second; owever, te first only works if we ve informtion bout te system bot before nd fter te point in question: someting we simply do not ve in rel-time system 7

8 Implementtion Suppose you ve n embedded system were periodiclly, sensor returns reding nd you my spordiclly need n pproximtion of te derivtive Tis mens you would require dt structure tt cn estimte te rte of cnge of te given dt Suc dt structure would only ve to store te lst tree entries, so n rry of cpcity tree would be pproprite In clculting te derivtive, te formul lso requires te vlue between te smples, or te t We could pss tis vlue wit te constructor As for te required member functions: Te interrupt ndling routine would ve to dd te next dtum to tis dt structure, so we would require some sort of function tt would pss tt new dtum We will use circulr rry to ensure tt ec insertion is () We will need function tt clcultes te rte of cnge bsed on te given dt clss Dt_colltion { privte: double delt_t; double buffer[3]; size_t lst; ; public: Dt_collection( double dt ); void store_dtum( double x ); double derivtive() const; Dt_collection::Dt_collection( double dt ): delt_t{dt, buffer{0, 0, 0, lst{0 { // Empty constructor void Dt_collection::store_dtum( double x ) { lst = (lst + ) % 3; buffer[lst] = x; // 3 y(t) - 4 y(t - ) + y(t ) // Return // double Dt_collection::derivtive() const { return ( 30*buffer[lst] - 40*buffer[(lst + ) % 3] + buffer[(lst + ) % 3] )/(0*delt_t); 8

9 Prctice questions Estimte te derivtive of y(t) = te t t t = using = 0 nd ten = 00 using tis formul Demonstrte tt te estimtor of te error is resonble by estimting te verge vlue of te pproprite derivtive by evluting tt derivtive t x = nd x = nd gin t x = nd x = 0 Sow tt te error of y t y t y t is O() 3 You wnt to estimte te derivtive t time t but only by using istoric dt (t time t, t, etc) Tus, you could use y t y t y t previous pproximtion? How does te size of te coefficient of te error term differ from te 4 You ve sensor tt probes voltge t rte of 0 Hz Its lst tree redings re 735 V, 733 V nd 7339 V, wit te lst being te most recent Estimte te rte of cnge of voltge t te current time (008 V/s) 5 Bsed on te result, wt is te best estimtor of te voltge in te next lf second? (7339 V V/s 05 s = 7397 V) Using interpolting polynomils Insted, let s look t different wy of finding tese formuls using polynomil interpoltion If we interpolte tree points (x 0, f ), (x 0, f 0 ) nd (x 0 +, f ) we get polynomil in x of degree two, if we differentite tis wit respect to x, we get polynomil of degree, nd if we evlute tis t te point x 0, we get te formul f f wic is te sme formul we previously sw Similrly, if we interpolte te two points (t 0, y ) nd (t 0, y 0 ), differentite te interpolting polynomil t t, nd evlute te resulting liner polynomil t = t 0, we get te formul, y y 0 Tis is te formul from te pproximtion of te derivtive Suppose now we find te interpolting polynomil of te tree points two points (t 0, y ), (t 0, y ) nd (t 0, y 0 ), differentite te interpolting polynomil t t, nd evlute te resulting liner polynomil t = t 0, we get te formul 3y 4y y 0 9

10 If you wis to see tis, te following Mple code finds te interpolting polynomil, differentites it, nd ten evlutes tt derivtive t te point t 0 : > curve := CurveFitting:-PolynomilInterpoltion( [t[0], t[0] -, t[0] - *], [y[0], y[-], y[-] ], tu ); > dcurve := diff( curve, tu ); # Differentite te curve wrt tu > evl( dcurve, tu = t[0] ); # Evlute tt derivtive t t[0] > simplify( %, size ); # Simplify te previous result mking it compct 0

11 Tt is, 3y t 4y t y t y t Question: wt is te error? In tis eqution, we ve y(t ) nd y(t ), so let us write tese two Tylor series down: 3 3 y t y t y t y t y 6 y t y t y t y t y y t y t y t y Now, we will multiply te first by four nd subtrct from tt te second to get Now, if we look t y t y t 3y t y t y y y 4 y, we note tt tere must be some vlue t t suc tt y y y nd dividing y by llows us to rewriting tis eqution nd get te simplified form were t t Compre te errors: were x x 3y t 4y t y t y t y 3 3 f x f x f x f 6 3 Tus, te centered pproximtion is twice s ccurte s our bckwrd pproximtion To demonstrte tis, let us gin tke our exmple of 3sin 4sin 00 sin 00 sin , 00 wic, if we subtrct tis from te exct nswer, s n error of , weres 3sin 4sin 000 sin 000 sin wic, if we subtrct tis from te exct nswer, s n error of

12 Notice gin tt our pproximtions of te errors re indeed very close: nd f nd f f nd f Prctice questions Estimte te derivtive of y(t) = te t t t = using = 0 nd ten = 00 using tis formul Demonstrte tt te estimtor of te error is resonble by estimting te verge vlue of te pproprite derivtive by evluting tt derivtive t x = nd x = nd gin t x = nd x = 0 Sow tt te error of 3y t 4 y t y( t ) y t is O( ) 3 You wnt to estimte te derivtive t time t but only by using istoric dt (t time t, t, etc) Tus, you could use 3y t 4y t y( t 3 ) y t Sow tt now te error is O() 4 Disppointed wit te O() error in te previous question, you find te interpolting polynomil of te points (t 3, y(t 3)), (t, y(t )) nd (t, y(t )) You differentite tis interpolting polynomil nd evlute it t t to get te formul 5y t 8y t 3 y( t 3 ) y t Sow tt now te error is O( ) 5 You experiment nd find tt te formul Prove tis Be sure to note te y(t 3) 8y t 9 y t y( t 3 ) y t s n error equl to O( ) 6 4 You ve sensor tt probes voltge t rte of 0 Hz Its lst tree redings re 735 V, 733 V nd 7339 V, wit te lst being te most recent Estimte te rte of cnge of voltge t te current time (009 V/s) 5 Bsed on te result, wt is te best estimtor of te voltge in te next lf second? (7339 V V/s 05 s = 7384 V)

13 Higer derivtives We will look t bot centered divided difference nd bckwrd divided difference pproximtions, in bot cses, using te sme pproc: finding interpolting polynomils, differentiting tose twice, nd ten evluting tem t te pproprite point Centered divided-difference pproximtions Suppose we wnt to estimte iger derivtive Agin, if we find te interpolting qudrtic pssing troug te tree points x, x nd x +, we get te pproximtion f x f x f x f x weres if we find te interpolting qudrtic pssing troug te tree points t, t nd t, we get te pproximtion y t y t y t y t Note tt tese re te sme formuls, only te first is centered wile te second is not Using Tylor series, we cn once gin estimte te error Adding tese two, we get f x f x f x f x f x f 6 4 f x f x f x f x f x f f x f x f x f x f f 4 4 nd solving for te second derivtive, we ve were x x f x f x f x f x f 4 3

14 To demonstrte tis, let us gin tke our exmple of sin 099 sin sin 0 sin , 00 wic, if we subtrct tis from te exct nswer, s n error of , weres sin 0999 sin sin 00 sin wic, if we subtrct tis from te exct nswer, s n error of Notice gin tt our pproximtions of te errors re indeed very close: nd 4 3 f nd f f nd f Prctice questions Estimte te second derivtive of y(t) = te t t t = using = 0 nd ten = 00 using tis formul Demonstrte tt te estimtor of te error is resonble by estimting te verge vlue of te pproprite derivtive by evluting tt derivtive t x = 9 nd x = nd gin t x = 99 nd x = 0 Sow tt te error of f x f x f x f x is O( ) 3 Suppose tt te concentrtion of gs long tube re 053 g/l, 05 g/l, 057 g/l nd 06 g/l Ec of te redings re tken 0 cm prt Clculte te concentrtion pressure t te two interior points (g/l/m ) Te locl rte of cnge in te concentrtion is proportionl to tis concentrtion pressure Do you expect te concentrtion t ec of te interior points to increse, sty te sme, or decrese in te next few seconds? (6 g/l/m nd 0 g/l/m, nd tus te concentrtion t te first interior point sould increse, wile te concentrtion t te second sould sty pproximtely uncnged) 4

15 4 Here re four potogrps of te Flcon Hevy booster rockets lnding tken from te YouTube cnnel of SpceX Te potogrps re tken one second prt Assuming te booster rockets re 45 m tll, estimte te verticl speed nd ccelertion of te booster in te two middle frmes (Tis utor estimtes te verticl speed nd ccelertion in te second frme s 9 m/s nd 5 m/s, respectively; wile in te tird frme s 77 m/s nd 33 m/s, respectively) 5

16 Bckwrd divided-difference pproximtions Similrly, but considering t nd t, we ve: wic now becomes 3 3 y t y t y t y t y 6 y t y t y t y t 4 y y t y t y t y t y 6 4 y t y t y t y t y Now we must be more creful: we wnt te formul for te second derivtive, so we will subtrct twice te first from te second: y t y t y t y t y y 3 3 Solving for te second derivtive nd estimting wit te verge vlue of te tird derivtive in te vicinity of t, we ve y t y t y t 3 y t y Tus, we see tt tis formul s n error tt is O( ) for te pproximting te second derivtive t te center, but only O() for pproximting te derivtive t eiter end-point 6

17 To demonstrte tis, let us gin tke our exmple of sin 098 sin 099 sin sin , 00 wic, if we subtrct tis from te exct nswer, s n error of , weres sin 0999 sin sin 00 sin wic, if we subtrct tis from te exct nswer, s n error of Notice gin tt our pproximtions of te errors re indeed very close: nd f f 3 3 n f d n f d Tus, despite te fct te formul is te sme, only sifted, te error is significntly iger As n exmple of finding cubic interpolting polynomil (interpolting te points t, t, t nd t 3), if we find suc polynomil, differentite it, nd evlute t it t te point t, we get te pproximtion y t 5y t 4y t y t 3 4 y t y Implementtion We need good pproximtion of te second derivtive, but tis requires four tps nd not just tree Consequently, we must cnge our buffer cpcity of 3 As you my ve noted, te buffer cpcity ws rd-coded Tis is described s mgic number, s it is not entirely obvious were te 3 comes from Insted, we will now ssign to te constnt member vrible BUFFER_CAPACITY te cpcity of te internl buffer (now modified to 4), updte te oter functions, nd ten dd function for clculting te second derivtive clss Dt_colltion { privte: size_t const BUFFER_CAPACITY{4; double delt_t; double buffer[buffer_capacity]; size_t lst; ; public: Dt_collection( double dt ); void store_dtum( double x ); double derivtive() const; double second_derivtive() const; Dt_collection::Dt_collection( double dt ): delt_t{dt, buffer{, lst{0 { 7

18 // Empty constructor void Dt_collection::store_dtum( double x ) { lst = (lst + ) % BUFFER_CAPACITY; buffer[lst] = x; // 3 y(t) - 4 y(t - ) + y(t ) // Return // double Dt_collection::derivtive() const { size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; return (30*buffer[lst] - 40*buffer[lst] + buffer[lst])/(0*delt_t); // y(t) - 5 y(t - ) + 4y(t ) y(t - 3) // Return // // double Dt_collection::second_derivtive() const { size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst3{(lst + (BUFFER_CAPACITY - 3)) % BUFFER_CAPACITY; return ( 0*buffer[lst] - 50*buffer[lst] + 40*buffer[lst] - buffer[lst3] )/(delt_t* delt_t); 8

19 Prctice questions Estimte te second derivtive of y(t) = te t t t = using = 0 nd ten = 00 using tis formul Demonstrte tt te estimtor of te error is resonble by estimting te verge vlue of te pproprite derivtive by evluting tt derivtive t x = nd x = nd gin t x = nd x = 0 Sow tt te error of y t y t y t y t is O() 3 You wnt to estimte te second derivtive t time t but only by using istoric dt (t time t, t, etc) Tus, you could use y t 3 y t y t y t How does te error coefficient cnge? 4 Suppose you ve progrmmed n pp to estimte ow quickly runner is bot running nd ccelerting Your ppliction tkes tree potogrps in rpid succession (05 s) It ten mesures te leding edge of te cest, nd bsed on te eigt of te individul ( vlue tt must be entered seprtely), it estimtes te reltive distnces Te distnces trvelled te second nd tird potogrps reltive to te first re 7 m nd m Wt is resonble estimte of te ccelertion of te individul t te moment te lst potogrp is tken? ( 35 m/s ) 9

20 5 Here re tree potogrps of te Flcon Hevy tken from te YouTube cnnel of SpceX Te tree potogrps re one second prt Is te ccelertion positive or negtive, nd wy? If te Flcon Hevy is 70 m tll, estimte te verticl speed nd ccelertion of te Flcon Hevy in te tird frme (Tis utor estimtes te verticl speed nd ccelertion s 890 m/s nd 38 m/s, respectively) 6 Wile trusters on lunc rockets my be on te order of megnewtons (te Flcon 9 trusters produce 7607 MN of force), on trip to Mrs, smller trusters will be used to correct te direction of trvel, nd s suc will only produce force on te order of newtons Te force of truster cn be clculted s function of te fuel tt is injected into te nozzle, nd wile suc truster requires rmp-up time to go to mximum trust, tese engines cn be cut off lmost instntneously by cutting off te fuel supply Suppose tt te following re estimtes of te trust (newtons) tken t 0 Hz: Te redings re: Use te tree-vlue bckwrd divided-difference formuls for bot te rte of cnge nd ccelertion to determine te first nd second derivtives of te force t time t = 08 nd t = 7 Wy is te pproximtion t te first time resonble, but entirely erroneous t te second? 0

21 54 Integrtion We will look t two pproces to integrtion: clcultion of n integrl troug polynomil interpoltion, nd composite pplictions of te bove formuls 54 Use of polynomil interpoltion Suppose we ve n intervl (, b) on wic function f is defined, nd we d like to pproximte te integrl b f xdx Suppose we cn only smple tis function t finite number of points in pproximting tis integrl We could coose te endpoints s our two smple points: x 0 = nd x = b wit f 0 = f(x 0 ) nd f = f(x ) Trpezoidl rule In tis cse, given te informtion we ve, te best pproximtion is to use te trpezoidl rule, wic determines te integrl by clculting te re of te trpezoid Tus, te pproximtion is b f xdx f0 fb Tus, we re multiplying weigted verge of te vlue of te function by te widt of te intervl Integrting tis from to b yields f f x f x x f x b b b b f dx f x dx f x x dx f x dx

22 Simplifying tis, we ve: If we rewrite tis, we ve b b b d d d f b f x x f x x x f x x Dividing bot sides by two yields: Let s integrte function we know: 09 b b b b f x dx f x dx xf x dx f x dx b b b d d f x x f b f xf x f x x f b 6 b f x dx f b f bf b f f x dx f b 6 b b f f b f x dx f b 6 b b 3 f xdx f f b b f b 3 sin xdx sin 09 sin Wen we subtrct tis from te exct solution, we get n error of Wen we look t te errors sin nd sin , we see tt te error does fll between tese two vlues Now, wit tis formul, we cnnot reduce b, becuse we wnt to specificlly clculte tt integrl In order to reduce te error, we will look t oter tecniques 3 3

23 If we wnted to pproximte n integrl over longer intervl wit one dditionl smple, we cn use te trpezoid rule twice: Now te pproximtion is x x0 f xdx f0 f f f f0 f f Te error is simply te sum of te errors pplied to ec sub-intervl; fter simplifiction, tis becomes: Let s pply tis to te integrl bove: f b 3 sin xdx sin 09 sin sin Wen we subtrct tis from te exct solution, we get n error of Wen we look t te errors sin nd sin , we see tt te error does fll between tese two vlues 3

24 Simpson s rule We could do better, owever, s tis integrl lmost certin underestimtes te ctul ccumulted signl, for we expect te system to be differentible For exmple, suppose we re periodiclly smpling te ngulr speed t wic n ntenn is rotting In tt cse, te integrl is te cnge in position of te ntenn, nd te ntenn s inerti, so its ngulr velocity cnnot cnge bruptly Consequently, we could find n interpolting qudrtic function nd integrte it: Rter tn working tis out, Tis is n pproprite point to demonstrte te power of symbolic computtion Here is n exmple of Mple code were we: find n interpolting polynomil between points (, f 0 ), ( +, f ), ( +, f ) wit respect to te vrible x, integrte tt interpolting polynomil from x = to x = +, nd 3 simplify te resulting expression > curve := CurveFitting:-PolynomilInterpoltion( [, +, + *], [f0, f, f], x ); > int( curve, x = + * ); > simplify( %, size ); Tus, we see te pproximtion of te integrl is 4, 0 6 f f f b nd tis is weigted verge of te vlues of te polynomil multiplied by te widt of te intervl 4

25 Beyond te scope of tis course, te error for Simpson s rule is Let s pply tis to te integrl bove: f b sin xdxsin 094sin sin Wen we subtrct tis from te exct solution, we get n error of Wen we look t te errors 4 4 sin nd sin , we see tt te error does fll between tese two vlues Simpson s rule over one time intervl Now, suppose you reding dt from sensor nd summing tt dt For exmple, to clculte te totl energy used, you would integrte smple of te power usge On te oter nd, to find te totl distnce trvelled, you could integrte te speed Given te most recent reding, you would like to estimte te integrl over te lst intervl, from t to t Te most strigt-forwrd is to use te trpezoidl rule Te issue ere is tt it is not very good pproximtion, but Simpson s rule ssumes you re pproximting te integrl over two time steps Suppose you ve lredy pproximted te previous integrl up to time t In tis cse, Simpson s rule won t elp Suppose, owever, you find te interpolting qudrtic polynomil over te pst two time intervls, but integrted it only over te lst time intervl, tis my indeed give better pproximtion of te integrl: Using Mple, we cn find tt te pproximtion of te integrl to be t 5y t 8y t y t ytdt t Te error will still be on te sme mgnitude of tt of Simpson s rule, but wt is interesting ere is tt tis is one 5 8 of our first pproximtions tt contins negtive weigt coefficient in our weigted verge: 5

26 You my wonder wy coefficient would ve suc weigted verge Tis is perps best explined wit simple cse of looking t te devitions from were te y vlues re in strigt line If te point y(t ) increses, te interpolting qudrtic polynomil goes down on te rigt-nd sub-intervl, so positive increse in y(t ) results in decrese in te estimted integrl Alterntively, if te point y(t ) decreses, te interpolting polynomil increses on te rigt-nd sub-intervl, tus incresing te pproximtion of te integrl 6

27 Implementtion Adding to our dt collection dt structure, we cn now estimte te integrl; owever, tis will require keeping trck of te integrl clculted to tis point clss Dt_colltion { privte: size_t const BUFFER_CAPACITY{4; double delt_t; double buffer[buffer_capacity]; size_t lst; double running_sum; ; public: Dt_collection( double dt ); void store_dtum( double x ); double derivtive() const; double second_derivtive() const; double integrl() const; Dt_collection::Dt_collection( double dt ): delt_t{dt, buffer{, lst{0, integrl{00 { // Empty constructor void Dt_collection::store_dtum( double x ) { lst = (lst + ) % BUFFER_CAPACITY; buffer[lst] = x; // Te integrl must be clculted regrdless s to weter or not te // vlue of te integrl is queried // 5 y(t) + 8 y(t - ) - y(t - *) // running_sum += // size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; running_sum += (5*buffer[lst] + 8*buffer[lst] - buffer[lst])/0*delt_t; 7

28 // 3 y(t) - 4 y(t - ) + y(t ) // Return // double Dt_collection::derivtive() const { size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; return (30*buffer[lst] - 40*buffer[lst] + buffer[lst])/(0*delt_t); // y(t) - 5 y(t - ) + 4y(t ) y(t - 3) // Return // // double Dt_collection::second_derivtive() const { size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst3{(lst + (BUFFER_CAPACITY - 3)) % BUFFER_CAPACITY; return ( 0*buffer[lst] - 50*buffer[lst] + 40*buffer[lst] - buffer[lst3] )/(delt_t* delt_t); // Return te stored vlue of te integrl // - tis vlue will be updted ec time new reding is provided double Dt_collection::integrl() const { return running_sum; 8

29 Simpson s 3 / 8 t rule Te finl pproximtion we will use is termed Simpson s 3 / 8 t rule, wic finds n interpolting cubic nd integrtes it We will sow tis gin using Mple: > curve := CurveFitting:-PolynomilInterpoltion( [, +, + *, + 3*], [f0, f, f, f3], x ); > int( curve, x = + 3* ); > simplify( %, size ); Tus, we see te pproximtion of te integrl is 3 3, f f f f b nd tis is weigted verge of te vlues of te polynomil multiplied by te widt of te intervl 9

30 Beyond te scope of tis course, te error for Simpson s 3 / 8 t rule is Te coefficient is 4 / 9 t te error of Simpson s rule Let s pply tis to te integrl bove: f b sin xdx sin 093sin 0963sin 03 sin Wen we subtrct tis from te exct solution, we get n error of , wic is very close to 4/9 t te error of Simpson s rule (te rtio is 04444) Wen we look t te errors 4 4 sin nd sin , we see tt te error does fll between tese two vlues Simpson s 3 / 8 t rule over one time intervl As wit Simpson s rule, we could find te interpolting cubic polynomil over tree time intervls, but only integrte tt in te most recent intervl: Using Mple, we cn find tis pproximtion using t 9y t 9y t 5y t y t 3 ytdt 4 t Wit no oter informtion, te error would be tird te error of Simpson s 3 / 8 t rule 30

31 Implementtion As wit trcking te integrl using Simpson s rule, we would now updte te integrl wit Simpson s 3 / 8 t rule clss Dt_colltion { privte: size_t const BUFFER_CAPACITY{4; double delt_t; double buffer[buffer_capacity]; size_t lst; double running_sum; ; public: Dt_collection( double dt ); void store_dtum( double x ); double derivtive() const; double second_derivtive() const; double integrl() const; Dt_collection::Dt_collection( double dt ): delt_t{dt, buffer{, lst{0, integrl{00 { // Empty constructor void Dt_collection::store_dtum( double x ) { lst = (lst + ) % BUFFER_CAPACITY; buffer[lst] = x; // Te integrl must be clculted regrdless s to weter or not te // vlue of te integrl is queried // 9 y(t) + 9 y(t - ) - 5 y(t - *) + y(t - 3) // running_sum += // 4 size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst{(lst + (BUFFER_CAPACITY - )) % BUFFER_CAPACITY; size_t const lst3{(lst + (BUFFER_CAPACITY - 3)) % BUFFER_CAPACITY; running_sum += ( 9*buffer[lst] + 9*buffer[lst] - 5*buffer[lst] +buffer[lst3] )/40*delt_t; As before, te integrl function would simply return te integrl member vrible 3

32 54 Composition rules Unlike differentition, one cnnot cnge te bounds of n integrl, for tt is exctly wt we re trying to pproximte Unfortuntely, we cnnot continue using iger degree polynomils, s tey become more sensitive to noise Insted, owever, we cn sub-divide te intervl [, b] into n sub-intervls, nd ten pply ny of te previous rules to ec sub-intervl nd ten dd tem To demonstrte tese tecniques, we will sow integrting te following generic function from to b: Composite trpezoidl rule Suppose we divide te intervl into n sub-intervls, nd pply te trpezoidl rule to ec In tis cse, let us denote b so te intervl is divided into te points x0, x, x,, xn b were xk k If we denote n f k f x k, ten te pproximtion is f0 f f f fn fn Rerrnging tis, we get b f xdx f0 f f fn fn Question: wt is te error? It must be te sum of te individul errors: f f f 3 f n Recll, tt ec sub-intervl is of widt Collecting similr terms, we ve 3 n 3 f f f 3 f n f k k 3 were x k k x Te problem is tt tt wile te coefficient k my go to zero s gets smller, simultneously, n becomes lrger, nd so te sum n f k grows To contrst te two, we observe tt k n k k f 3

33 is sum of points evluted t n, nd by ssuming te second derivtive is continuous, tere must be point b suc tt it equls te verge of tese vlues so Substituting tis into our formul, we get f nf n f k n k k n f k k 3 nf 3 n f k nd becuse b, it follows tt n b, nd tus we ve n b n d b f x x f0 fk fn f k or n 0 k n b k b f xdx f f f f If you wnted to be explicit wit respect to te function evlutions (s f f k n b b f x dx f f k f b f k k ), you could write tis s You my note tt b, so tis is weigted verge of tese evlutions of te n times function on te intervl [, b] multiplied by te widt of te intervl Te components of b f re eiter fixed or bounded (ssuming te second derivtive is not too wild) Tus, lve nd te error goes down by fctor of four; increse te number of intervls by ten nd te error goes down by fctor of 00 33

34 As n exmple, let us pproximte n integrl sligtly lrger tn te one previously given We know, for exmple, 3 tt te integrl sin x dx cos cos Te minimum nd mximum vlues of te second derivtive of sin(x) on tt intervl re nd , respectively If we let n =, in wic cse = /6, our pproximtion is 3 sin xdx sin sin k sin k Subtrcting tis from te exct solution yields n error of Te minimum nd mximum vlues of te pproximtion of te error re nd , respectively, nd te error of our pproximtion flls between tese two If we now increse n = 0, in wic cse, = /60, our pproximtion is 3 9 sin xdx sin sin k sin k 0 0 Subtrcting tis from te exct solution yields n error of , nd s you cn see, tis is pproximtely oneundredt te previous error Of course, te bounds on te error would not cnge We cn now pply tis to Simpson s rule nd Simpson s 3 / 8 t rule Prctice questions Approximte te integrl 3 4 x dx using te composite trpezoidl rule wit n = 6 0 Find te exct error of your pproximtion nd find te bounds of te error using te given formuls 34

35 Composite Simpson s rule We will wnt to keep te number of function evlutions te sme Tus, we will ssume we re dividing te intervl into n even number of sub-intervls for Simpson s rule, nd into multiple of tree sub-intervls for Simpson s 3 / 8 t rule In te cse of Simpson s rule, we must ssume tt n is even, nd tus ec sub-intervl to wic we will pply Simpson s rule will be of widt : or b b f xdx f0 4 f f 4 f3 f4 fn 4 fn fn f n n b 4 b 4 f x dx f0 4 fk fk f n f 3 k k 80 If you wnted to be explicit wit respect to te function evlutions (s f f k b k 4 4 ), you could write tis s n n 4 b 4 f x dx f 4 f k f k f b f 3 k k 80 Wt is importnt, owever, is te weigts in front of te coefficients:, 4,, 4,, 4,, 4,, 4, You my note tt b, so tis is weigted verge of tese 3 n times evlutions of te function on te intervl [, b] multiplied by te widt of te intervl Viewing tis, we re finding interpolting nd integrting interpolting qudrtics over intervls of widt : Approximting our integrl of te sine function from to 3, we ve tt tis equls n n 3 sin xdx sin 4 sin k k sin k k 35

36 Subtrcting tis from te correct nswer yields n error of Te minimum nd mximum vlues of te pproximtion of te error re nd , respectively, nd te error of our pproximtion flls between tese two If we increse te number of intervls by fctor of 0 to 0, te pproximtion is now wit n error of ; gin, drop by lmost exctly fctor of 0 4 Prctice questions Approximte te integrl 3 4 x dx using te composite Simpson s rule wit n = 6 0 Find te exct error of your pproximtion nd find te bounds of te error using te given formuls 36

37 Composite Simpson s 3 / 8 t rule In te cse of Simpson s 3 / 8 t rule, we must ssume n is multiple of tree, nd tus ec sub-intervl will be of widt 3 or b b f xdx f0 3 f 3 f f3 3 f4 3 f5 f6 fn3 3 fn 3 fn fn 3 f n n n b b 4 f x dx f0 3 f3k 3 f3k f3k f n 8 f k k k 80 If you wnted to be explicit wit respect to te function evlutions (s f f k b k 4 4 ), you could write tis s n n n d b f x x f f k f k f k f b f 8 k k k 80 Wt is importnt, owever, is te weigts in front of te coefficients:, 3, 3,, 3, 3,,,, 3, 3, You my note tt b, so tis is weigted verge of tese 8 n times evlutions of te function on te intervl [, b] multiplied by te widt of te intervl Viewing tis, we re finding interpolting nd integrting interpolting cubic polynomils over intervls of widt 3: Agin, pplying tis out our integrl, we get n pproximtion n n n sin xdx sin 3 sin 3k 3 sin 3k 3k sin 3 8 k k k

38 Te error wen we subtrct tis from te ctul integrl is Our pproximtions for te limits of te error spn form to , nd we see tt tis error flls into tt intervl Agin, if we increse n by fctor of 0 to 0, we get te pproximtion wic s n error of wic is smller by fctor of 0 4 nd tis gin flls between te two end-points of te error estimtes You will notice tt te error is pproximtely twice tt of te pproximtion using Simpson s rule nd tt te intervls of possible error do not overlp Prctice questions Approximte te integrl 3 4 x dx using te composite Simpson s rule wit n = 6 0 Find te exct error of your pproximtion nd find te bounds of te error using te given formuls 3 Compre te nswers for te composite trpezoidl, Simpson s nd Simpson s 3 / 8 t rules 38

39 533 Integrtion rules implemented in C++ For tose keen to implement tese in C++, consider te following: #include <cssert> #include <iostrem> #include <cmt> int min(); double trpezoidl_rule( double f(double), double, double b, unsigned int n ); double simpsons_rule( double f(double), double, double b, unsigned int n ); double simpsons_rule( double f[], size_t cpcity, double ); double simpsons_3_8_rule( double f(double), double, double b, unsigned int n ); double trpezoidl_rule( double f(double), double, double b, unsigned int n ) { ssert( n > 0 ); double {(b - )/n; double sum{00; for ( unsigned int k{; k < n; ++k ) { sum += f( + k* ); return (05*)*(f() + 0*sum + f(b)); double simpsons_rule( double f(double), double, double b, unsigned int n ) { ssert( n > 0 ); ssert( (n % ) == 0 ); // 'n' must be even double {(b - )/n; double sum_{00; double sum_4{00; for ( unsigned int k{; k < n/; ++k ) { sum_4 += f( + (*k - )* ); sum_ += f( + *k * ); return (/30)*(f() + 40*(sum_4 + f( + (n - )* )) + 0*sum_ + f(b)); 39

40 double simpsons_rule( double f[], std::size_t cpcity, double ) { double sum{00; for ( std::size_t k{; k < cpcity - ; ++k ) { sum += f[k]; sum *= 0; sum += f[0] + f[cpcity - ]; return sum*/3; double simpsons_3_8_rule( double f(double), double, double b, unsigned int n ) { ssert( n > 0 ); ssert( (n % 3) == 0 ); // 'n' must be multiple of 3 double {(b - )/n; double sum_{00; double sum_3{00; for ( unsigned int k{; k < n/3; ++k ) { sum_3 += f( + (3*k - )* ) + f( + (3*k - )* ); sum_ += f( + 3*k * ); return (30*/80)*(f() + 30*(sum_3 + f( + (n-)* ) + f( + (n-)* )) + 0*sum_ + f(b)); int min() { std::coutprecision( 6 ); std::cout << trpezoidl_rule( std::sin,, 3, ) << std::endl; std::cout << trpezoidl_rule( std::sin,, 3, 0 ) << std::endl; std::cout << simpsons_rule( std::sin,, 3, ) << std::endl; std::cout << simpsons_rule( std::sin,, 3, 0 ) << std::endl; std::cout << simpsons_3_8_rule( std::sin,, 3, ) << std::endl; std::cout << simpsons_3_8_rule( std::sin,, 3, 0 ) << std::endl; std::cout << (std::cos(0) - std::cos(30)) << std::endl; return 0; Te output of tis progrm is

41 Appendix: Finding formul Finding interpolting polynomils requires you to find te polynomil tt interpoltes, for exmple, te points (t 0, y 0 ), (t 0, y ) nd (t 0, y ) We wnt to find polynomil t + bt + c tt psses troug ll tree of tese points; tt is, we require tt ll tree of tese re true: t bt c y t b t c y 0 0 t b t c y 0 0 Tis is system of liner equtions in, b nd c, nd tus we must solve t t y t t y t t y We must now perform Gussin elimintion nd bckwrd substitution, so we strt by dding Row onto Row, nd dding t 0 times Row onto Row 3: t0 t 0 times t0 t0 t0 y0 t0 t0 y0 t0 0 y t0 t0 t0 t0 4 t0 y0 t0 0 y t0 t0 t0 Now, we must dd 0 t0 t 0 t0 t0 t0 t times Row onto Row 3: t0 t0 y0 t0 t0 t0 0 y y 0 t0 t0 t0 t0 t0 0 0 y y y 0 t0 t0 t0 t 0 Te next step is to solve for c, ten b nd ten : 4

42 c t t t t t t y y y t0 t0 t0 t0 t0 t0 t0t0 y t t y t t y t t You cn now substitute tis into te second eqution to solve for b: 4 3 y t0 y t0 y0 t0 b You cn now substitute te vlues for bot b nd c into te first eqution to solve for : y0 y y Consequently, te best-fitting polynomil tt psses troug te tree points (t 0, y 0 ), (t 0, y ) nd (t 0, y ) is te polynomil 4 3 y0 y y t0 y t0 y 0 t0 y t0 t0 yt0 t0 y0 t0 t0 y t t You cn now, for exmple, differentite tis polynomil wit respect to t: nd evlute it t te point t = t 0 : Finding common denomintor, we get 4 3 y y y y t y t y t t y y y y t y t y t t y t 4y t y t y t y 4 t y 3 t nd expnding tis nd te collecting on t 0, we ve t y y y y y y y 4y 3y If you were to simplify te numertor, you would find tt , 3y0 4y y 4

43 We cn cncel out n in bot te numertor nd te denomintor to get 3y 4y y 0 Note lso if we differentite te interpolting polynomil twice, we get wic simplifies to y y y 0 y y y 0 wic you my recll is our pproximtion of te second derivtive: y t0 y t y t y t Finlly, let us integrte tis interpolting polynomil from t = t 0 to t = t 0 Note tt tis is simply polynomil in t, nd we ve tt, t0 3 t bt cdt t t t t b c 3 t0 Substituting te bove coefficients of te interpolting polynomil into tis expression, we get 3 y0 y y t0 t0 t0 t0 4 3 y t y t y t 3 y t0 t0 yt0 t0 y0 t0 t If you expnd nd simplify tis expression, you will get te very fmilir expression: y y y Exercise: Crefully expnd te bove expression nd demonstrte tt wen ll oter terms cncel, te only terms tt remin re tose in te formul for Simpson s rule It is esiest to note tt te bove expression s terms contining t 0, t 0, nd 3 t 0, nd if you were to collect terms, you would not ll of tese cncel, leving simply tose terms independent of t 0, wic would ten simplify to te expression bove 43

44 Acknowledgments Dviti Jignes Ptel Kinderdeep Sing Virdi Priynk Hrirn Deven Rjes Pttni Micel Georges Njrin Priynk Hrirn Adity Aror 44

Lecture Note 4: Numerical differentiation and integration. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 4: Numerical differentiation and integration. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 4: Numericl differentition nd integrtion Xioqun Zng Sngi Jio Tong University Lst updted: November, 0 Numericl Anlysis. Numericl differentition.. Introduction Find n pproximtion of f (x 0 ),

More information

Chapter 2. Numerical Integration also called quadrature. 2.2 Trapezoidal Rule. 2.1 A basic principle Extending the Trapezoidal Rule DRAWINGS

Chapter 2. Numerical Integration also called quadrature. 2.2 Trapezoidal Rule. 2.1 A basic principle Extending the Trapezoidal Rule DRAWINGS S Cpter Numericl Integrtion lso clled qudrture Te gol of numericl integrtion is to pproximte numericlly. f(x)dx Tis is useful for difficult integrls like sin(x) ; sin(x ); x + x 4 Or worse still for multiple-dimensionl

More information

Math Week 5 concepts and homework, due Friday February 10

Math Week 5 concepts and homework, due Friday February 10 Mt 2280-00 Week 5 concepts nd omework, due Fridy Februry 0 Recll tt ll problems re good for seeing if you cn work wit te underlying concepts; tt te underlined problems re to be nded in; nd tt te Fridy

More information

Lecture 20: Numerical Integration III

Lecture 20: Numerical Integration III cs4: introduction to numericl nlysis /8/0 Lecture 0: Numericl Integrtion III Instructor: Professor Amos Ron Scribes: Mrk Cowlishw, Yunpeng Li, Nthnel Fillmore For the lst few lectures we hve discussed

More information

Math& 152 Section Integration by Parts

Math& 152 Section Integration by Parts Mth& 5 Section 7. - Integrtion by Prts Integrtion by prts is rule tht trnsforms the integrl of the product of two functions into other (idelly simpler) integrls. Recll from Clculus I tht given two differentible

More information

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral Improper Integrls Every time tht we hve evluted definite integrl such s f(x) dx, we hve mde two implicit ssumptions bout the integrl:. The intervl [, b] is finite, nd. f(x) is continuous on [, b]. If one

More information

Topic 6b Finite Difference Approximations

Topic 6b Finite Difference Approximations /8/8 Course Instructor Dr. Rymond C. Rump Oice: A 7 Pone: (95) 747 6958 E Mil: rcrump@utep.edu Topic 6b Finite Dierence Approximtions EE 486/5 Computtionl Metods in EE Outline Wt re inite dierence pproximtions?

More information

Numerical Analysis: Trapezoidal and Simpson s Rule

Numerical Analysis: Trapezoidal and Simpson s Rule nd Simpson s Mthemticl question we re interested in numericlly nswering How to we evlute I = f (x) dx? Clculus tells us tht if F(x) is the ntiderivtive of function f (x) on the intervl [, b], then I =

More information

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

Lecture 14: Quadrature

Lecture 14: Quadrature Lecture 14: Qudrture This lecture is concerned with the evlution of integrls fx)dx 1) over finite intervl [, b] The integrnd fx) is ssumed to be rel-vlues nd smooth The pproximtion of n integrl by numericl

More information

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite

More information

Math 1B, lecture 4: Error bounds for numerical methods

Math 1B, lecture 4: Error bounds for numerical methods Mth B, lecture 4: Error bounds for numericl methods Nthn Pflueger 4 September 0 Introduction The five numericl methods descried in the previous lecture ll operte by the sme principle: they pproximte the

More information

Key words. Numerical quadrature, piecewise polynomial, convergence rate, trapezoidal rule, midpoint rule, Simpson s rule, spectral accuracy.

Key words. Numerical quadrature, piecewise polynomial, convergence rate, trapezoidal rule, midpoint rule, Simpson s rule, spectral accuracy. O SPECTRA ACCURACY OF QUADRATURE FORMUAE BASED O PIECEWISE POYOMIA ITERPOATIO A KURGAOV AD S TSYKOV Abstrct It is well-known tt te trpezoidl rule, wile being only second-order ccurte in generl, improves

More information

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as Improper Integrls Two different types of integrls cn qulify s improper. The first type of improper integrl (which we will refer to s Type I) involves evluting n integrl over n infinite region. In the grph

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

Review of Calculus, cont d

Review of Calculus, cont d Jim Lmbers MAT 460 Fll Semester 2009-10 Lecture 3 Notes These notes correspond to Section 1.1 in the text. Review of Clculus, cont d Riemnn Sums nd the Definite Integrl There re mny cses in which some

More information

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s).

different methods (left endpoint, right endpoint, midpoint, trapezoid, Simpson s). Mth 1A with Professor Stnkov Worksheet, Discussion #41; Wednesdy, 12/6/217 GSI nme: Roy Zho Problems 1. Write the integrl 3 dx s limit of Riemnn sums. Write it using 2 intervls using the 1 x different

More information

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1

n f(x i ) x. i=1 In section 4.2, we defined the definite integral of f from x = a to x = b as n f(x i ) x; f(x) dx = lim i=1 The Fundmentl Theorem of Clculus As we continue to study the re problem, let s think bck to wht we know bout computing res of regions enclosed by curves. If we wnt to find the re of the region below the

More information

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0) 1 Tylor polynomils In Section 3.5, we discussed how to pproximte function f(x) round point in terms of its first derivtive f (x) evluted t, tht is using the liner pproximtion f() + f ()(x ). We clled this

More information

Math 8 Winter 2015 Applications of Integration

Math 8 Winter 2015 Applications of Integration Mth 8 Winter 205 Applictions of Integrtion Here re few importnt pplictions of integrtion. The pplictions you my see on n exm in this course include only the Net Chnge Theorem (which is relly just the Fundmentl

More information

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by. NUMERICAL INTEGRATION 1 Introduction The inverse process to differentition in clculus is integrtion. Mthemticlly, integrtion is represented by f(x) dx which stnds for the integrl of the function f(x) with

More information

3.4 Numerical integration

3.4 Numerical integration 3.4. Numericl integrtion 63 3.4 Numericl integrtion In mny economic pplictions it is necessry to compute the definite integrl of relvlued function f with respect to "weight" function w over n intervl [,

More information

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007 A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H Thoms Shores Deprtment of Mthemtics University of Nebrsk Spring 2007 Contents Rtes of Chnge nd Derivtives 1 Dierentils 4 Are nd Integrls 5 Multivrite Clculus

More information

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve. Clculus Li Vs The Fundmentl Theorem of Clculus. The Totl Chnge Theorem nd the Are Under Curve. Recll the following fct from Clculus course. If continuous function f(x) represents the rte of chnge of F

More information

MATH 144: Business Calculus Final Review

MATH 144: Business Calculus Final Review MATH 144: Business Clculus Finl Review 1 Skills 1. Clculte severl limits. 2. Find verticl nd horizontl symptotes for given rtionl function. 3. Clculte derivtive by definition. 4. Clculte severl derivtives

More information

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature CMDA 4604: Intermedite Topics in Mthemticl Modeling Lecture 19: Interpoltion nd Qudrture In this lecture we mke brief diversion into the res of interpoltion nd qudrture. Given function f C[, b], we sy

More information

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1 Exm, Mthemtics 471, Section ETY6 6:5 pm 7:4 pm, Mrch 1, 16, IH-115 Instructor: Attil Máté 1 17 copies 1. ) Stte the usul sufficient condition for the fixed-point itertion to converge when solving the eqution

More information

A P P E N D I X POWERS OF TEN AND SCIENTIFIC NOTATION A P P E N D I X SIGNIFICANT FIGURES

A P P E N D I X POWERS OF TEN AND SCIENTIFIC NOTATION A P P E N D I X SIGNIFICANT FIGURES A POWERS OF TEN AND SCIENTIFIC NOTATION In science, very lrge nd very smll deciml numbers re conveniently expressed in terms of powers of ten, some of wic re listed below: 0 3 0 0 0 000 0 3 0 0 0 0.00

More information

Numerical Integration

Numerical Integration Chpter 5 Numericl Integrtion Numericl integrtion is the study of how the numericl vlue of n integrl cn be found. Methods of function pproximtion discussed in Chpter??, i.e., function pproximtion vi the

More information

7.2 The Definite Integral

7.2 The Definite Integral 7.2 The Definite Integrl the definite integrl In the previous section, it ws found tht if function f is continuous nd nonnegtive, then the re under the grph of f on [, b] is given by F (b) F (), where

More information

Overview of Calculus I

Overview of Calculus I Overview of Clculus I Prof. Jim Swift Northern Arizon University There re three key concepts in clculus: The limit, the derivtive, nd the integrl. You need to understnd the definitions of these three things,

More information

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

SUMMER KNOWHOW STUDY AND LEARNING CENTRE SUMMER KNOWHOW STUDY AND LEARNING CENTRE Indices & Logrithms 2 Contents Indices.2 Frctionl Indices.4 Logrithms 6 Exponentil equtions. Simplifying Surds 13 Opertions on Surds..16 Scientific Nottion..18

More information

Best Approximation. Chapter The General Case

Best Approximation. Chapter The General Case Chpter 4 Best Approximtion 4.1 The Generl Cse In the previous chpter, we hve seen how n interpolting polynomil cn be used s n pproximtion to given function. We now wnt to find the best pproximtion to given

More information

APPROXIMATE INTEGRATION

APPROXIMATE INTEGRATION APPROXIMATE INTEGRATION. Introduction We hve seen tht there re functions whose nti-derivtives cnnot be expressed in closed form. For these resons ny definite integrl involving these integrnds cnnot be

More information

Numerical integration

Numerical integration 2 Numericl integrtion This is pge i Printer: Opque this 2. Introduction Numericl integrtion is problem tht is prt of mny problems in the economics nd econometrics literture. The orgniztion of this chpter

More information

Derivatives, Finding Roots, Interpolating and Integration

Derivatives, Finding Roots, Interpolating and Integration Derivtives, Finding Roots, Interpolting nd Integrtion Doing Numericl Derivtives Altoug tking derivtives is very esy opertion for ll of you, tere re situtions were it must e done numericlly. For exmple,

More information

Chapter 2 Differentiation

Chapter 2 Differentiation Cpter Differentition. Introduction In its initil stges differentition is lrgely mtter of finding limiting vlues, wen te vribles ( δ ) pproces zero, nd to begin tis cpter few emples will be tken. Emple..:

More information

Numerical Integration

Numerical Integration Chpter 1 Numericl Integrtion Numericl differentition methods compute pproximtions to the derivtive of function from known vlues of the function. Numericl integrtion uses the sme informtion to compute numericl

More information

1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),

1. Gauss-Jacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ), 1. Guss-Jcobi qudrture nd Legendre polynomils Simpson s rule for evluting n integrl f(t)dt gives the correct nswer with error of bout O(n 4 ) (with constnt tht depends on f, in prticulr, it depends on

More information

Lecture 12: Numerical Quadrature

Lecture 12: Numerical Quadrature Lecture 12: Numericl Qudrture J.K. Ryn@tudelft.nl WI3097TU Delft Institute of Applied Mthemtics Delft University of Technology 5 December 2012 () Numericl Qudrture 5 December 2012 1 / 46 Outline 1 Review

More information

Series: Elementary, then Taylor & MacLaurin

Series: Elementary, then Taylor & MacLaurin Lecture 3 Series: Elementry, then Tylor & McLurin This lecture on series strts in strnge plce, by revising rithmetic nd geometric series, nd then proceeding to consider other elementry series. The relevnce

More information

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9 III Lecture on Numericl Integrtion File fclib/dttb/lecture-notes/numerical-inter03.tex /by EC, 3/14/008 t 15:11, version 9 1 Sttement of the Numericl Integrtion Problem In this lecture we consider the

More information

12 Basic Integration in R

12 Basic Integration in R 14.102, Mt for Economists Fll 2004 Lecture Notes, 10/14/2004 Tese notes re primrily bsed on tose written by Andrei Bremzen for 14.102 in 2002/3, nd by Mrek Pyci for te MIT Mt Cmp in 2003/4. I ve mde only

More information

4.4 Areas, Integrals and Antiderivatives

4.4 Areas, Integrals and Antiderivatives . res, integrls nd ntiderivtives 333. Ares, Integrls nd Antiderivtives This section explores properties of functions defined s res nd exmines some connections mong res, integrls nd ntiderivtives. In order

More information

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 UNIFORM CONVERGENCE Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 Suppose f n : Ω R or f n : Ω C is sequence of rel or complex functions, nd f n f s n in some sense. Furthermore,

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 203 Outline Riemnn Sums Riemnn Integrls Properties Abstrct

More information

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014 Lecture 17 Integrtion: Guss Qudrture Dvid Semerro University of Illinois t Urbn-Chmpign Mrch 0, 014 Dvid Semerro (NCSA) CS 57 Mrch 0, 014 1 / 9 Tody: Objectives identify the most widely used qudrture method

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 2013 Outline 1 Riemnn Sums 2 Riemnn Integrls 3 Properties

More information

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230 Polynomil Approimtions for the Nturl Logrithm nd Arctngent Functions Mth 23 You recll from first semester clculus how one cn use the derivtive to find n eqution for the tngent line to function t given

More information

p(t) dt + i 1 re it ireit dt =

p(t) dt + i 1 re it ireit dt = Note: This mteril is contined in Kreyszig, Chpter 13. Complex integrtion We will define integrls of complex functions long curves in C. (This is bit similr to [relvlued] line integrls P dx + Q dy in R2.)

More information

Math 113 Exam 2 Practice

Math 113 Exam 2 Practice Mth 3 Exm Prctice Februry 8, 03 Exm will cover 7.4, 7.5, 7.7, 7.8, 8.-3 nd 8.5. Plese note tht integrtion skills lerned in erlier sections will still be needed for the mteril in 7.5, 7.8 nd chpter 8. This

More information

Lab 11 Approximate Integration

Lab 11 Approximate Integration Nme Student ID # Instructor L Period Dte Due L 11 Approximte Integrtion Ojectives 1. To ecome fmilir with the right endpoint rule, the trpezoidl rule, nd Simpson's rule. 2. To compre nd contrst the properties

More information

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

More information

Math 113 Fall Final Exam Review. 2. Applications of Integration Chapter 6 including sections and section 6.8

Math 113 Fall Final Exam Review. 2. Applications of Integration Chapter 6 including sections and section 6.8 Mth 3 Fll 0 The scope of the finl exm will include: Finl Exm Review. Integrls Chpter 5 including sections 5. 5.7, 5.0. Applictions of Integrtion Chpter 6 including sections 6. 6.5 nd section 6.8 3. Infinite

More information

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties; Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

Improper Integrals, and Differential Equations

Improper Integrals, and Differential Equations Improper Integrls, nd Differentil Equtions October 22, 204 5.3 Improper Integrls Previously, we discussed how integrls correspond to res. More specificlly, we sid tht for function f(x), the region creted

More information

12.1 Introduction to Rational Expressions

12.1 Introduction to Rational Expressions . Introduction to Rtionl Epressions A rtionl epression is rtio of polynomils; tht is, frction tht hs polynomil s numertor nd/or denomintor. Smple rtionl epressions: 0 EVALUATING RATIONAL EXPRESSIONS To

More information

1 Error Analysis of Simple Rules for Numerical Integration

1 Error Analysis of Simple Rules for Numerical Integration cs41: introduction to numericl nlysis 11/16/10 Lecture 19: Numericl Integrtion II Instructor: Professor Amos Ron Scries: Mrk Cowlishw, Nthnel Fillmore 1 Error Anlysis of Simple Rules for Numericl Integrtion

More information

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)

MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.) MORE FUNCTION GRAPHING; OPTIMIZATION FRI, OCT 25, 203 (Lst edited October 28, 203 t :09pm.) Exercise. Let n be n rbitrry positive integer. Give n exmple of function with exctly n verticl symptotes. Give

More information

Chapter 0. What is the Lebesgue integral about?

Chapter 0. What is the Lebesgue integral about? Chpter 0. Wht is the Lebesgue integrl bout? The pln is to hve tutoril sheet ech week, most often on Fridy, (to be done during the clss) where you will try to get used to the ides introduced in the previous

More information

Z b. f(x)dx. Yet in the above two cases we know what f(x) is. Sometimes, engineers want to calculate an area by computing I, but...

Z b. f(x)dx. Yet in the above two cases we know what f(x) is. Sometimes, engineers want to calculate an area by computing I, but... Chpter 7 Numericl Methods 7. Introduction In mny cses the integrl f(x)dx cn be found by finding function F (x) such tht F 0 (x) =f(x), nd using f(x)dx = F (b) F () which is known s the nlyticl (exct) solution.

More information

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function? Mth 125 Summry Here re some thoughts I ws hving while considering wht to put on the first midterm. The core of your studying should be the ssigned homework problems: mke sure you relly understnd those

More information

Chapters 4 & 5 Integrals & Applications

Chapters 4 & 5 Integrals & Applications Contents Chpters 4 & 5 Integrls & Applictions Motivtion to Chpters 4 & 5 2 Chpter 4 3 Ares nd Distnces 3. VIDEO - Ares Under Functions............................................ 3.2 VIDEO - Applictions

More information

We know that if f is a continuous nonnegative function on the interval [a, b], then b

We know that if f is a continuous nonnegative function on the interval [a, b], then b 1 Ares Between Curves c 22 Donld Kreider nd Dwight Lhr We know tht if f is continuous nonnegtive function on the intervl [, b], then f(x) dx is the re under the grph of f nd bove the intervl. We re going

More information

Main topics for the First Midterm

Main topics for the First Midterm Min topics for the First Midterm The Midterm will cover Section 1.8, Chpters 2-3, Sections 4.1-4.8, nd Sections 5.1-5.3 (essentilly ll of the mteril covered in clss). Be sure to know the results of the

More information

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), ) Euler, Iochimescu nd the trpezium rule G.J.O. Jmeson (Mth. Gzette 96 (0), 36 4) The following results were estblished in recent Gzette rticle [, Theorems, 3, 4]. Given > 0 nd 0 < s

More information

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES

DOING PHYSICS WITH MATLAB MATHEMATICAL ROUTINES DOIG PHYSICS WITH MATLAB MATHEMATICAL ROUTIES COMPUTATIO OF OE-DIMESIOAL ITEGRALS In Cooper School of Physics, University of Sydney in.cooper@sydney.edu.u DOWLOAD DIRECTORY FOR MATLAB SCRIPTS mth_integrtion_1d.m

More information

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden Numericl Anlysis 10th ed R L Burden, J D Fires, nd A M Burden Bemer Presenttion Slides Prepred by Dr. Annette M. Burden Youngstown Stte University July 9, 2015 Chpter 4.1: Numericl Differentition 1 Three-Point

More information

Chapter 5. Numerical Integration

Chapter 5. Numerical Integration Chpter 5. Numericl Integrtion These re just summries of the lecture notes, nd few detils re included. Most of wht we include here is to be found in more detil in Anton. 5. Remrk. There re two topics with

More information

Recitation 3: More Applications of the Derivative

Recitation 3: More Applications of the Derivative Mth 1c TA: Pdric Brtlett Recittion 3: More Applictions of the Derivtive Week 3 Cltech 2012 1 Rndom Question Question 1 A grph consists of the following: A set V of vertices. A set E of edges where ech

More information

NUMERICAL INTEGRATION

NUMERICAL INTEGRATION NUMERICAL INTEGRATION How do we evlute I = f (x) dx By the fundmentl theorem of clculus, if F (x) is n ntiderivtive of f (x), then I = f (x) dx = F (x) b = F (b) F () However, in prctice most integrls

More information

Big idea in Calculus: approximation

Big idea in Calculus: approximation Big ide in Clculus: pproximtion Derivtive: f (x) = df dx f f(x +h) f(x) =, x h rte of chnge is pproximtely the rtio of chnges in the function vlue nd in the vrible in very short time Liner pproximtion:

More information

Partial Derivatives. Limits. For a single variable function f (x), the limit lim

Partial Derivatives. Limits. For a single variable function f (x), the limit lim Limits Prtil Derivtives For single vrible function f (x), the limit lim x f (x) exists only if the right-hnd side limit equls to the left-hnd side limit, i.e., lim f (x) = lim f (x). x x + For two vribles

More information

( ) as a fraction. Determine location of the highest

( ) as a fraction. Determine location of the highest AB Clculus Exm Review Sheet - Solutions A. Preclculus Type prolems A1 A2 A3 A4 A5 A6 A7 This is wht you think of doing Find the zeros of f ( x). Set function equl to 0. Fctor or use qudrtic eqution if

More information

AB Calculus Review Sheet

AB Calculus Review Sheet AB Clculus Review Sheet Legend: A Preclculus, B Limits, C Differentil Clculus, D Applictions of Differentil Clculus, E Integrl Clculus, F Applictions of Integrl Clculus, G Prticle Motion nd Rtes This is

More information

5: The Definite Integral

5: The Definite Integral 5: The Definite Integrl 5.: Estimting with Finite Sums Consider moving oject its velocity (meters per second) t ny time (seconds) is given y v t = t+. Cn we use this informtion to determine the distnce

More information

Tangent Line and Tangent Plane Approximations of Definite Integral

Tangent Line and Tangent Plane Approximations of Definite Integral Rose-Hulmn Undergrdute Mthemtics Journl Volume 16 Issue 2 Article 8 Tngent Line nd Tngent Plne Approximtions of Definite Integrl Meghn Peer Sginw Vlley Stte University Follow this nd dditionl works t:

More information

Math 113 Exam 2 Practice

Math 113 Exam 2 Practice Mth Em Prctice Februry, 8 Em will cover sections 6.5, 7.-7.5 nd 7.8. This sheet hs three sections. The first section will remind you bout techniques nd formuls tht you should know. The second gives number

More information

1 Review: Volumes of Solids (Stewart )

1 Review: Volumes of Solids (Stewart ) Lecture : Some Bic Appliction of Te Integrl (Stewrt 6.,6.,.,.) ul Krin eview: Volume of Solid (Stewrt 6.-6.) ecll: we d provided two metod for determining te volume of olid of revolution. Te rt w by dic

More information

( ) where f ( x ) is a. AB Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

( ) where f ( x ) is a. AB Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x). AB Clculus Exm Review Sheet A. Preclculus Type prolems A1 Find the zeros of f ( x). This is wht you think of doing A2 A3 Find the intersection of f ( x) nd g( x). Show tht f ( x) is even. A4 Show tht f

More information

f(a+h) f(a) x a h 0. This is the rate at which

f(a+h) f(a) x a h 0. This is the rate at which M408S Concept Inventory smple nswers These questions re open-ended, nd re intended to cover the min topics tht we lerned in M408S. These re not crnk-out-n-nswer problems! (There re plenty of those in the

More information

Scientific notation is a way of expressing really big numbers or really small numbers.

Scientific notation is a way of expressing really big numbers or really small numbers. Scientific Nottion (Stndrd form) Scientific nottion is wy of expressing relly big numbers or relly smll numbers. It is most often used in scientific clcultions where the nlysis must be very precise. Scientific

More information

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60.

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60. Mth 104: finl informtion The finl exm will tke plce on Fridy My 11th from 8m 11m in Evns room 60. The exm will cover ll prts of the course with equl weighting. It will cover Chpters 1 5, 7 15, 17 21, 23

More information

Definition of Continuity: The function f(x) is continuous at x = a if f(a) exists and lim

Definition of Continuity: The function f(x) is continuous at x = a if f(a) exists and lim Mth 9 Course Summry/Study Guide Fll, 2005 [1] Limits Definition of Limit: We sy tht L is the limit of f(x) s x pproches if f(x) gets closer nd closer to L s x gets closer nd closer to. We write lim f(x)

More information

Lecture 19: Continuous Least Squares Approximation

Lecture 19: Continuous Least Squares Approximation Lecture 19: Continuous Lest Squres Approximtion 33 Continuous lest squres pproximtion We begn 31 with the problem of pproximting some f C[, b] with polynomil p P n t the discrete points x, x 1,, x m for

More information

5.7 Improper Integrals

5.7 Improper Integrals 458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the

More information

Section 6.1 Definite Integral

Section 6.1 Definite Integral Section 6.1 Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot e determined

More information

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx... Contents 7.1 Integrtion by Prts................................... 2 7.2 Trigonometric Integrls.................................. 8 7.2.1 Evluting sin m x cos n (x)......................... 8 7.2.2 Evluting

More information

Section 5.1 #7, 10, 16, 21, 25; Section 5.2 #8, 9, 15, 20, 27, 30; Section 5.3 #4, 6, 9, 13, 16, 28, 31; Section 5.4 #7, 18, 21, 23, 25, 29, 40

Section 5.1 #7, 10, 16, 21, 25; Section 5.2 #8, 9, 15, 20, 27, 30; Section 5.3 #4, 6, 9, 13, 16, 28, 31; Section 5.4 #7, 18, 21, 23, 25, 29, 40 Mth B Prof. Audrey Terrs HW # Solutions by Alex Eustis Due Tuesdy, Oct. 9 Section 5. #7,, 6,, 5; Section 5. #8, 9, 5,, 7, 3; Section 5.3 #4, 6, 9, 3, 6, 8, 3; Section 5.4 #7, 8,, 3, 5, 9, 4 5..7 Since

More information

1 Probability Density Functions

1 Probability Density Functions Lis Yn CS 9 Continuous Distributions Lecture Notes #9 July 6, 28 Bsed on chpter by Chris Piech So fr, ll rndom vribles we hve seen hve been discrete. In ll the cses we hve seen in CS 9, this ment tht our

More information

Sample Problems for the Final of Math 121, Fall, 2005

Sample Problems for the Final of Math 121, Fall, 2005 Smple Problems for the Finl of Mth, Fll, 5 The following is collection of vrious types of smple problems covering sections.8,.,.5, nd.8 6.5 of the text which constitute only prt of the common Mth Finl.

More information

( ) where f ( x ) is a. AB/BC Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

( ) where f ( x ) is a. AB/BC Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x). AB/ Clculus Exm Review Sheet A. Preclculus Type prolems A1 Find the zeros of f ( x). This is wht you think of doing A2 Find the intersection of f ( x) nd g( x). A3 Show tht f ( x) is even. A4 Show tht

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2019

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2019 ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS MATH00030 SEMESTER 208/209 DR. ANTHONY BROWN 7.. Introduction to Integrtion. 7. Integrl Clculus As ws the cse with the chpter on differentil

More information

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS. THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem

More information

1 The Riemann Integral

1 The Riemann Integral The Riemnn Integrl. An exmple leding to the notion of integrl (res) We know how to find (i.e. define) the re of rectngle (bse height), tringle ( (sum of res of tringles). But how do we find/define n re

More information

Sections 5.2: The Definite Integral

Sections 5.2: The Definite Integral Sections 5.2: The Definite Integrl In this section we shll formlize the ides from the lst section to functions in generl. We strt with forml definition.. The Definite Integrl Definition.. Suppose f(x)

More information

Orthogonal Polynomials and Least-Squares Approximations to Functions

Orthogonal Polynomials and Least-Squares Approximations to Functions Chpter Orthogonl Polynomils nd Lest-Squres Approximtions to Functions **4/5/3 ET. Discrete Lest-Squres Approximtions Given set of dt points (x,y ), (x,y ),..., (x m,y m ), norml nd useful prctice in mny

More information

Review of basic calculus

Review of basic calculus Review of bsic clculus This brief review reclls some of the most importnt concepts, definitions, nd theorems from bsic clculus. It is not intended to tech bsic clculus from scrtch. If ny of the items below

More information

Numerical Integration. 1 Introduction. 2 Midpoint Rule, Trapezoid Rule, Simpson Rule. AMSC/CMSC 460/466 T. von Petersdorff 1

Numerical Integration. 1 Introduction. 2 Midpoint Rule, Trapezoid Rule, Simpson Rule. AMSC/CMSC 460/466 T. von Petersdorff 1 AMSC/CMSC 46/466 T. von Petersdorff 1 umericl Integrtion 1 Introduction We wnt to pproximte the integrl I := f xdx where we re given, b nd the function f s subroutine. We evlute f t points x 1,...,x n

More information

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

5.1 How do we Measure Distance Traveled given Velocity? Student Notes . How do we Mesure Distnce Trveled given Velocity? Student Notes EX ) The tle contins velocities of moving cr in ft/sec for time t in seconds: time (sec) 3 velocity (ft/sec) 3 A) Lel the x-xis & y-xis

More information