Current time:0:00Total duration:6:33

# Maclaurin series of sin(x)

## Video transcript

In the last video, we
took the Maclaurin series of cosine of x. We approximated it
using this polynomial. And we saw this pretty
interesting pattern. Let's see if we can
find a similar pattern if we try to approximate sine
of x using a Maclaurin series. And once again, a
Maclaurin series is really the same thing
as a Taylor series, where we are centering
our approximation around x is equal to 0. So it's just a special
case of a Taylor series. So let's take f of
x in this situation to be equal to sine of x. And let's do the same thing
that we did with cosine of x. Let's just take the
different derivatives of sine of x really fast. So if you have the first
derivative of sine of x, is just cosine of x. The second derivative
of the sine of x is the derivative of cosine of
x, which is negative sine of x. The third derivative is going
to be the derivative of this. So I'll just write
a 3 in parentheses there, instead of doing
prime, prime, prime. So the third derivative
is the derivative of this, which is
negative cosine of x. The fourth derivative
is the derivative of this, which is
positive sine of x again. So you see, just like cosine
of x, it kind of cycles after you take the
derivative enough times. And we care-- in order to do
the Maclaurin, series-- we care about evaluating the function,
and each of these derivatives at x is equal to 0. So let's do that. So for this, let me do this
in a different color, not that same blue. I'll do it in this purple color. So f-- that's hard
to see, I think So let's do this
other blue color. So f of 0, in this
situation, is 0. And f, the first derivative
evaluated at 0, is 1. Cosine of 0 is 1. Negative sine of 0
is going to be 0. So f prime prime, the second
derivative evaluated at 0 is 0. The third derivative
evaluated at 0 is negative 1. Cosine of 0 is 1. You have a negative out there. It is negative 1. And then the fourth
derivative evaluated at 0 is going to be 0 again. And we could keep going,
but once again, it seems like there's a pattern. 0, 1, 0, negative
1, 0, then you're going to go back to positive 1. So on and so forth. So let's find its
polynomial representation using the Maclaurin series. And just a reminder,
this one up here, this was approximately
cosine of x. And you'll get closer and
closer to cosine of x. I'm not rigorously
showing you how close, in that it's definitely
the exact same thing as cosine of x, but you get closer
and closer and closer to cosine of x as you
keep adding terms here. And if you go to
infinity, you're going to be pretty
much at cosine of x. Now let's do the same
thing for sine of x. So I'll pick a new color. This green should be nice. So this is our new p of x. So this is approximately
going to be sine of x, as we add
more and more terms. And so the first term here, f
of 0, that's just going to be 0. So we're not even going
to need to include that. The next term is
going to be f prime of 0, which is 1, times x. So it's going to be x. Then the next term is f
prime, the second derivative at 0, which we see here is 0. Let me scroll down a little bit. It is 0. So we won't have
the second term. This third term right
here, the third derivative of sine of x evaluated
at 0, is negative 1. So we're now going
to have a negative 1. Let me scroll down
so you can see this. Negative 1-- this is
negative 1 in this case-- times x to the third
over 3 factorial. And then the next
term is going to be 0, because that's the
fourth derivative. The fourth derivative evaluated
at 0 is the next coefficient. We see that that is going to be
0, so it's going to drop off. And what you're
going to see here-- and actually maybe I haven't
done enough terms for you, for you to feel good about this. Let me do one more
term right over here. Just so it becomes clear. f of the fifth
derivative of x is going to be cosine of x again. The fifth derivative-- we'll
do it in that same color, just so it's consistent-- the
fifth derivative evaluated at 0 is going to be 1. So the fourth derivative
evaluated at 0 is 0, then you go to the fifth
derivative evaluated at 0, it's going to be positive 1. And if I kept doing this,
it would be positive 1-- I have to write the 1
as the coefficient-- times x to the fifth over 5 factorial. So there's something
interesting going on here. For cosine of x, I had 1,
essentially 1 times x to the 0. Then I don't have x
to the first power. I don't have x to the
odd powers, actually. And then I just essentially have
x to all of the even powers. And whatever power it is, I'm
dividing it by that factorial. And then the sines
keep switching. I shouldn't say this is an even
power, because 0 really isn't. Well, I guess you can
view it as an even number, because-- well I won't
go into all of that. But it's essentially 0, 2,
4, 6, so on and so forth. So this is
interesting, especially when you compare to this. This is all of the odd powers. This is x to the first
over 1 factorial. I didn't write it here. This is x to the
third over 3 factorial plus x to the fifth
over 5 factorial. Yeah, 0 would be an even number. Anyway, my brain is in a
different place right now. And you could keep going. If we kept this process
up, you would then keep switching sines. X to the seventh over
7 factorial plus x to the ninth over 9 factorial. So there's something
interesting here. You once again see this
kind of complimentary nature between sine and cosine here. You see almost
this-- they're kind of filling each
other's gaps over here. Cosine of x is all
of the even powers of x divided by that
power's factorial. Sine of x, when you take its
polynomial representation, is all of the odd powers of
x divided by its factorial, and you switch sines. In the next video,
I'll do e to the x. And what's really
fascinating is that e to the x starts to look like
a little bit of a combination here, but not quite. And you really do
get the combination when you involve
imaginary numbers. And that's when it starts to
get really, really mind blowing.