In order to make a better approximation, the most natural thing to dois to find the simplest available function that has the same value, derivative,and second derivative all at the same time:P(a)=f(a)P0(a)=f0(a)P00(a)=f00(a).
3.2.TAYLOR SERIES APPROXIMATIONS59Now we begin solving the IVP with the second derivative held at a constantvalue:P00(a)=f00(a)P0(x)=Zf00(a)dx=f00(a)x+CP(x)=Zf00(a)x+C dx=f00(a)x22+Cx+DNow we plug in our two initial values to findCandD. Collecting terms, wegetf(x)≈P(x) =f00(a)2(x-a)2+f0(a)(x-a) +f(a).This can be called either a quadratic approximation or a second-order ap-proximation.Let’s take a moment to notice a pattern.It’s very easy, once we haveP(x) written down, to check thatP(a) =f(a), P0(a) =f0(a), P00(a) =f00(a)because of the power rule. Notice how the12up front is ready to cancel withthe 2 in the exponent upon differentiation.Let’s move to a third-order approximation. The lower-order terms shouldbe the same, so we only need to think about the newx3term.When wedifferentiate three times, we want to be left withf000(a). Since (x3)000= 6, weget thatP3(x) =f000(a)6(x-a)3+f00(a)2(x-a)2+f0(a)(x-a) +f(a)where we labeled the approximation by the order (i.e.the degree).Forderivatives of order higher than 3, we usually write the number in paren-theses, likef(4)(x) for the 4th derivative.We can also writednfdxn.Noticethatdndxn(xn) =n!.So, for annth-order approximation, we computePn(x) =nXk=0f(k)(a)k!(x-a)k.(3.4)wheref(0)(x) is justf(x). These are known asTaylor approximations.
60CHAPTER 3.APPROXIMATIONS WITH CALCULUS3.2.1ExamplesExample 1:Find theNth order approximation tof(x) =exatx= 0.This one is the easiest! Sinceddxex=exande0= 1, we haveex≈NXk=01k!xk= 1 +x+x22+x36+x424+· · ·+xNN!.(3.5)It’s standard to write approximations like 1 +x+x22instead ofx22+x+ 1since we are usually consideringxto be small, which makes powers ofxevensmaller. This is just like writing decimals. You will be expected to rememberthe series for approximations atx= 0 for many basic functions. There willbe a list later.Example 2:Find the 4th order approximation tof(x) = cosxatx= 0.Before beginning computations, take a quick look at the function. What dowe know about cosx? It’s bounded, it’s even, its derivatives are easy... that’salready plenty to process. Being bounded will be important later, but we’llset that aside for the moment. The fact that it’s even saves us some work.The coefficients in the approximation on all of the odd terms must be 0 sinceotherwise we’d have even + odd which is neither even nor odd. We want aneven approximation to our even function. This pans out if you go throughmechanically since sin 0 = 0 (check). The “easy derivatives” comment wasour best observation:ddxcosx=-sinxd2dx2cosx=-cosxd3dx3cosx=sinxd4dx4cosx=cosxdndxncosx=dn-4dxn-4cosxforn >4.