Can someone check this for me, please? The exercise is just to find a expression to the nth derivative of $f(x) = e^x \cdot \sin x$. I have done the following:
Write $\sin x = \dfrac{e^{ix} - e^{-ix}}{2i}$, then we have $f(x) = \dfrac{1}{2i} \cdot (e^{(1+i)x} - e^{(1-i)x})$.
Taking the derivatives: $f^{(n)}(x) = \dfrac{1}{2i} \cdot ((1+i)^n e^{(1+i)x} - (1-i)^n e^{(1-i)x})$
Now, I use that: $$ (1+i)^n = {\sqrt{2}}^n \cdot \left(\cos\dfrac{n \pi}{4} + i \sin\dfrac{n \pi}{4}\right) \\(1 - i)^n = \sqrt{2}^n \cdot \left( \cos \dfrac{-n \pi}{4} + i \sin \dfrac{-n \pi}{4} \right)$$
Plugging that mess, I get: $$f^{(n)}(x) = \dfrac{e^x}{2i} \sqrt{2}^n \cdot \left(\left(\cos \dfrac{n \pi}{4} + i \sin \dfrac{n \pi}{4}\right) e^{ix} - \left(\cos \dfrac{-n \pi}{4} + i \sin \dfrac{- n \pi}{4}\right) e^{-ix} \right)$$
But, $e^{ix} = \cos x + i \sin x$, and using Moivre's theorem, that makes: $$f^{(n)}(x) = \dfrac{e^x}{2i} \sqrt{2}^n \cdot \left(\cos \left( x + \frac{n \pi}{4}\right) + i \sin \left( x + \frac{n \pi}{4}\right) - \left(\cos \left( - x - \frac{n \pi}{4}\right) + i \sin \left( -x -\frac{ n \pi}{4}\right)\right)\right)$$
and since $\cos$ is an even function, and $\sin$ is odd, we get: $$f^{(n)}(x) = \dfrac{e^x}{2i} \sqrt{2}^n \cdot 2i \sin \left(x + \dfrac{n \pi}{4}\right)$$
Simplifying, the answer would be $f^{(n)}(x) = e^x \cdot \sqrt{2}^n \cdot \sin\left(x + \dfrac{n \pi}{4}\right)$. I'm almost positive that this is it, but I just want to be sure. Thank you in advance!