Application Center - Maplesoft

App Preview:

Calculus I: Lesson 13: Quadratic Approximation

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

Learn about Maple
Download Application


 

L13-quadraticApprox.mws

Calculus I

Lesson 13: Quadratic Approximation

We want to approximate a given function f(x) at x=a with a second degree polynomial.

Express the second degree polynomial as P(x) = A + B (x - a) + C (x-a)^2

We want:

P(a) = f (a)

P'(a) = f ' (a)

P''(a) = f '' (a)

Hence, we want:

A = f (a)

B = f ' (a)

2 C = f '' (a)

Thus,

P(x) = f (a) + f ' (a) (x-a) + [ f '' (a) / 2 ] (x-a)^2

Conclusion: The quadratic approximation to f(x) near x = a is given by:

P(x) = f (a) + f ' (a) (x-a) + [ f '' (a) / 2 ] (x-a)^2

Example 1

Find the quadratic approximation to f(x) = sec (x) for a = 0.

Plot both f(x) and P(x) on the same axes near 0.

> restart:

> f:= x -> sec(x);

f := sec

> f(0);

1

> D(f)(0);

0

> D(D(f))(0);

1

> P:= x -> 1 + 0.5 * (x)^2;

P := proc (x) options operator, arrow; 1+.5*x^2 end...

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

[Maple Plot]

Example 2
Find the quadratic approximation to f x) = sin (x) for a =
Pi/6 .

Plot both f(x) and P(x) on the same axes near Pi/6 .

Then plot both functions on a larger domain; is P(x) a good estimate

for f (x) away from Pi/6 ? .

> f:= x -> sin(x);

f := sin

> f(Pi/6);

1/2

> D(f)(Pi/6);

1/2*sqrt(3)

> evalf(%);

.8660254040

> D(D(f))(Pi/6);

-1/2

> P:= x -> 0.5 + .8660254040 * (x - Pi/6) - 0.25 *( x - Pi/6)^2;

P := proc (x) options operator, arrow; .5+.86602540...

> evalf(Pi/6);

.5235987758

> plot({f(x),P(x)}, x = 0..1, color=[brown,blue]);

[Maple Plot]

The graph below shows that P(x) is NOT a good approximation to f (x) for x far from Pi/6 .

> plot({f(x),P(x)}, x = -2*Pi..2*Pi, color=[brown,blue]);

[Maple Plot]

3) Find the quadratic approxiamtion for f (x) = 1/((1+x)^2) near a = 1.

Plot both f (x) and P (x) on the same axes near 1.

Plot both f (x) and P (x) on the same axes for a larger domain; is P(x) a good estimate away from 1?

Determine the values of x for which the quadratic approximation is accurate to within 0.01.

Can you use a plot to help?

> f:= x -> 1/(1+x)^2;

f := proc (x) options operator, arrow; 1/((1+x)^2) ...

> f(1);

1/4

> D(f)(1);

-1/4

> D(D(f))(1);

3/8

> P:= x -> 0.25 - 0.25 * (x - 1) + (3/16) * ( x - 1)^2;

P := proc (x) options operator, arrow; .50-.25*x+3/...

> plot({f(x),P(x)}, x = 0..2, color=[blue,brown]);

[Maple Plot]

> plot({f(x),P(x)}, x = 0..10, color=[blue,brown]);

[Maple Plot]

From the above graph, we see that P (x) is NOT a good estimate for f (x) for x not near 1.

We are to find x values for which | f(x) - P (x) | < 0.01, i.e.,

we want:

-0.01 < f (x) - P (x) < 0.01

OR

f (x) - 0.01 < P (x) < f (x) + 0.01.

> g1:= x -> f(x) - 0.01;

g1 := proc (x) options operator, arrow; f(x)-.1e-1 ...

> g2:= x -> f(x) + 0.01;

g2 := proc (x) options operator, arrow; f(x)+.1e-1 ...

> plot({P(x), g1(x), g2(x)}, x = 0.5..3, color=[blue, brown, magenta]);

[Maple Plot]

> solve({-0.01 < f (x) - P (x), x > 0}, x );

{x < 1.469855700, 0. < x}

> solve({f (x) - P (x) < 0.01, x > 0}, x);

{.6072384172 < x}

From the plot and solve, we see that | P (x) - f (x) | < 0.01 for

x in ( .6072384172 , 1.469855700 ). Our answer is a numerical estimate.