student lecture 3 taylor series-error estimates

5
LECTURE 3 TAYLOR SERIES AND LINEAR APPROXIMATION The Taylor Series of f (x, y ) about the point (a, b) is f (x, y ) = f (a, b)+(x - a) ∂f ∂x (a, b)+(y - b) ∂f ∂y (a, b) + 1 2! (x - a) 2 2 f ∂x 2 (a, b) + 2(x - a)(y - b) 2 f ∂x∂y (a, b)+(y - b) 2 2 f ∂y 2 (a, b) + higher-order terms. You have already seen in first year how Taylor and Maclaurin series are used to ap- proximate complicated functions with simple polynomials. Polynomials are very easy to work with and approximations of this sort are often used in engineering and the sciences to simplify complex structures. For example sin(x) is often approximated by x when x is small and measured in radians. TAYLOR SERIES FOR A SINGLE VARIABLE The Taylor series about the point x = a is f (x) = k=0 f (k) (a) k! (x - a) k = f (a)+ f (a)(x - a)+ 1 2! f ′′ (a)(x - a) 2 + 1 3! f ′′′ (a)(x - a) 3 + ··· Example 1 Find the Maclaurin series for g (x, y )= e x2y by considering the series above. 1+ (x2y) 1! + (x2y) 2 2! + ··· But this simple (and time reducing) approach will not always work! 1

Upload: uploadingperson

Post on 19-Jan-2016

16 views

Category:

Documents


0 download

DESCRIPTION

Student Lecture 3 Taylor Series-Error Estimates

TRANSCRIPT

Page 1: Student Lecture 3 Taylor Series-Error Estimates

LECTURE 3

TAYLOR SERIES AND LINEAR APPROXIMATION

The Taylor Series of f(x, y) about the point (a, b) is

f(x, y) = f(a, b) + (x− a)∂f

∂x(a, b) + (y − b)

∂f

∂y(a, b)

+1

2!

{

(x− a)2∂2f

∂x2(a, b) + 2(x− a)(y − b)

∂2f

∂x∂y(a, b) + (y − b)2

∂2f

∂y2(a, b)

}

+higher-order terms.

You have already seen in first year how Taylor and Maclaurin series are used to ap-proximate complicated functions with simple polynomials. Polynomials are very easy towork with and approximations of this sort are often used in engineering and the sciencesto simplify complex structures. For example sin(x) is often approximated by x when x issmall and measured in radians.

TAYLOR SERIES FOR A SINGLE VARIABLEThe Taylor series about the point x = a is

f(x) =

∞∑

k=0

f (k)(a)

k!(x− a)k

= f(a) + f ′(a)(x− a) +1

2!f ′′(a)(x− a)2 +

1

3!f ′′′(a)(x− a)3 + · · ·

Example 1 Find the Maclaurin series for g(x, y) = ex−2y by considering the seriesabove.

⋆ 1 + (x−2y)1!

+ (x−2y)2

2!+ · · · ⋆

But this simple (and time reducing) approach will not always work!

1

Page 2: Student Lecture 3 Taylor Series-Error Estimates

When we jump up a dimension to an arbitrary function z = f(x, y) the theory of TaylorSeries is still workable though a little more complicated. We are now approximatingcomplicated surfaces z = f(x, y) with simpler polynomial surfaces. Things to keep inmind are that:

• The production of a Taylor series will involve substantial partial differentiation ofthe function in question.

• A Taylor series about (a, b) in general will work best near (a, b).

• The more terms you take in general the better your approximation will be.

Example 2 Calculate the Taylor series of f(x, y) = ex cos(y) about (a, b) = (0, 0) upto and including quadratic terms. Compare the value of f(−0.1, 0.2) with its Taylorapproximation.

⋆ 1 + x+ 12(x2 − y2), 0.88680091 vs 0.885 ⋆

2

Page 3: Student Lecture 3 Taylor Series-Error Estimates

Example 3 Find the Taylor series of f(x, y) = x4y3 about the point (1, 2) up to andincluding quadratic terms.

⋆ 8 + 32(x− 1) + 12(y − 2) + 48(x− 1)2 + 48(x− 1)(y − 2) + 6(y − 2)2 ⋆

ERROR ESTIMATES

It is often the case that the independent variables x and y for z = f(x, y) have adegree of uncertainty in their values. That is we need to cope with small errors ∆x and∆y in x and y respectively. We may rewrite the linear approximation

f(x, y) ≈ f(a, b) + (x− a)∂f

∂x(a, b) + (y − b)

∂f

∂y(a, b)

as

f(x, y)− f(a, b) ≈ (x− a)∂f

∂x(a, b) + (y − b)

∂f

∂y(a, b)

and hence

∆f ≈∂f

∂x∆x+

∂f

∂y∆y.

This equation gives you the (linear) error in f in terms of the errors in x and y.

3

Page 4: Student Lecture 3 Taylor Series-Error Estimates

Example 4 Suppose that temperature T is given by T (x, y) = x2 + y3. Find theapproximate error in T if x = 1, y = 2, ∆x = 0.1 and ∆y = −0.3.

⋆− 3.4 ⋆

It is rare that we know the exact value and the exact direction of an error! Usuallythe error could be ± up to some maximum. We then use

|∆f | ≤

∂f

∂x

|∆x|+

∂f

∂y

|∆y|.

to generate the maximum possible error under given conditions.

Example 5 Suppose that temperature T is given by T (x, y) = x2 + y3. Find themaximum possible a) absolute error, b) relative absolute error and c) percentage absoluteerror in T if x = 1, y = 2, |∆x| ≤ 0.1 and |∆y| ≤ 0.3.

⋆ 3.8, 3.89

≈ 0.42, 42% ⋆

4

Page 5: Student Lecture 3 Taylor Series-Error Estimates

Example 6 The volume V of a cone with radius r and perpendicular height h is given

by V =1

3πr2h. Determine the maximum absolute error and the maximum percentage

error in calculating V given that r = 5 cm and h = 3 cm to the nearest millimetre.

⋆ 2.88 cm3, 3.7% ⋆

3You can now do Q 15 to 29

5