[PDF] Taylor Polynomials — Approximating Functions Near a Specified



Previous PDF Next PDF







Approximating functions by Taylor Polynomials

Of course, this approximation will only be good when x is relatively near a The tangent line approximation of f (x) for x near a is called the first degree Taylor Polynomial of f (x) and is: f (x) ≈ f (a)+ f (a)(x −a) x f(x) For example, we can approximate the value of sin(x) for values of x near zero, using the fact that we know sin0 = 0



Taylor Polynomials — Approximating Functions Near a Specified

1 Zeroth Approximation — the Constant Approximation The simplest functions are those that are constants The first approximation will be by a constant function That is, the approximating function will have the form F(x) = A, for some constant A To ensure that F(x) is a good approximation for x close to x0, we choose



Higher-Order Approximations Using Taylor Polynomials MA 113

anti-derivative for sin(x2), so instead we use a Taylor polynomial with a = 0 We can obtain a Taylor polynomial for this function by substituting x2 for x in a Taylor polynomial for sin(x); here we’ve used a seventh-order Taylor polynomial for sin(x): sin(x2) ˇx2 x6 6 + x10 120 x14 5040 Thus, we have Z 1 0 sin(x2)dx ˇ Z 1 0 x2 x6 6 + x10



Taylor Polynomials - Finite Mathematics and Applied Calculus

For this reason, we often call the Taylor sum the Taylor approximation of degree n The larger n is, the better the approximation Example 1 Taylor Polynomial Expand f(x) = 1 1–x – 1 around a = 0, to get linear, quadratic and cubic approximations Solution We will be using the formula for the nth Taylor sum with a = 0 Thus, we



Project 2: Taylor polynomials - University of Notre Dame

We show the graph all four Taylor polynomials with the function f(x) = cosx below In the graph below, we show the graph of cosx along with T 8(x), showing that it gives the best polynomial approximation among those shown above 6



88 Applications of Taylor Polynomials

tangent line is the best linear approximation to ex near (0, 1) The graph of T 2 is the parabola y = 1 + x + x2/2, and the graph of T 3 is the cubic curve y = 1 + x + x2/2 + x3/6, which is a closer fit to the exponential curve y = ex than T 2 The next Taylor polynomial T 4 would be an even better approximation, and so on





#5 - Taylor Series: Expansions, Approximations and Error

taylor approximation Evaluate e2: Using 0th order Taylor series: ex ˇ1 does not give a good fit Using 1st order Taylor series: ex ˇ1 +x gives a better fit Using 2nd order Taylor series: ex ˇ1 +x +x2=2 gives a a really good fit 1 importnumpy as np 2 x = 2 0 3 pn = 0 0 4 forkinrange(15): 5 pn += (x**k) / math factorial(k) 6 err = np exp



Lectures On Approximation By Polynomials

1 Approximation by Polynomials A basic property of a polynomial P(x) = Pn 0 arxr is that its value for 1 a given x can be calculated (e g by a machine) in a finite number of steps A central problem of mathematical analysis is the approximation to more general functions by polynomials an the estimation of how small the discrepancy can be made

[PDF] approximation des fonctions analyse numérique

[PDF] approximation linéaire d'une fonction

[PDF] approximation de pi par la méthode de monte carlo

[PDF] méthode de monte carlo algorithme

[PDF] méthode de la sécante

[PDF] méthode du point fixe

[PDF] methode de newton pdf

[PDF] méthode de héron dm

[PDF] developpement decimal

[PDF] loi de poisson exemple

[PDF] approximation dans un calcul synonyme

[PDF] approximation linéaire excel

[PDF] approximation affine d'une fonction

[PDF] approximation affine d'une fonction au voisinage de a

[PDF] approximation linéaire fonction deux variables

Taylor Polynomials — Approximating Functions Near a Specified

Taylor Polynomials - Approximating Functions Near aSpecified PointSuppose that you are interested in the values of some functionf(x) forxnear some fixed

pointx0. The function is too complicated to work with directly. So you wish to work instead with some other functionF(x) that is both simple and a good approximation tof(x) forx nearx0. We"ll consider a couple of examples of this scenario later. First, we develop several different approximations.

1. Zeroth Approximation - the Constant Approximation

The simplest functions are those that are constants. The first approximation will be by a constant function. That is, the approximating function will have the formF(x) =A, for some constantA. To ensure thatF(x) is a good approximation forxclose tox0, we choose Aso thatf(x) andF(x) take exactly the same value whenx=x0.

F(x) =AsoF(x0) =A=f(x0) =?A=f(x0)

Our first, and crudest, approximation rule is

f(x)≈f(x0) (1) Here is a figure showing the graphs of a typicalf(x) and approximating functionF(x). At x0xy y=f(x) y=F(x) =f(x0) x=x0,f(x) andF(x) take the same value. Forxvery nearx0, the values off(x) andF(x) remain close together. But the quality of the approximation deteriorates fairly quickly asx moves away fromx0.

2. First Approximation - the Tangent Line, or Linear, Approxi-

mation We now develop a better approximation by allowing the approximating function to be a linear function ofxand not just a constant function. That is, we allowF(x) to be of the formA+Bx, for some constantsAandB. To ensure thatF(x) is a good approximation c ?Joel Feldman. 2014. All rights reserved.1January 29, 2013 forxclose tox0, we chooseAandBso thatf(x0) =F(x0) andf?(x0) =F?(x0). Thenf(x) andF(x) will have both the same value and the same slope atx=x0.

F(x) =A+Bx=?F(x0) =A+Bx0=f(x0)

F ?(x) =B=?F?(x0) =B=f?(x0) SubstitutingB=f?(x0) intoA+Bx0=f(x0) givesA=f(x0)-x0f?(x0) and consequently F(x) =A+Bx=f(x0)-x0f?(x0) +xf?(x0) =f(x0) +f?(x0)(x-x0). So, our second approximation is f(x)≈f(x0) +f?(x0)(x-x0) (2) You may recall thaty=f(x0) +f?(x0)(x-x0) is exactly the equation of the tangent line to the curvey=f(x) atx0. Here is a figure showing the graphs of a typicalf(x) and approximating functionF(x). Observe that the graph off(x0) +f?(x0)(x-x0) remains x0xy y=f(x)y=F(x) =f(x0) +f?(x0)(x-x0) close to the graph off(x) for a much larger range ofxthan did the graph off(x0).

3. Second Approximation - the Quadratic Approximation

We next develop a still better approximation by allowing the approximating function be to a quadratic function ofx. That is, we allowF(x) to be of the formA+Bx+Cx2, for some constantsA,BandC. To ensure thatF(x) is a good approximation forxclose tox0, we chooseA,BandCso thatf(x0) =F(x0) andf?(x0) =F?(x0) andf??(x0) =F??(x0).

F(x) =A+Bx+Cx2=?F(x0) =A+Bx0+Cx20=f(x0)

F ?(x) =B+ 2Cx=?F?(x0) =B+ 2Cx0=f?(x0) F ??(x) = 2C=?F??(x0) = 2C=f??(x0)

Solve forCfirst, thenBand finallyA.

C=1

2f??(x0) =?B=f?(x0)-2Cx0=f?(x0)-x0f??(x0)

2f??(x0)x20

Then build upF(x).

F(x) =f(x0)-f?(x0)x0+1

2f??(x0)x20(this line isA)

+f?(x0)x-f??(x0)x0x(this line isBx) 1

2f??(x0)x2(this line isCx2)

=f(x0) +f?(x0)(x-x0) +1

2f??(x0)(x-x0)2

c ?Joel Feldman. 2014. All rights reserved.2January 29, 2013

Our third approximation is

f(x)≈f(x0) +f?(x0)(x-x0) +1

2f??(x0)(x-x0)2(3)

It is called the quadratic approximation. Here is a figure showing the graphs of a typical f(x) and approximating functionF(x). This third approximation looks better than both x0xy y=f(x) y=F(x) =f(x0) +f?(x0)(x-x0) +1

2f??(x0)(x-x0)2

the first and second.

4. Still Better Approximations - Taylor Polynomials

We can use the same strategy to generate still better approximations by polynomials of any degree we like. Let"s approximate by a polynomial of degreen. The algebra will be simpler if we make the approximating polynomialF(x) of the form a

0+a1(x-x0) +a2(x-x0)2+···+an(x-x0)n

Becausex0is itself a constant, this is really just a rewriting ofA0+A1x+A2x2+···+Anxn.

For example,

a

0+a1(x-x0) +a2(x-x0)2=a0+a1x-a1x0+a2x2-2a2xx0+a2x20

= (a0-a1x0+a2x20) + (a1-2a2x0)x+a2x2 =A0+A1x+A2x2 withA0=a0-a1x0+a2x20,A1=a1-2a2x0andA2=a2. The advantage of the form a

0+a1(x-x0) +···is thatx-x0is zero whenx=x0, so lots of terms in the computation

drop out. We determine the coefficientsaiby the requirements thatf(x) and its approximator F(x) have the same value and the same firstnderivatives atx=x0. F(x) =a0+a1(x-x0) +a2(x-x0)2+···+an(x-x0)n =?F(x0) =a0=f(x0) F ?(x) =a1+ 2a2(x-x0) + 3a3(x-x0)2+···+nan(x-x0)n-1 =?F?(x0) =a1=f?(x0) F ??(x) = 2a2+ 3×2a3(x-x0) +···+n(n-1)an(x-x0)n-2 =?F??(x0) = 2a2=f??(x0) c ?Joel Feldman. 2014. All rights reserved.3January 29, 2013 F(3)(x) = 3×2a3+···+n(n-1)(n-2)an(x-x0)n-3 =?F(3)(x0) = 3×2a3=f(3)(x0) F (n)(x) =n!an=?F(n)(x0) =n!an=f(n)(x0) Heren! =n(n-1)(n-2)···1 is callednfactorial. Hence a

0=f(x0)a1=f?(x0)a2=1

and the approximator, which is called the Taylor polynomial of degreenforf(x) atx=x0, is f(x)≈f(x0)+f?(x0)(x-x0)+1 or, in summation notation, f(x)≈n? ?=01 ?!f(?)(x0)(x-x0)?(4) where we are using the standard convention that 0! = 1.

5. TheΔx,ΔyNotation

Suppose that we have two variablesxandythat are related byy=f(x), for some function f. For example,xmight be the number of cars manufactured per week in some factory and ythe cost of manufacturing thosexcars. Letx0be some fixed value ofxand lety0=f(x0) be the corresponding value ofy. Now suppose thatxchanges by an amount Δx, fromx0to x

0+Δx. Asxundergoes this change,ychanges fromy0=f(x0) tof(x0+Δx). The change

inythat results from the change Δxinxis

Δy=f(x0+ Δx)-f(x0)

Substitutingx=x0+ Δxinto the linear approximation (2) yields the approximation f(x0+ Δx)≈f(x0) +f?(x0)(x0+ Δx-x0) =f(x0) +f?(x0)Δx forf(x0+ Δx) and consequently the approximation Δy=f(x0+ Δx)-f(x0)≈f(x0) +f?(x0)Δx-f(x0) =?Δy≈f?(x0)Δx(5) for Δy. In the automobile manufacturing example, when the production level isx0cars per week, increasing the production level by Δxwill cost approximatelyf?(x0)Δx. The additional cost per additional car,f?(x0), is called the "marginal cost" of a car. If we use the quadratic approximation (3) in place of the linear approximation (2) f(x0+ Δx)≈f(x0) +f?(x0)Δx+1

2f??(x0)Δx2

c ?Joel Feldman. 2014. All rights reserved.4January 29, 2013 we arrive at the quadratic approximation

Δy=f(x0+ Δx)-f(x0)

≈f(x0) +f?(x0)Δx+1

2f??(x0)Δx2-f(x0)

=?Δy≈f?(x0)Δx+1

2f??(x0)Δx2(6)

for Δy.

6. Examples

Example 1

As an initial example, we compute, approximately, tan46 ◦, using the constant approximation (1), the linear approximation (2) and the quadratic approximation (3). To do so, we choose f(x) = tanx,x= 46π

180radians andx0= 45π180=π4radians. This is a good choice forx0

because •x0= 45◦is close tox= 46◦. Generally, the closerxis tox0, the better the quality of our various approximations. •We know the values of all trig functions at 45◦. The first step in applying our approximations is to computefand its first two derivatives atx=x0. f(x) = tanx=?f(x0) = tanπ 4= 1 f ?(x) = (cosx)-2=?f?(x0) =1 cos2(π/4)=1(1/⎷2)2= 2

45◦⎷

21
1 f??(x) =-2-sinx cos3x=?f??(x0) = 2sin(π/4)cos3(π/4)= 21/⎷ 2 (1/⎷2)3= 211/2= 4

Asx-x0= 46π

180-45π180=π180radians, the three approximations are

f(x)≈f(x0)= 1 f(x)≈f(x0) +f?(x0)(x-x0) = 1 + 2π

180= 1.034907

f(x)≈f(x0) +f?(x0)(x-x0) +1

2f??(x0)(x-x0)2= 1 + 2π180+124?π180?

2= 1.035516

For comparison purposes, tan46

◦really is 1.035530 to 6 decimal places.

Example 1

All of our derivative formulae for trig functions were developed under the assumption that angles are measured in radians. Those derivatives appeared inthe approxima- tion formulae that we used in Example 1, so we were obliged to expressx-x0in radians.

Warning 2.

c ?Joel Feldman. 2014. All rights reserved.5January 29, 2013

Example 3

Let"s find all Taylor polyomials for sinxand cosxatx0= 0. To do so we merely need com- pute all derivatives of sinxand cosxatx0= 0. First, compute all derivatives at general x. f(x) = sinx f?(x) = cosx f??(x) =-sinx f(3)(x) =-cosx f(4)(x) = sinx··· g(x) = cosx g?(x) =-sinx g??(x) =-cosx g(3)(x) = sinx g(4)(x) = cosx···(7) The pattern starts over again with the fourth derivative being thesame as the original function. Now setx=x0= 0. f(x) = sinx f(0) = 0f?(0) = 1f??(0) = 0f(3)(0) =-1f(4)(0) = 0··· g(x) = cosx g(0) = 1g?(0) = 0g??(0) =-1g(3)(0) = 0g(4)(0) = 1···(8)quotesdbs_dbs2.pdfusesText_2