$n$-derivative of function $f(x)=e^x \sin x$ at $x=0$

Observe \begin{align} f(x)=e^x\sin x = \operatorname{Im} [e^{(1+i)x}]. \end{align} Using Taylor series for the exponential function, we have \begin{align} \operatorname{Im}e^{(1+i)x} = \operatorname{Im} \sum^\infty_{n=0}\frac{(1+i)^nx^n}{n!}. \end{align} Thus, it follows \begin{align} f^{(n)}(0) = \operatorname{Im}\ (1+i)^n = \operatorname{Im} (\sqrt{2}e^{i\frac{\pi}{4}})^n. \end{align} It should be elementary from here on.


You have already found a pattern:

$f^{(1)}(x) = e^x(\sin{x} + \cos{x}) $

$f^{(2)}(x) = 2 e^x \cos{x}$

$f^{(3)}(x) = 2 e^x (\cos{x} - \sin{x})$

$f^{(4)}(x) = -4 e^x \sin{x}$

$f^{(5)}(x) = -4 e^x (\sin{x} + \cos{x})$

This means that $f^{(5)}(x) = -4 f^{(1)}(x)$, $f^{(6)}(x) = -4 f^{(2)}(x)$ and so on.

You can now easily find $f^{(4i)}(x)$, $f^{(4i+1)}(x)$, $f^{(4i+2)}(x)$ and $f^{(4i+3)}(x)$ for all $i \geq 0$ – use induction in $i$. Moreover, since $e^0 = 1$ and $\sin 0 = 0$ and $\cos 0 = 1$, you can now easily find the values of these derivatives at $0$.


I think the most appropriate approach is already given by @JackyChong.

Slightly more elaborated we have \begin{align*} \color{blue}{\left.\frac{d^n}{dx^n}\left(e^x\sin x\right)\right|_{x=0}} &=\left.\frac{d^n}{dx^n}\left(\Im e^{(1+i)x}\right)\right|_{x=0}\\ &=\Im \left.\left(\frac{d^n}{dx^n}e^{(1+i)x}\right)\right|_{x=0}\\ &=\Im\left.\left((1+i)^ne^{(1+i)x}\right)\right|_{x=0}\\ &=\Im(1+i)^n\\ &=\Im\left(\sqrt{2}\left(\cos \frac{\pi}{4}+i\sin\frac{\pi}{4}\right)^n\right)\\ &=2^{\frac{n}{2}}\Im\left(\cos\frac{n\pi}{4}+i\sin\frac{n\pi}{4}\right)\\ &\color{blue}{=2^{\frac{n}{2}}\sin\frac{n\pi}{4}} \end{align*}