Calculus II
Lesson 21: Approximating Sine and Cosine with Power Series
Approximating the sine function
Using
Maple's
ability to compute limits, it is easy to see how
behaves for small values of
. We know that
, and the limit
> Limit(sin(x), x=0) = limit(sin(x), x=0);
shows that the sine function is continuous at 0. (This should be clear to you from the graph of
.) The interesting question is: how fast does
go to 0 as
. We can discover this by comparing
with various powers of
:
> limit(sin(x)/x, x=0);
The meaning of this limit is that
is approximately equal to 1, or
is approximately equal to
, when
is close to 0. We can check this graphically:
> plot( {sin(x),x}, x=-Pi/2..Pi/2 );
The graph certainly seems to confirm that the line
is tangent to the graph of
at the origin, so the difference between
and
is very small when
is close to 0. Of course, as
gets larger, the sine graph curves away from the tangent line, so the linear approximation is no longer good. Can we find a better approximation?
Since we know
and
are close for small
, let's see how their difference behaves as
goes to 0.
> limit(sin(x) - x, x=0);
Unfortunately, this limit doesn't tell us anything we didn't already know. Once again, what we need to find out is
how fast
goes to 0: how big (or small) is it for small
? We compare with powers of
in the same way as before: by dividing.
> limit( (sin(x) - x)/x, x=0 );
(If you think about it, you can probably see that this limit still isn't telling us anything new.)
> limit( (sin(x) - x)/x^2, x=0 );
(This limit is giving new information:
is apparently a very good approximation to
for small
.)
> limit( (sin(x) - x)/x^3, x=0 );
Aha! The non-zero value of this last limit shows that we have found how quickly
goes to 0 as
goes to 0: it goes about as fast as
. In fact, we now know that
is approximately equal to
for small
, or that
is approximately equal to
. We can check this computation again with a graph.
> p3 := x -> x - x^3/6;
> plot( {sin(x),p3(x)}, x=-Pi/2..Pi/2 );
This looks promising: if you compare it to our earlier graph, you can see that the cubic polynomial
stays closer to the graph of sine for longer than the tangent line did. Can we repeat the process and get a better approximation still? We will look at the difference
, and see how fast it goes to 0. Hopefully, it goes at least as fast (or faster) than
, so we'll start by dividing by
and work up to higher powers.
> limit( (sin(x) - (x - x^3/6))/x^3, x=0 );
> limit( (sin(x) - (x - x^3/6))/x^4, x=0 );
> limit( (sin(x) - (x - x^3/6))/x^5, x=0 );
We see that
behaves like
as
goes to 0, so
is approximately equal to
.
> p5 := x -> x - x^3/6 + x^5/120;
> plot( {sin(x),p5(x)}, x=-Pi/2..Pi/2 );
The approximation is now almost perfect over the interval
, so let's look at it over a longer interval.
> plot( {sin(x),p5(x)}, x=-Pi..Pi, thickness=2 );
We can now see that the approximation is reasonably good out to
(or -2), but if we wanted to approximate as far as
we would still need more terms.
>
Question 1
By repeating the procedure illustrated above, find the next two terms in the approximation of
.
>
Approximating the cosine function
This time, we can start by noting that
. This already gives us the linear approximation (tangent line) to
at
:
> plot( {cos(x),1}, x=-Pi/2..Pi/2 );
Now we follow the same procedure we did for the sine function: find how fast the difference
goes to 0.
> limit( cos(x) - 1, x=0 );
> limit( (cos(x) - 1)/x, x=0 );
> limit( (cos(x) - 1)/x^2, x=0 );
We have found a non-zero limit, and so the next approximation:
> p2 := x -> 1 - x^2/2;
> plot( {cos(x),p2(x)}, x=-Pi/2..Pi/2 );
Now find how fast the difference
goes to 0:
> limit( (cos(x) - (1 - x^2/2))/x^3, x=0 );
> limit( (cos(x) - (1 - x^2/2))/x^4, x=0 );
> p4 := 1 - x^2/2 + x^4/24;
> plot( {cos(x),p4(x)}, x=-Pi/2..Pi/2 );
> plot( {cos(x),p4(x)}, x=-Pi..Pi );
You can see that the polynomial
is an excellent approximation over the interval
, but we will need more terms if we want to approximate over the larger interval
.
Question 2
Find the next 2 approximations to
.
>
Question 3
What is the pattern of the coefficients in the approximating polynomials for sine and cosine?
>
Question 4
Use your approximating polynomials to guess what the derivatives of the sine and cosine function are. Confirm your guess by differentiating these functions with Maple .