# What is the easiest/most efficient way to find the taylor series expansion of $e^{1-cos(x)}$ up to and including degrees of four?

So I have $$e^{1-cos(x)}$$ and want to find the taylor series expansions up to and including the fourth degree in the form of $$c_{0} \frac{x^0}{0!} + c_{1} \frac{x^1}{1!} + c_{2} \frac{x^2}{2!} + c_3 \frac{x^3}{3!} + c_{4} \frac{x^4}{4!} + HOT$$ or just $$1 + c_{1} x^1 + c_{2} x^2 + c_3 x^3 + c_{4} x^4 +HOT$$ at that.

I know of two ways to do this, by substitution in the series summation or by differentiating the original four times. When substituting I am left with cosines in my result which is not sufficient, but differentiating this formula will take a $very$ long time. Is there a pattern in differentiating this function that im missing or is there a way to get rid of the $cos$ when substituting?

I did eventually go for differentiating everything and took me forever, much longer than I think was intended for this assignment, that is why I think I am missing the point. The derivatives to the fourth degree fill an entire page in my noteblock so I wont type it over here but my result was $$1+\frac{x^2}{2}+\frac{x^4}{12}+HOT$$ I have yet to find out if I was correct, but nevertheless I think I should learn an insight here about how to get this answer an easier way. Hopefully someone knows what im missing here. Thanks in advance!

We have $$1-\cos x=\frac{x^2}{2!}-\frac{x^{4}}{4!}+ \text{higher order terms}.$$ Substitute in the power series expansion of $e^t$. The only relevant part will be $1+t+\frac{t^2}{2}$.

• Ah because I only want some orders I can do this. I think this answers my question, thank you. – Leo Jun 3 '13 at 10:59
• I would be surprised if one could find a useful general expression for the coefficient of $x^n$. But computation up to $x^6$ or $x^8$ or a little beyond is not hard by using the above idea. – André Nicolas Jun 3 '13 at 11:03
• Having a quick look on wolfram alpha, the series begins to look quite horrible after the $x^6$ term, so I doubt there is a useful one. – Andrew D Jun 3 '13 at 11:11

I usually find the following "trick" to be quite helpful when dealing with exponential functions; if we suppose that $f(x)$ is your function, then we see that

$$f'(x) = \sin(x)f(x)$$

and then when calculating higher order derivatives, you can substitute back in $f'(x)$, i.e.

$$f''(x) = \cos(x)f(x) + \sin(x)f'(x) = \cos(x)f(x) + \sin^2(x)f(x)$$

so $f''(0) = f(0) = 1$, which is what you would expect.

• Ah yes I did this at the fourth differential, this is a useful trick. Thank you for formalising it for me. – Leo Jun 3 '13 at 10:58