# Prove that the series $\sum_{n=0}^\infty \frac{(-1)^n \cdot x^{2n}}{(2n)!}$ represents $\cos x$ for all values of $x$

guys.

The question is as stated in the title: prove that the series $\sum_{n=0}^\infty \frac{(-1)^n \cdot x^{2n}}{(2n)!}$ represents $\cos x$ for all values of $x$

My doubt is quite theoretical:

I did this exercise the following way:

$\cos x = \frac{d}{dx} \sin x \therefore \cos x = \frac{d}{dx} \sum_{n=0}^\infty \frac{(-1)^n \cdot x^{2n+1}}{(2n+1)!}$

My doubt is right here. According to the book, when we take the derivative here we get $\sum_{n=0}^\infty \frac{(-1)^n \cdot x^{2n}}{(2n)!}$, but shouldn't we get $\sum_{n=1}^\infty \frac{(-1)^n \cdot x^{2n}}{(2n)!}$ ?

When my teacher was teaching how to differentiate series, he said that when you did, you always had to add one to the index.

Am I missing something here?

Pedro.

• I have no idea what your teacher meant. The book's answer is right, as you can check by doing the differentiation. Oct 21, 2015 at 2:44
• Say you had the following series: $\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n, |x| < 1$. If we take the derivative on both sides: $\frac{1}{(1-x)^2} = \sum_{n=1}^\infty n \cdot x^{n-1}, |x| < 1$ That increase on when the $n$ starts. Is it wrong? Oct 21, 2015 at 2:48
• The reason is wrong (and very confusing) although in that example the answer is right. The best way to write the derivative, for a first step, is$$\sum_{n=0}^\infty nx^{n-1}\ .$$You should be able to see why this is the same as your answer in this example, and why it is **not** the same in the example involving $\sin$ and $\cos$. Oct 21, 2015 at 2:50
• If your teacher is saying you always add $1$ to the starting index, that is just plain wrong. Oct 21, 2015 at 2:54

That "rule" is deceptive; I will use an example to demystify it.

Note that formally we have $D\sum_{k=1}^{n}x^{k} = D(x + x^{2} + \cdots + x^{n}) = 1 + 2x + \cdots + nx^{n-1} = \sum_{k=1}^{n}kx^{k-1};$ no need to apply the rule here. But $D\sum_{k=0}^{n}x^{k} = D(1 + x + \cdots + x^{n}) = 1 + \cdots + nx^{n-1} = \sum_{k=1}^{n}kx^{k-1}$; it does appear like "we add one to the index"!

Can you see now a why?

• I can. Thanks, mate! Oct 21, 2015 at 2:59

I think what your teacher is reffering to is that the derivative of a constant is zero, and if the first term of the series is a constant it follows that the first term of the derivative of the series is 0, so you can just start the series at $n = 1$. What your teacher said is correct IF the first term of the series is a constant. For example if you take the derivative of the cosine series then it is ok. The first term of the sine series is $x$ which is not a constant with respect to $x$.

Expand $\sin(x)$ using Taylor series as follows:

$$\sin(x)=\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}x^{2k+1}=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\ldots$$

Given the above information you can write $\cos(x)$ as follows:

\begin{align} \cos(x)&=\frac{\mathrm d}{\mathrm dx}\sin(x)\\ &=\frac{\mathrm d}{\mathrm dx}\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)!}x^{2k+1}\\ &=\frac{\mathrm d}{\mathrm dx}\left(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\ldots\right)\\ &=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\ldots\\ &=\sum_{k=0}^\infty\frac{(-1)^kx^{2k}}{(2k)!} \end{align}