local linear approximation

27
f(x) f(x 0 ) x 0 P(x 0, f(x 0 )) The equation of the tangent line to the graph of the function f(x) at the point x 0 is y - f (x 0 )= f (x 0 ) (x - x 0 ) f(x 0 ) + f (x 0 ) (x - x 0 ) Local Linear Approximation

Upload: tarun-gehlot

Post on 01-Nov-2014

520 views

Category:

Technology


2 download

DESCRIPTION

Local linear approximation

TRANSCRIPT

Page 1: Local linear approximation

f(x)

f(x0)

x0

P(x0, f(x0))

The equation of the tangent line to the graph of the function f(x) at the point x0 is y − f (x0 ) = f ′(x0 ) (x − x0 )

f(x0) + f ′(x0 ) (x − x0 )

Local Linear Approximation

Page 2: Local linear approximation

x0 x

f(x)

x0

f(x0) + f ′(x0 ) (x − x0 )

If x is close to x0, then the value of the function f(x) at x (the height of the original curve at x), is very close to the value of the function f(x0) + f ′(x0 ) (x − x0 ) at x, (the height that the tangent line to f at x0 achieves at the point x).

Page 3: Local linear approximation

( ) ( )( )0 0 0f x f x x x′+ −The function is called the local linear approximation to f at x0. This function is a good approximation to f(x) if x is close to x0, and the closer the two points are, the better the approximation becomes.

Example. Find the local linear approximation to the function

at x0 = 1.

Solution.

( ) ( )233 3 .0 00x x x x x≈ + −

3y x=

( )3 1 3 1 3 2x x x≈ + − = − for x close to 1.

( )23If ( ) , then ( ) 3 00f x x f x x′= = . Therefore,

If x0 = 1, then

Page 4: Local linear approximation

x3 3x - 2

3(1.01) 1.0303= 3(1.01) 2 1.03− =

3(0.997) .991027= 3(.997) 2 .991− =

3(1.004) 1.01204= 3(1.004) 2 1.012− =

Page 5: Local linear approximation

Example. Find the local linear approximation to the function

at x0 = 2

Solution.

1y

x=

( )( )1 1 1 .020 0

x xx x x

≈ − −

( )1 1 1 2 12 4 4

xxx

≈ − − = − for x close to 2.

( )1 1If ( ) , then ( )

0 20

f x f xx x

−′= =

If x0 = 2, then

. Therefore,

Page 6: Local linear approximation

1/x

1-x/4

1 .49952.002

= 2.0021 .49954

− =

1 .550751.997

= 1.9971 .550754

− =

Page 7: Local linear approximation

In practice, we use the idea of local linear approximation in the following way.

1. We are given some value to calculate, say f(x), and the calculation is difficult.

2. We see that there is a nearby point x0 where the calculation of both f(x0) and f(x0)′ is relatively easy.

3. We approximate f(x) by f(x0)+ f(x0)′ (x− x0)

Page 8: Local linear approximation

Example.Use local linear approximations to approximate the quantity(1.98)3

Solution. (a) A nearby point where the function x3 and its derivative are easily evaluated is x0 = 2.

Near x0 = 2, the function x3 is approximated by the function

( ) ( ) ( )3 23 8 12( 2) 12 160 0 0x x x x x x+ − = + − = −

The true value is 7.762392.

Thus (1.98)3 is approximately 12(1.98) − 16 = 7.76

Page 9: Local linear approximation

Solution. (a) A nearby point where the function and its derivative are easily evaluated is 81.Near x0 = 81, the function is approximated by the function

( )1 1 99 ( 81)0 0 18 2 182 0

xx x x xx

+ − = + − = +

Example.Use local linear approximations to approximate the quantity 80.9

x

Thus is approximately

The true value is 8.994442729.

80.9 9 80.9 8.9944444442 18

+ =

x

Page 10: Local linear approximation

Example.Use local linear approximations to approximate the quantity sin(.1) (.1 radians is about 5.7 degrees)

Solution. (a) A nearby point where the function and its derivative are easily evaluated is 0.Near x0 = 0, the function sin(x) is approximated by the function

( )sin( ) cos( ) 0 1( 0)00 0x x x x x x+ − = + − =

Thus sin(.1) is approximately 0.1.

The true value is .099833.

Page 11: Local linear approximation

The second use of the derivative is to approximate small changes in a function. Start at a point x and move a small distance given by the independent variable ∆x. Then define ∆y to be the corresponding change in the value of y = f(x). We see that ∆y = f(x + ∆x) – f(x).

∆x

∆y

x x + ∆x

y = f(x)

y + ∆y = f(x +∆x)

Approximating Changes - Differentials

Page 12: Local linear approximation

dx

dy

f(x)

x x + dx

Now let us move away from x another small distance given by the independent variable dx, and define the dependent variable dy to be the corresponding change of the height of the tangent line at x. Then dy = f′(x)dx

Page 13: Local linear approximation

If we set dx = ∆x and combine the two diagrams, we see that dyis a good approximation to ∆y when ∆x is small.

Definition. Let dx be an arbitrary variable, and define dy to

be ( ) .f x dx′ Then the ratio of dy to dx is the derivative .dydx

dx and dy are called differentials.

Page 14: Local linear approximation

dx = ∆x

∆y

y = f(x)

y = f(x)

x x + ∆x

y + ∆y = f(x + ∆x)

dy

Page 15: Local linear approximation

Example. Find an expression for dy for each of the following functions:

(a) f(x) = x4 (b) (c) f(x) = sin(x)

Solution.

(a) (b)

(c )

4 3[ ] (4 )dy d x x dx= = 1[ ]2

dy d x dxx

= = [sin( )] cos( )dy d x x dx= =

( )f x x=

Solution. (a) (b) 18( 17)dy x dx−= − ( 17)dy dx= −

Example. (a) Find the differential dy if

(b) What is dy when x = 1?

17y x−=

Page 16: Local linear approximation

Example. Let

let x = 2, and let dx = ∆x = 0.1. Compute dy and ∆y.

Solution.

1 1( ) (.1) .0522

dy f x dx dxx

′= = = =

( ) ( )2 4.2 2 4 4.049 4 .049= + − + ≈ − =

( ) ( ) (2.1) (2)y f x x f x f f∆ = +∆ − = −

On the other hand

2 2y x= +

Page 17: Local linear approximation

Solution. Here x0 = 1, and dx = ∆x is 0.97 –1 = – 0.03.

2 8 22 82 2 22 8 2 8 8

x x xdy x dx dx dx dxx x x

′ ′ + = + = = = + + +

At x = 1, we have 1 1( .03) .013 3

dy dx= = − =−

[The true value of ∆y is 2(.97) 8 9 .009866+ − =−

Example. Let . Use dy to approximate ∆y when

x changes from 1 to 0.97

2 8y x= +

Page 18: Local linear approximation

Solution. Here x = 3, and dx = ∆x is 3.05 –3 = 0.05.

8 48 1 8 1 8 12 8 1 8 1

xdy x x dx x x dx x dxx x

′ = + = + + = + + + +

At x = 3, we have 12 3725 (.05) .3725 5

dy dx = + = =

The true value of ∆y is

3.05 8(3.05) 1 3 25 15.372 15 .372+ − = − =

Example. Let . Use dy to approximate ∆y when

x changes from 3 to 3.05

8 1y x x= +

Page 19: Local linear approximation

Example. A metal rod 15 cm. Long and 5 cm. in diameter is to be covered (except for the ends) with insulation that is 0.001 cm thick. Use differentials to estimate the volume of insulation needed.

2Then . Thus 2V R L dV RLdRπ π= =

Solution. Let V be the volume of the rod, R the radius, and Lthe length.

We estimate the volume of insulation to be the change in the volume of the cylinder when its radius changes from 2.5 cm. to 2.501 cm., that is dR = .001 cm.

3Then 2 2 (2.5)(15)(.001) 0.236cmdV RLdRπ π= = ≅

Page 20: Local linear approximation

Estimating Errors in Computations

Suppose that some quantity x is measured in an experiment. There is always the possibility that the measurement is in error to some extent, and the maximum amount of such error is often specified in the literature that accompanies the measuring device or program.

Frequently a computation is performed on the measured value x, producing the result f(x). The question is:

What is the maximum error present in the computed quantity f(x)?

Page 21: Local linear approximation

Suppose that the maximum error in a measurement x is known to be ∆x. We reason as follows:

Suppose that the true value of the quantity measured is x0. Then the distance between x and x0 is no more than ∆x, and therefore the maximum error in the computed value f(x) is estimated by

f(x0) − f(x) = f(x + ∆x) − f(x) = ∆y. We approximate this by dy.

In general we know the magnitude of the maximum measurement error, but not the sign. Thus we use the symbol ±in front of errors.

Page 22: Local linear approximation

Sometimes, instead of estimating the absolute error, we are moreinterested in the relative errors

and

If these are multiplied by 100 to express them as percents, we call them the percentage errors.If we are given the maximum percentage error of the measurement, then we want to estimate the maximum percentage error in the computed result.

dxx

[ ]( )( )

d f xdyy f x

=

Page 23: Local linear approximation

Example. The side of a cube is measured to be 25 cm. With a possible error of ± 1 cm.

(a) Use differentials to estimate the error in the calculated volume.

(b) Estimate the percentage errors in the side and volume.

Page 24: Local linear approximation

Example. The side of a cube is measured to be 25 cm. With a possible error of ± 1 cm.

(a) Use differentials to estimate the error in the calculated volume.

(b) Estimate the percentage errors in the side and volume.

Solution. (a) Let s stand for the length of the side of the cube, and V stand for the volume. Then we know that

3V s=It follows that 23 .dV s ds= The measured value of s is 25,

and we are given that the maximum value of ds is ± 1. Thus

2 33(25) ( 1) 1875cm .dV = ± =±

Page 25: Local linear approximation

Solution. (b) The relative error in measurement is

1 .0425

dss

±= =± which is ± 4 percent.

The relative error in the computed volume is therefore

23 3 3( .04) .123

dV s ds dsV ss

= = = ± =± Or 12 percent.

Page 26: Local linear approximation

Example. The electrical resistance of a certain wire is given by

Where k is a constant and r is the radius of the wire. Assuming that the listed radius r has a possible percentage error of ±5%, use differentials to estimate the percentage error in R (assume k to be exact.)

23kdR dr

r

−=

2kRr

=

2 2so 23

dR r k drdrR k rr

−= × =−Solution.

Since is ±5%, is ±10%.dRR

drr

Page 27: Local linear approximation

Example. The area of a circle is computed from the measured value of its diameter. Estimate the maximum permissablepercentage error in the measurement, if the percentage error in the area must be kept within ±1%.

22 . Thus

4 2D DA R dA dDπ ππ= = =

4so 22 2

dA D dDdDA D D

ππ

= × =

Solution.

If is to be less than or equal to ±1%, it follows that the

maximum value for is ±.5%.

dAA

dDD