Let our our interval be [a, b] and split it intonsubintervals. Leth=b-an.Adding up the areas of the trapezoids gives ushf(a) +f(a+h)2+f(a+h) +f(a+ 2h)2+· · ·+f(b-h) +f(b)2which we can simplify to arrive at the approximationZbaf(x)dx≈h(f(a)2+f(a+h) +· · ·+f(b-h) +f(b)2) :=Tn.(3.2)This is very simple to implement. Just break up your interval, plug in all ofthe end points, and make sure to take only half of the first and last values.Trying out the same integral from before, we get1√2πZ10e-x2/2dx≈1√2π14(e02+e-(14)2/2+e-(12)2/2+e-(34)2/2+e-1/22)≈0.34008The Trapezoidal Rule is much simpler to use than the midpoint rule, and it’salmost as accurate.Zbaf(x)dx-Tn≤K(b-a)312n2(3.3)
3.2.TAYLOR SERIES APPROXIMATIONS57whereK= max|f00(x)|forx∈[a, b].This is only scratching the surface of a large subject.On tests, therewill either be easy numbers to work with or you will be told to leave theapproximation in the form of a sum.3.2Taylor Series ApproximationsWhat does it mean when we say 1/3 =¯.3? Let’s think for a moment aboutwhat decimal notation means.10-1= 1/10=.110-2= 1/100=.0110-3= 1/1000=.001etc.So, 1/3 =¯.3 means13=310+3100+31000+· · ·=∞Xk=13110kwhich we can verify with our infinite geometric series formula:3/101-1/10= 1/3.Frequently, we use approximations like 1/3≈.33 in which we just round.From the series viewpoint, we’re taking an infinite series and simply loppingoff all of the terms after the first two:13=310+3100+31000+· · ·=≈310+3100.Wouldn’t it be nice if we could approximate complicated functions withrelatively simple polynomials? The idea is that instead of using sums of pow-ers of 10 to represent numbers, we will use sums of powers ofxto representfunctions. For example,sinxx≈1-x26ex3-1x2≈x+x52√1-4x≈1-2x-2x2.
58CHAPTER 3.APPROXIMATIONS WITH CALCULUSThose polynomials were not chosen at random! Try graphing the functionsand polynomials on the same grid withxsmall. In order to do this accurately,we need a way to represent functions as infinite series and then take the firstterms as our approximation.Recall linear approximations from 17A. Letf(x) be differentiable atx=a. Then we can make an approximation off(x) forxclose toaby lookingat the tangent line:f(x)≈L(x) =f0(a)(x-a) +f(a).All we did to create this rough approximation was to pick the simplest pos-sibleL(x) that had the same value and derivative ataasf:L(a)=f(a)L0(a)=f0(a).We have an easy initial value problem! Let’s recreate this linear approxima-tionLand then see how to improve upon it.L0(a)=f0(a)L(x)=Zf0(a)dx=f0(a)x+C=f0(a)x+CL(a)=f0(a)a+C=f(a)C=f(a)-f0(a)aL(x)=f0(a)(x-a) +f(a).We could have guessed this result by realizing that holding the derivativefixed is the same as our approximation being a line, and finding the equationof a line once you know its slope and a point that it passes through should befamiliar. However, this technique is generalizable, which makes it infinitelysuperior by mathematical standards.