I have some doubts about the Taylor series expansion of $\sin x e^x$.
My first attempt resulted in:
$$x+(2x^2/2)+(2x^3/6)-(4x^5/120)$$
If someone could tell me if the Taylor expansion is correct, I would be really grateful.
I have some doubts about the Taylor series expansion of $\sin x e^x$.
My first attempt resulted in:
$$x+(2x^2/2)+(2x^3/6)-(4x^5/120)$$
If someone could tell me if the Taylor expansion is correct, I would be really grateful.
$f(x)=e^x\sin x$ is the imaginary part of $e^xe^{ix}=e^{(1+i)x}$. Now $$e^{(1+i)x}=\sum_{n=0}^\infty\frac{(1+i)^nx^n}{n!}$$ and so $$f(x)=\sum_{n=0}^\infty a_n\frac{x^n}{n!}$$ where $a_n$ is the imaginary part of $(1+i)^n$. Now $(1+i)^2=2i$ and $(1+i)^4=-4$. Therefore $a_{n+4}=-4a_n$. So $a_{4m}=(-5)^ma_0=0$, $a_{4m+1}=(-4)^ma_1=(-4)^m$, $a_{4m+2}=(-4)^ma_2=2(-4)^m$ and $a_{4m+3}=(-4)^ma_3=2(-4)^m$. Alternatively, $$f(x)=\sum_{n=0}^\infty 2^{n/2}\sin\left(\frac{n\pi}4\right)\frac{x^n}{n!}.$$
HINT: I assume that you are asking for the Taylor series of $f(x):=\sin(x)e^x$ around zero. Because $\sin$ and $\exp$ are both analytic functions who Taylor series around zero have infinite radius of convergence then
$$\mathcal T(\sin,0)(x)=\sin(x)=\sum_{k=0}^\infty (-1)^k\frac{x^{2k+1}}{(2k+1)!}\quad\text{and}\quad\mathcal T(e^x,0)=e^x=\sum_{k=0}^\infty\frac{x^k}{k!},\quad x\in\Bbb C$$
$$\mathcal T(f,0)(x)=f(x)=\left(\sum_{k=0}^\infty (-1)^k\frac{x^{2k+1}}{(2k+1)!}\right)\left(\sum_{k=0}^\infty\frac{x^k}{k!}\right)=\sum_{k=0}^\infty a_k x^k,\quad x\in\Bbb C$$
where $a_k:=\sum_{j=0}^kb_jc_{k-j}$ with $$b_j=[x^j]\sum_{k=0}^\infty (-1)^k\frac{x^{2k+1}}{(2k+1)!}\quad\text{ and }\quad c_{k-j}:=[x^{k-j}]\sum_{h=0}^\infty\frac{x^h}{h!}$$
and $\mathcal T(f,a)$ means the Taylor series of $f$ around $a$. That is: if the functions are analytic the Cauchy product of Taylor series (around the same point) with radius of convergence $\rho_1$ and $\rho_2$ is the Taylor series of the product, with radius of convergence $\rho_3\ge\min\{\rho_1,\rho_2\}$.
Because $b_j=0$ when $j$ is even then
$$a_0=0,\quad a_1=b_1c_0=1,\quad a_2=b_1c_1=1,\quad a_3=b_1c_2+b_3c_0=1/2-1/6=2/6$$
and so on. With a bit of algebra we can see that
$$a_k=\frac1{k!}\sum_{j=0}^{\lfloor\frac{n-1}2\rfloor}(-1)^j\binom{k}{2j+1}$$
You have
$f (x)= \sin (x) e^x$
$f' (x)= \cos (x) e^x + \sin (x) e^x$
$f'' (x)= 2 \cos (x) e^x $
$f''' (x)= - 2 \sin (x) e^x + 2 \cos (x) e^x$
$f'''' (x)= - 4 \sin (x) e^x $
$f''''' (x)= - 4 \cos (x) e^x - 4 \sin (x) e^x $
and
$f = f(0) + f'(0) x + f''(0) x^2/2 + f'''(0) x^3/6 + f''''(0) x^4/24 + f'''''(0) x^5/120 + ...= 0 + x + x^2 + x^3/3 + 0 - x^5/30 + ...$
It seems correct!
\begin{eqnarray} (\sin x) e^x &=& {1 \over 2i} (e^{(1+i)x} - e^{(1-i)x}) \\ &=& \sum_k { ((1+i)^k - \overline{(1+i)^k} ) \over 2 i} {x^k \over k!} \\ &=& \sum_k \operatorname{im} (1+i)^k {x^k \over k!} \\ &=& \sum_k {\sqrt{2^k} \over k!} \sin ({k\pi \over 4}) x^k \end{eqnarray} The later follows from $1+i = \sqrt{2} e^{i {\pi \over 4}}$.
This holds for complex $x$ as well, of course.
The first four terms are $a_0 = 0, a_1=1, a_2 =1 , a_3 = {1 \over 3}$.
Since
$\begin{array}\\ (fg)^{(n)} &=\sum_{k=0}^n \binom{n}{k} (f)^{(k)}(g)^{(n-k)},\\ (fg)(x) &=\sum_{n=0}^{\infty}\dfrac{(fg)^{(n)}(0)x^n}{n!}\\ &=\sum_{n=0}^{\infty}\frac1{n!}(fg)^{(n)}(0)x^n\\ &=\sum_{n=0}^{\infty}\frac1{n!}x^n\sum_{k=0}^n \binom{n}{k} (f)^{(k)}(0)(g)^{(n-k)}(0)\\ \end{array} $
If $g(x) = e^x$, $g^{(n)}(x) = e^x$ so $g^{(n)}(0) = 1$.
Therefore $(fe^x)(x) =\sum_{n=0}^{\infty}\frac1{n!}x^n\sum_{k=0}^n \binom{n}{k} (f)^{(k)}(0) $.
If $f(x) =\sin(x)$, for $n = 0, 1, 2, 3$ we have, repeating with period $4$, $f^{(n)}(x) =\sin(x), \cos(x), -\sin(x), -\cos(x) $ so $f^{(n)}(0) =0, 1, 0, -1 $.
Therefore $(\sin(x)e^x)(x) =\sum_{n=0}^{\infty}\frac1{n!}x^n\sum_{k=0}^n \binom{n}{k} [0, 1, 0, -1] $ so that, using the dot product notation, $\sum_{k=0}^n \binom{n}{k} [0, 1, 0, -1] =\\ (0)\cdot (1) =0, \\ (0, 1)\cdot (1, 1)= 1,\\ (0, 1, 0)\cdot (1, 2, 1)= 2,\\ (0, 1, 0, -1)\cdot (1, 3, 3, 1) = 2,\\ (0, 1, 0, -1, 0)\cdot (1, 4, 6, 4, 1) = 0,\\ (0, 1, 0, -1, 0, 1)\cdot (1, 5, 10, 10, 5, 1)= -4,\\ $
so the coefficients are $0, 1, 2/2=1, 2/6 = 1/3, 0, -4/120 = -1/30 $.
The first few terms of the power series are therefore $\sin(x)e^x =x+x^2+\frac13 x^3-\frac1{30}x^5 $.
This is confirmed by Wolfy.
More generally, using umbral notation, the product of two exponential generating functions (e.g.fs) $f(x)=e^{a.x}$ and $g(x)=e^{b.x}$, or two formal Taylor series, is the e.g.f.
$$h(x) = f(x)g(x) = e^{a.x}e^{b.x}=e^{(a.+b.)x}=e^{c.x}$$
where
$$c_n=(c.)^n=(a.+b.)^n=\sum_{k=0}^n \; \binom{n}{k} a_k b_{n-k} \; .$$
In your particular case, we can choose $a_n=1$ for all $n $ and $b_n = sin (\pi n/2). $
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} \left.\totald[n]{\bracks{\expo{x}\sin\pars{x}}}{x}\right\vert_{\ x\ =\ 0} & = \left.\totald[n]{}{x}\sum_{k = 0}^{n}{n \choose k} \totald[n - k]{\expo{x}}{x}\,\totald[k]{\sin\pars{x}}{x}\right\vert_{\ x\ =\ 0} = \sum_{k = 0}^{n}{n \choose 2k + 1}\pars{-1}^{k} \\[5mm] & = {1 \over \ic}\sum_{k = 0}^{n}{n \choose 2k + 1}\ic^{2k + 1} = {1 \over \ic}\sum_{k = 0}^{n}{n \choose k}\ic^{k}\,{1 - \pars{-1}^{k} \over 2} \\[5mm] & = {1 \over 2\ic}\bracks{\sum_{k = 0}^{n}{n \choose k}\ic^{k} - \sum_{k = 0}^{n}{n \choose k}\pars{-\ic}^{k}} = \Im\sum_{k = 0}^{n}{n \choose k}\ic^{k} = \Im\pars{1 + \ic}^{n} \\[5mm] & = \Im\pars{2^{n/2}\expo{\ic n\pi/4}} = 2^{n/2}\sin\pars{n\pi \over 4} \end{align}
Then,
$$ \bbx{\expo{x}\sin\pars{x} = \sum_{n = 0}^{\infty}{2^{n/2}\sin\pars{n\pi/4} \over n!}\,x^{n}} $$