If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Calculus, all content (2017 edition)

### Course: Calculus, all content (2017 edition)>Unit 7

Lesson 14: Maclaurin series of sin(x), cos(x), and eˣ

# Maclaurin series of cos(x)

Approximating cos(x) with a Maclaurin series (which is like a Taylor polynomial centered at x=0 with infinitely many terms). It turns out that this series is exactly the same as the function itself! Created by Sal Khan.

## Want to join the conversation?

• I could understand the steps, end result, but a question as to how some function determined at 0 is valid over the full range. What I feel is since cosine is periodic function this holds true. Someone correct me if I am wrong. • Two points.
1. If you look at the pattern of your derivatives, you'll see that after 4 derivatives, it goes back to it's original derivative, which means that it will just continue to repeat this pattern no matter how far you go out.
2. It then has to do with the series representation. If you look at the series representation, you'll see that it's E ((-1)^k)*x^2k)/(2k!). This is for all k's. You'll notice that the x is just x^2k. If it were (x^2k)-3, then it would be centered at 3. The formula for "power" series is E an(x-c)^n. If there is no "c" in the series representation, then the function is centered at 0.

• So... the Taylor Series is a way to represent a function? :S •  With Taylor and Maclaurin series you can approximate a function with a polynomial. This is useful because you can turn a complicated function (defined by a limit, for example) into simple multiplication and exponentiation of numbers. That's how your calculator gets the sine and cosine of angles almost immediately: It doesn't have a table of sines and cosines for all possible values, it approximates them using Taylor/Maclaurin series
• This is supposed to approximate the function cos(x). Does it approximate the entire function all the way to infinity, or only near x=0? • There are methods for determining the maximum size of the error produced by an approximation like this, so you can figure out how many terms you need to have in order to get an approximation within the tolerance you desire. Hopefully Sal will cover those in an upcoming video. Also, cos x is periodic, so if you can get within your desired tolerance on, say, the interval from 0 <= x <= 2 pi, then you can just shift over any multiple of 2 pi to get your approximation if your x lies outside that int
• Is it actually proven that the Maclaurin/Taylor-representations of these functions are EQUIVALENT to the corresponding functions if the number of terms in the representation goes to infinity? • Why is -sin(x) the derivative of cos(x)? I mean, where does this information comes from? How can I calculate this?

at
(1 vote) • There are a variety of ways to prove this. I prefer direct computation using the definitions of the sine and cosine functions:
Note that:
``sin x ≡ ½*i*e^(-x*i) - ½*i*e^(x*i)cos x ≡  ½ e^(-x*i) + ½e^(x*i)``

Thus:
d/dx cos x = d/dx { ½ e^(-x*i) + ½e^(x*i)}
d/dx cos x = d/dx {½ e^(-x*i)} + d/dx {½e^(x*i)}
d/dx cos x = ½ d/dx e^(-x*i) + ½ d/dx e^(x*i)
d/dx cos x = ½ e^(-x*i) d/dx(-x*i) + ½ e^(x*i) d/dx(x*i)
d/dx cos x = ½ e^(-x*i)(-i) + ½ e^(x*i)(i)
d/dx cos x = − [½ i e^(-x*i) - ½ i e^(x*i)]
d/dx cos x = − sin x
• At around he states that the steps work whether you are using radians or degrees, but it doesn't seem reasonable that the polynomial will give you the same answer whether you use x = pi/2 or x=90. Is there some reason that you makes this approximation work specifically with radians? • How is Maclaurin and Taylor Series related to Complex Number's Polar Form, given that they share the same playlist?

I'm honestly not getting what the relation between these two might be. • Why exactly does taking derivatives at a point give you the function of the polynomial? I don't get the part of how the 3rd,4th,5th etc. derivative will attempt to match the slope at any point other than at zero, is it because the slope of the slope at zero approximates the points around it? • Here's the basic idea: Hm, I wonder if I can make a polynomial that has all of the same derivatives at a point as a particular function? Look at that, now we can.
And here's a bonus: it even looks like the function! In fact, for certain functions, I can "tailor" (pun intended) an infinite polynomial that exactly equals the function at all values of x just by this process of creating a polynomial with the same derivatives as my function.
• I transformed that last polynomial equation ( produced after the Mac Lauren series was applied ) and transformed it into a power series summation ( like Sal taught us on his last playlist), and I got :

Summation from n=0 to infinity of - ( x^2 / 2n! )^n , which is 1 / [ 1 + ( x^2/2n! )] with radius of convergence x < sqrt( 2n! ).

So my question is, is that correct? Can we represent cos(x) three different ways (MacLaurin polynomial, power series(sigma notation), power series summation after applying the formula 1 / 1-r ) ??  