Application Center - Maplesoft

App Preview:

Calculus I: Lesson 12: Linear Approximation

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

L12-linearApprox.mws

Calculus I

Lesson 12: Linear Approximation

Assume that f(x) is differentiable.

Recall that : Delta y = f (x + Delta x) - f (x)

Delta x = dx =( x + Delta x ) - x

dy = f ' (x) dx

For sufficiently small Delta x,

f ( x + Delta x) - f (x) is approximately equal to f ' (x) dx

and hence for sufficiently small Delta x

dy approximates Delta y

Example 1
Let
f(x) = x^5 , x = 2, and Delta x = 0.4.

Calculate, Delta y, dy, plot f(x) and the tangent line when x = 2.

> restart:

> f:= x -> x^5;

f := proc (x) options operator, arrow; x^5 end proc...

> D(f);

proc (x) options operator, arrow; 5*x^4 end proc

> f( 2 + 0.4) - f(2);

47.62624

> f(2.4);

79.62624

> df:= x -> 5*x^4;

df := proc (x) options operator, arrow; 5*x^4 end p...

> df(2);

80

> 80 * .4;

32.0

Hence, Delta y = 47.62624 and dy = f '(2) (0.4) = 32;

note that Delta x = 0.4 is large.

> tl:= x -> 32 + 80*(x - 2);

tl := proc (x) options operator, arrow; -128+80*x e...

> tl(2.4);

64.0

> with(plots):

Warning, the name changecoords has been redefined

> A:= plot({f(x),tl(x)}, x= 1.5..2.7, color=[blue,brown]):

> B:= plot([t,32,t = 2..2.4], color = magenta):

> C:= plot([2.4,t,t= 32 ..79.62624], color = magenta):

> F:= plot([t, 64, t= 2.4..2.6], color = black):

> G:= plot([2.6,t,t=64..79.62624], color = black):

> H:= plot([t,79.62624, t= 2.4..2.6], color = black):

> K:= textplot([2.65,74,'dy'],color = red):

> L:= textplot([2.5,50,'deltay'] , color = red):

> M:= textplot([2.2,20,'deltax'],color = red):

> display({A,B,C,F,G,H,K,L,M}, axes = boxed);

[Maple Plot]

The tangent line is the linear approximation to a function. We see here, that

for larger Delta x , the linear approxiamtion is NOT a good one.

Example 2

Let f(x) = sqrt(x+3) .

a) Find the linear approximation to f(x) when x = 1.

b) Plot f(x) and the approximation on the same axes.

c) Use the linear approximation to estimate, sqrt(3.98).

Compare this estimate to the actual value.

d) Calculate Delta y and dy, for x = 1 and Delta x = 2.98.

Plot f(x), the linear approximation and show dy and Delta y .

> f:= x -> sqrt(x + 3);

f := proc (x) options operator, arrow; sqrt(x+3) en...

> D(f);

proc (x) options operator, arrow; 1/2*1/sqrt(x+3) e...

> df:= x -> (0.5) * ( 1 / (sqrt(x + 3)));

df := proc (x) options operator, arrow; .5*1/sqrt(x...

> f(1);

2

> df(1);

.2500000000

Thus the linear approximation (i.e., the tangent line) passes through the point (1,2)

and has slope .25 .

> L:= x -> 2 + 0.25 * ( x - 1);

L := proc (x) options operator, arrow; 1.75+.25*x e...

a) Thus, linear approximation is: L(x) = 1.75 + 0.25 x .

> plot({f(x),L(x)}, x = -5..5, color=[brown,blue]);

[Maple Plot]

The linear approximation to f (x) is NOT good for x not close to 1.

> plot({f(x),L(x)}, x = 0.5..1.5, color=[brown,blue]);

[Maple Plot]

For x values close to 1, the linear approximation is better.

> L(3.98);

2.7450

> f(3.98);

2.641968963

c) The linear approximation function gives 2.7450 as an estimate for sqrt(3.98),

the actual value is approximately, 2.641968963

d) We now do part (d).

> f(3.98) - f(1);

.641968963

Thus, Delta y = .641968963 (for x = 1 and Delta x = 2.98).

> df(1) * 2.98;

.7450000000

Thus, dy = .7450000000 (for x = 1 and Delta x= 2.98).

> L(3.98);

2.7450

> f(1);

2

> L(1);

2.00

> f(3.98);

2.641968963

> with(plots):

Warning, the name changecoords has been redefined

> A:= plot({f(x),L(x)}, x = 0..6, color=[blue,brown]):

> B:= plot([t,2, t = 1..3.98], color = magenta):

> C:= plot([3.98,t,t = 2..2.7450], color = magenta):

> F:= plot([t,2.641968963, t = 3.98..4.2],color = black):

> G:= plot([4.2,t,t = 2.641968963..2.7450], color = black):

> H:= plot([t,2.7450, t = 3.98..4.2],color = black):

> K:= textplot([4.5,2.7,'dy'], align=RIGHT, color = red):

> L:= textplot([4.2,2.3,'deltay'], align=RIGHT, color = red):

> M:= textplot([2.3,1.9,'deltax'], color = red):

> display( {A,B,C,F,G,H,K,L,M}, axes = boxed);

[Maple Plot]