What is wrong with my series expansion of $e^{\cos(x)}$

898 Views Asked by At

Finding the Maclaurin series of $e^{\sin x}$ by comparing coefficients

In this thread, Bernard showed how to find the Maclaurin series of $e^{\sin(x)}$ by differentiating it to give $\cos(x)e^{\sin(x)}$. I try to emulate this method to find the series expansion of $e^{\cos(x)}$. I differentiate it to obtain $-\sin(x)e^{\cos(x)}$.

The series for $-\sin(x)=-x+\dfrac{x^3}{3!}-\dfrac{x^5}{5!}+\dfrac{x^7}{7!}-\dfrac{x^9}{9!}+\dfrac{x^{11}}{11!}-\dfrac{x^{13}}{13!}+O(x^{15})$

If $e^{\cos(x)}$ has a series representation, suppose that it has the form:

$a+bx+cx^2+dx^3+ex^4+fx^5+gx^6+O(x^7)$

Differentiate this series we have:

$-\sin(x)e^{\cos(x)}= 0+b+2cx+3dx^2+4ex^3+5fx^4+6gx^5+7hx^6+8ix^7\tag{1}\label{eq:1}$

Multiply $e^{\cos(x)}$ with $-\sin(x)$, we obtain the series:

$a+(b-a)x+(c-b)x^2+(d-c+\dfrac{a}{6})x^3+(e-d+\dfrac{b}{6})x^4+(f+\dfrac{a}{120}+\dfrac{c}{6})x^5+(g+f+\dfrac{d}{6}-\dfrac{b}{120})x^6+O(x^7)\tag{2}\label{eq:2}$

Equate (\ref{eq:1}) and (\ref{eq:2}), we have:

$b+2cx+3dx^2+4ex^3+5fx^4+6gx^5+7hx^6+8ix^7=a+(b-a)x+(c-b)x^2+(d-c+\dfrac{a}{6})x^3+(e-d+\dfrac{b}{6})x^4+(f+\dfrac{a}{120}+\dfrac{c}{6})x^5+(g+f+\dfrac{d}{6}-\dfrac{b}{120})x^6+O(x^7)$

Two infinite series are equal if all their coefficients are equal to each other:

So equating the coefficients of the series on the left hand side with the right hand side, we have: $a=b$. When $x=0$,$e^{\cos(x)}=e, f(x)=a$ implies $a=e$ and $b=e$

Here is what starts to break down completely:

$b-a=2c$

$c-b=3d$

$d-c+\dfrac{a}{6}=4e$

$e-d+\dfrac{b}{6}=5f$

$f+\dfrac{a}{120}+\dfrac{c}{6}=6g$

$g-f+\dfrac{d}{6}-\dfrac{b}{120}=7h$

From there, I got $c=0$, which is a wrong answer.

Wolfram gives the series representation of $e^{\cos(x)}$ as followed:

$e-\dfrac{ex^2}{2}+\dfrac{ex^4}{6}+\dfrac{31e^6}{720}+...$

Why does this method work for Bernard's answer to $e^{\sin(x)}$ but fail to work for $e^{\cos(x)}$? What did I do wrong?

enter image description here

3

There are 3 best solutions below

0
On

Multiply $e^{\cos x}$ with $-\sin x$ to get $\left(a+bx+cx^2+...\right)\left(-x+\dfrac{x^3}{3!}...\right)=-ax-bx^2...,$

and then set $-ax-bx^2...=b+2cx+3dx^2+...$ to get $b=0, -a=2c, d=0,...$

so $e^{\cos x}=a-\dfrac a2 x^2...$, and from evaluation at $x=0$ note that $a=e$.

1
On

Yes, you group all terms together. Your mistake is you are grouping terms that don't exist along with the terms that do exist.

There is no constant term when you multiply $-x+\frac{x^3}{3!}-\frac{x^5}{5!}+\cdots$ with another MacLaurin series, so your constant term $a$ should not exist. There is only one term in $x$, which is $-ax.$ There is no $bx$ term, because (unlike the expansion of $\cos x$) there is no constant term $1$ in the expansion of $\sin x$.

If you're having trouble keeping track of what terms should be in the product of two series, long multiplication may help:

\begin{eqnarray} -xe^{\cos(x)} &=& -ax&-&bx^2&-&cx^3&-&dx^4&-&ex^5&-&fx^6&-&gx^7&-&hx^8&-\cdots\\ \frac{x^3}{3!}e^{\cos(x)} &=& &&&&\frac a{3!}x^3&+&\frac b{3!}x^4&+&\frac c{3!}x^5&+&\frac d{3!}x^6&+&\frac e{3!}x^7&+&\frac f{3!}x^8&+\cdots\\ -\frac{x^5}{5!}e^{\cos(x)} &=& &&&&&&&-&\frac a{5!}x^5&-&\frac b{5!}x^6&-&\frac c{5!}x^7&-&\frac d{5!}x^8&-\cdots\\ \frac{x^7}{7!}e^{\cos(x)} &=& &&&&&&&&&&&&\frac a{7!}x^7&-&\frac b{7!}x^8&-\cdots\\ \end{eqnarray}

Adding up the columns,

\begin{multline} \left(-x+\frac{x^3}{3!}-\frac{x^5}{5!}+\frac{x^7}{7!}-O(x^{9})\right)e^{\cos(x)} = \\ -ax -bx^2 + \left(\frac a{3!}-c\right)x^3 + \left(\frac b{3!}-d\right)x^4\\ + \left(\frac c{3!}-\frac a{5!}-e\right)x^5 + \left(\frac d{3!}-\frac b{5!}-f\right)x^6\\ + \left(\frac a{7!}-\frac c{5!}+\frac e{e!}-g\right)x^7 + \left(\frac b{7!}-\frac d{5!}+\frac f{e!}-h\right)x^8 + \cdots. \end{multline}

You then get $b=0,$ $2c = -a,$ $3d = -b = 0,$ $4e = \frac a{3!}-c = \frac23a,$ $5f = \frac b{3!}-d = 0,$ $6g = \frac c{3!}-\frac a{5!}-e = -\frac{31}{120}a,$ and so forth.

0
On

For $n\ge1$, by the Faa di Bruno formula and some properties of the partial Bell polynomials, we have \begin{align*} \bigl(\operatorname{e}^{\cos x}\bigr)^{(n)} &=\sum_{k=1}^n \operatorname{e}^{\cos x} B_{n,k}\biggl(-\sin x,-\cos x,\sin x,\cos x,\dotsc, \cos\biggl[x+\frac{(n-k+1)\pi}{2}\biggr]\biggr)\\ &\to \operatorname{e}\sum_{k=1}^n B_{n,k}\biggl(0,-1,0,1,\dotsc, \cos\frac{(n-k+1)\pi}{2}\biggr), \quad x\to0\\ &=\operatorname{e} \biggl(\cos\frac{n\pi}2\biggr) \sum_{k=1}^n \frac{(-1)^k}{k!}\sum_{\ell=0}^k\frac{(-1)^\ell}{2^\ell}\binom{k}{\ell} \sum_{q=0}^\ell\binom{\ell}{q}(2q-\ell)^n. \end{align*} Consequently, we obtain \begin{align*} \operatorname{e}^{\cos x} &=\operatorname{e} +\operatorname{e}\sum_{n=1}^\infty\biggl(\cos\frac{n\pi}2\biggr)\Biggl[\sum_{k=1}^n \frac{(-1)^k}{k!}\sum_{\ell=0}^k\frac{(-1)^\ell}{2^\ell}\binom{k}{\ell} \sum_{q=0}^\ell\binom{\ell}{q}(2q-\ell)^n\Biggr]\frac{x^n}{n!}\\ &=\operatorname{e} +\operatorname{e}\sum_{n=1}^\infty(-1)^n \Biggl[\sum_{k=1}^{2n} \frac{(-1)^k}{k!}\sum_{\ell=0}^k\frac{(-1)^\ell}{2^\ell}\binom{k}{\ell} \sum_{q=0}^\ell\binom{\ell}{q}(2q-\ell)^{2n}\Biggr]\frac{x^{2n}}{(2n)!}. \end{align*}

References

  1. F. Qi, Derivatives of tangent function and tangent numbers, Appl. Math. Comput. 268 (2015), 844--858; available online at https://doi.org/10.1016/j.amc.2015.06.123.
  2. Feng Qi, Da-Wei Niu, Dongkyu Lim, and Yong-Hong Yao, Special values of the Bell polynomials of the second kind for some sequences and functions, Journal of Mathematical Analysis and Applications 491 (2020), no. 2, Paper No. 124382, 31 pages; available online at https://doi.org/10.1016/j.jmaa.2020.124382.