Why do I have to shift the index of an infinite series after differentiation

sequences-and-series

When represented in a Taylor expansion, $\sin(x)$ turns to be a infinite series. I can differentiate $\sin(x)$ infinite times, and evaluate it at some point.

But when I differentiate the series corresponding to it, index shifting is needed, but I wonder why.

$sin(x)=\sum_{i=0}^\infty \frac{(-1)^n x^(2x+1) }{(2n+1)!}$ = x-x³/3…..

$\frac{d²}{dx²}sin(x)=\sum_{i=0}^\infty \frac{(-1)^n x^(2x-1) }{(2n-1)!}$=$\frac{1}{x(-1!)}-x²/2 …..$

Best Answer

Let's look at the series first.

$$\sin(x)=\sum \limits_{k=0}^{\infty} (-1)^{k} \frac{x^{2k+1}}{(2k+1)!}$$

For each time you differentiate, you need to substract one from the exponent of $x$, i.e.

$$\frac{\mathrm{d}x^k}{\mathrm{d}x}=k\cdot x^{k-1}$$

However note, that we can not abbreviate sequential differentiation in general as

$$\frac{\mathrm{d^n}x^k}{\mathrm{d}x^n}=\frac{k!}{(k-n)!}x^{k-n}$$

An easy counter example would be

$$\frac{\mathrm{d^3}x^2}{\mathrm{d}x^3}=2\frac{\mathrm{d^2}x}{\mathrm{d}x^2}=2\frac{\mathrm{d}}{\mathrm{d}x}1 = 0$$

which is obviously different from $x^{2-3}=x^{-1}$. So this only holds if $n \leq k$.

To prevent this from happening in our infinite series, we need to shift the index accordingly, so we don't get these terms, that would end up zero in between.

$$\frac{\mathrm{d}^2}{\mathrm{d}x^2}\sin(x)=\sum \limits_{k=1}^{\infty} (-1)^{k} \frac{x^{2k+1-2}}{(2k+1-2)!}$$

If our index would not start at $k=1$, then our first term would be $x^{2\cdot 0 + 1 - 2} = x^{-1}$. Whoops!

So that is why there is re-indexing. However, we can re-index it back to zero, shifting the index in the exponent and in the factorial in the other direction.

So we almost end up with our initial series

$$\frac{\mathrm{d}^2}{\mathrm{d}x^2}\sin(x)=-\sin(x)=\sum \limits_{k=0}^{\infty} (-1)^{k+1} \frac{x^{2k+1}}{(2k+1)!}$$