# Compute Taylor series at $x = 0$ of $e^{1-\cos{x}}$ in summation notation?

I am doing an exercise from textbook which asks to compute Taylor series at $$x = 0$$ of $$e^{1-\cos{x}}$$ in summation notation?

My intuition was to expand function $$e^x = \sum^{\infty}_{k=0} \frac{x^k}{k!}$$ and $$\cos{x} = \sum^{\infty}_{k=0}(-1)^k\frac{x^{2k}}{(2k)!}$$ at $${x = 0}$$, so I got the result: $$\sum^{\infty}_{k=0}\frac{1 - \sum^{\infty}_{t=0}(-1)^t\frac{x^{2t}}{(2t)!}}{k!}$$.

The result is a form of 2 summations, thus I am not too sure whether it is correct. Could anyone please help to verify or give some comments?

Thanks for VVejalla's comment, the double summation result I got should be: $$\sum^{\infty}_{k=0}\frac{(1 - \sum^{\infty}_{t=0}(-1)^t\frac{x^{2t}}{(2t)!})^k}{k!}$$

• What you have is not a power series, let alone a Taylor series, because it is not of the form $\sum_n a_nx^n$ May 12 '20 at 3:00
• It should be $$e^{1-\cos(x)}=\sum^{\infty}_{k=0}\frac{(1-\cos(x))^k}{k!}=\sum^{\infty}_{k=0}\frac{(1-\sum^{\infty}_{n=0}(-1)^n\frac{x^{2n}}{(2n)!})^k}{k!}$$ but even then, it is not a power series in $x$ May 12 '20 at 3:02
• By brute force you can get a few terms. This might give you an idea what the general term looks like. May 12 '20 at 3:24
• Except for sign, the coefficient of $x^{2n}$ is $a(n)/(2n)!$ where a(n) is OEIS sequence A260884. There doesn't seem to be a closed form. May 12 '20 at 4:02
• @NinadMunshi Good point, The expression I wrote down is not the summation of polynomial terms and not a Taylor series at all. May 13 '20 at 4:44

## 5 Answers

Let $$f(x) =e^{1-\cos x}$$ so that $$f'(x) =f(x) \sin x\tag{1}$$ Let us assume that $$f(x)$$ can be represented as a power series in terms of even powers of $$x$$ (because $$f$$ is even) so that $$f(x) =\sum_{n=0}^{\infty} a_nx^{2n}\tag{2}$$ Differentiating term by term we get $$f'(x)=\sum_{n=1}^{\infty} 2na_nx^{2n-1}=\sum_{n=0}^{\infty} 2(n+1)a_{n+1}x^{2n+1}$$ Putting the series for $$f'$$ and $$f$$ in $$(1)$$ we get $$\sum_{n=0}^{\infty} 2(n+1)a_{n+1}x^{2n+1}=\sum_{n=0}^{\infty} a_nx^{2n}\cdot\sum_{n=0}^{\infty} (-1)^n\frac{x^{2n+1}}{(2n+1)!}$$ Cancelling $$x$$ from both sides we get $$\sum_{n=0}^{\infty} 2(n+1)a_{n+1}x^{2n}=\sum_{n=0}^{\infty} a_nx^{2n}\cdot\sum_{n=0}^{\infty} (-1)^n\frac{x^{2n}}{(2n+1)!}$$ Comparing coefficients of $$x^{2n}$$ on both sides we get $$2(n+1)a_{n+1}=\sum_{k=0}^{n}(-1)^{n-k}\frac{a_k}{(2n-2k+1)!}$$ Starting with $$a_0=1$$ (as $$f(0)=1$$) we get $$2a_1=\frac{a_0}{1!}$$ so that $$a_1=1/2$$. Similarly $$4a_2=-\frac{a_0}{3!}+\frac{a_1}{1!}$$ ie $$a_2=1/12$$ and $$6a_3=\frac{a_0}{5!}-\frac{a_1}{3!}+a_2$$ ie $$a_3=1/720$$.

Thus $$f(x) =1+\frac{x^2}{2}+\frac{x^4}{12}+\frac{x^6}{720}+\dots$$

• why do you assume only even power terms in $f(x) = \sum^{\infty}_{n=0} a_n x^{2n}$ ? May 14 '20 at 2:41
• @user2262504: because $f$ is even function. You can prove that if $f$ is even function then the coefficients of odd powers of $x$ in its Taylor series around $0$ are zero. This follows from $f(x) =f(-x)$. May 14 '20 at 5:55
• Thanks for the answer to the earlier question, another question about $\sum^{\infty}_{n=0}2(n+1)a_{n+1}x^{2n} = \sum^{\infty}_{n=0}a_nx^{2n} . \sum^{\infty}_{n=0}(-1)^n\frac{x^{2n}}{(2n+1)!}$, how do you get this, could you please show more detailed steps? May 14 '20 at 8:52
• @user2262504: Differentiate the series for $f(x)$ to get $$f'(x) =\sum_{n=1}^{\infty} 2na_nx^{2n-1}=\sum_{n=0}^{\infty} 2(n+1)a_{n+1}x^{2n+1}$$ and $$\sin x=\sum_{n=0}^{\infty} (-1)^n\frac{x^{2n+1}}{(2n+1)!}$$ and then from the product we cancel the factor $x$ on both sides. May 14 '20 at 9:10
• @user2262504: I have also updated my answer with details because some people may not read all the comments. May 14 '20 at 9:18

This seems to be quite difficult but I think that I found something which is a least amazing.

Consider the expansion of $$e^{1-\cosh (y)}=\sum_{n=0}^\infty \frac{a_n}{(2n)!} \,y^{2n}$$ The first $$a_n$$'s make the sequence $$\{1,-1,2,-1,-43,254,4157,-70981,-1310398,40933619,1087746617\}$$ which is sequence $$A260884$$ in OEIS. According to the documentation, they are given by $$a_n=\sum _{k=0}^{2 n} \text{BellY}[2 n,k,\left[\text{Range}[2 n] \bmod 2\right]-1]\qquad \text{with} \qquad a_0=1$$

Now, make $$y=i\,x$$ to make $$e^{1-\cosh (y)-1}=e^{1-\cos (x)}$$

• It should not be too hard to find the derivatives of $e^{f(x)}$, no? Your method is probably faster though :)
– lcv
May 12 '20 at 7:21
• An other approach is via obtaining the moments via the cumulants
– lcv
May 12 '20 at 7:23

This is the problem of computing the moments from the cumulants, which is the inverse problem as the one usually encountered.

Consider a (analytic) function $$K(x)$$ with $$K(0)=0$$

\begin{align} M(x) &:=e^{K(x)}=\exp{\sum_{n=1} \kappa_n \frac{x^n}{n!} } \\ &:= \sum_{n=0} \mu_n \frac{x^n}{n!} \end{align}

with $$\mu_0 =1$$. Then one has the following recursion

$$\mu_{n}=\kappa_{n}+\sum_{m=1}^{n-1}\left(\begin{array}{c} n-1\\ m-1 \end{array}\right)\kappa_{m}\mu_{n-m}$$

Indeed the identity holds with greater generality at the level of formal power series. In our case $$K(x) = 1- \cos(x)$$ so $$\kappa_{2n} = -(-1)^n$$ and $$\kappa_{2n+1}=0$$. Of course one also has that $$\mu_{2n+1}=0$$.

With the above formula one gets, for the first few non-zero coefficients

$$\mu_n = (1, 2, 1, -43, -254, 4157, 70981, -1310398, -40933619, 1087746617,\ldots)$$

which agrees with Claude Leibovici's results (but here we have the correct signs).

You can express the general coefficient in terms of the complete Bell polynomials $$B_n$$ in the following manner: \begin{align*} \exp (1 - \cos x) & = \exp \left( {\sum\limits_{n = 1}^\infty {( - 1)^{n + 1} \frac{{x^{2n} }}{{(2n)!}}} } \right) \\ &= \sum\limits_{n = 0}^\infty {\frac{1}{{n!}}B_n \!\left( {\frac{{1!}}{{2!}}, \ldots ,( - 1)^{n + 1} \frac{{n!}}{{(2n)!}}} \right)x^{2n} } . \end{align*} An explicit, though somewhat complicated, formula is as follows: $$B_n \!\left( {\frac{{1!}}{{2!}}, \ldots ,( - 1)^{n + 1} \frac{{n!}}{{(2n)!}}} \right) \\ = \sum\limits_{k = 1}^n {\sum\limits_{\substack{ j_1 + j_2 + \cdots + j_{n - k + 1} = k \\ j_1 + 2j_2 + \cdots + (n - k + 1)j_{n - k + 1} = n \\ j_1 ,j_2 , \ldots ,j_{n - k + 1} \in \mathbb{Z}_{ \ge 0} }} {\frac{{( - 1)^{n + k} n!}}{{j_1 !j_2 ! \cdots j_{n - k + 1} !}}\prod\limits_{m = 1}^{n - k + 1} {\frac{1}{{(2m)!^{j_m } }}} } } .$$

• Thanks for providing the answer. I don't know Bell polynomials. Can you provide some links for me to learn Bell polynomials and allow me towards fully understand your answer? May 15 '20 at 3:54
• You may start with the corresponding Wikipedia article: en.wikipedia.org/wiki/Bell_polynomials
– Gary
May 15 '20 at 6:35

The higher order derivatives of $$f(x)=\exp(1-\cos(x))$$ have a nice structure.
\begin{align} f'(x) &= f(x)\sin(x) \nonumber\\ f''(x) &= f'(x)\sin(x) + f(x)\cos(x) \nonumber\\ f^{(3)}(x) &= f''(x)\sin(x) + 2f'\cos(x) - f(x)\sin(x) \nonumber\\ f^{(4)}(x) &= f^{(3)}(x)\sin(x) + 3f''(x)\cos(x) - 3f'(x)\sin x - f(x)\cos(x) \nonumber\\ f^{(5)} &= f^{(4)}\sin + 4f^{(3)}\cos - 6f''\sin - 4f'\cos + f\sin \nonumber\\ \vdots \end{align} All odd-order derivatives are 0 at $$x=0$$. You can see that the coefficients on the right hand side are the binomial coefficients (with periodic signs $$+,+,-,-$$). So the equation for the $$2n$$th order derivative of $$f$$ at 0 is: $$f^{(2n)}(0) = \sum_{i=0}^{n-1}\binom{2n-1}{2i+1} f^{(2n-1-2i)}(0)(-1)^i.$$ The values for $$n=0,1,\dots 10$$ are $$1, 1, 2, 1, -43, -254, 4157, 70981, -1310398, -40933619, 1087746617.$$