 In this final video for lecture 45, I wanna compute the Maclaurin series for cosine of x. This is gonna be very similar to the calculation we did for sine. And because of that, we're gonna go through this one a little bit quicker. Some of the details that we took a little bit more time when we developed the Maclaurin series for sine, we're just gonna mimic the basic idea there as well. If we look at derivatives of cosine, well the zero derivative is just the function, it's cosine. If you take the first derivative, you end up with negative sine. When you take the second derivative, you end up with negative cosine. And when you take the third derivative, you'll end up with positive sine. And then at this point, it'll just cycle back towards the original, right? It'll just go through the cycle of four, cycle of four, cycle of four. And therefore, if we plug in the center, f of zero is cosine of zero, that's a one, f prime of zero, that's gonna be negative sine of zero, which is zero. You're gonna get f double prime at zero. You're gonna get negative cosine of zero, which is negative one. And then you're gonna get looking at f triple prime of zero, you end up with zero again, sine of zero. So you see the same numbers, one zero, negative one zero, one zero, negative one zero. They show up in a slightly different order than sines, but the Maclaurin series we can then compute from it, n equals zero to infinity. We're gonna get the nth derivative, evaluated at zero over n factorial times x to the n in expanded form. What you can expect is the following. You're gonna get one over zero factorial plus zero over one factorial times x, minus one over two factorial times x squared plus one, well, zero actually, zero over three factorial times x cubed. Next, you would get a one over four factorial x to the fourth plus zero over five factorial x to the fifth minus one over six factorial x to the sixth plus zero over seven factorial x to the seventh. And that's probably enough there that we see the pattern repeats itself. Notice that we do have actually two complete cycles here because this thing just repeats itself every four, every four times, right? Much like sine, there's a bunch of zeros that show up here. The zeros, which we can cancel out, they happen for the odd positions. And it's the even positions that seem to survive. Right in the beginning, you get one over zero factorial minus one over two factorial x squared plus one over four factorial x to the fourth minus one over six factorial x to the sixth plus one over eight factorial x to the eighth minus one over 10 factorial x to the 10th. And again, this pattern will repeat itself over and over and over again. And so in simplified form, we want just a compact formula that can describe all of this. We get n equals zero to infinity. Some things to observe is we only have even powers of x. So we're gonna get x to the two n. When n starts at zero, you get zero and it's one, you get two, when it's two, you get four, when it's three, you get six, et cetera. The denominator is just the factorial of that same exponent, two to the n. So you get a two to the n factorial. Do make sure you put parentheses around the two to the n because if you write two in factorial, does that mean like you take, you go from one, two, three, four, five up to two n? Or is that just two times in factorial? It can be a little bit confusing there. And then we also notice that this is an alternating sequence, it goes positive, negative, positive, negative. And so because of that, we need to have an alternating factor, negative one to the n. And this now gives us the Maclaurin series in our word for cosine of x. Now some things to mention about this, if we were to go through a ratio test type argument like we did with sine, you would also discover that the radius of convergence would be infinity. I will refer you to the previous video. We did this for sine to see how that calculation works. It's strikingly the same thing there. And then another thing I wanna mention is that there's only even powers here, right? There's only even powers of x, which is kinda curious because cosine is in fact an even function. If you take cosine of negative x, this is just equal to cosine of x. The negative sign disappears. This is the same idea if you do this for an even monomial, negative x squared is the same thing as x squared. For even monomials that negative signs vanish, cosine has the same problem and we call it even as well. And it's actually not a coincidence that the Maclaurin series of cosine involves only even powers. This actually is kind of the justification why we call symmetry with respect to the y-axis as even. And so that brings us to the end of lecture 45, this introduction to Taylor series and Maclaurin series. By Taylor's formula, we've now discovered how to compute the Taylor series for a function, right? That is if a function has a power series representation, this is what it has to look like. But we haven't yet actually established that cosine is equal to this power series, our sine, our e to the x are equal to their power series. In lecture 46, we'll introduce Taylor's inequality and actually use that as a tool to prove that these functions we've discussed so far are in fact equal to their power series representation. That is, we'll prove that these functions are equal to their Taylor series. And we'll see that in the next video.