TITLE: Finding the tenth derivative of $f(x) = e^x\sin x$ at $x=0$
QUESTION [15 upvotes]: I came across this Question where I have to find $$f^{(10)}$$ for the following function at $x = 0$
$$f(x) = e^x\sin x$$
I tried differentiating a few times to get a pattern but didn’t get one, can someone provide the solution.

REPLY [2 votes]: Using recurrence relation:
$$\begin{align}f^{(0)}=&e^x\sin x\\
f^{(1)}=&e^x\sin x+e^x\cos x=f^{(0)}+e^x\cos x\\
f^{(2)}=&f^{(1)}+\color{red}{e^x\cos x}-e^x\sin x=f^{(1)}+\color{red}{f^{(1)}-f^{(0)}}-f^{(0)}\\
\color{blue}{f^{(n)}=}&\color{blue}{2f^{(n-1)}-2f^{(n-2)}, f^{(0)}(0)=0, f^{(1)}(0)=1} \Rightarrow \\
f^{(n)}=&\frac12i\left[(1-i)^n-(1+i)^n\right] \Rightarrow \\
f^{(10)}(0)=&\frac12i[(1-i)^{10}-(1+i)^{10}]=\\
=&-\frac12i\left[{10\choose 1}i+{10\choose 3}i^3+{10\choose 5}i^5+{10\choose 7}i^7+{10\choose 9}i^9\right]=\\
=&{10\choose 1}-{10\choose 3}+{10\choose 5}-{10\choose 7}+{10\choose 9}=\\
=&10-120+252-120+10=\\
=&32.\end{align}$$

Addendum: Direct calculation from the recurrence relation above:
$$\color{blue}{f^{(n)}=2\left[f^{(n-1)}-f^{(n-2)}\right], f^{(0)}(0)=0, f^{(1)}(0)=1}\\
\begin{array}{c|c|c|c|c|c|c|c|c}
f^{(0)}&f^{(1)}&f^{(2)}&f^{(3)}&f^{(4)}&f^{(5)}&f^{(6)}&f^{(7)}&f^{(8)}&f^{(9)}&f^{(10)}\\
\hline
0&1&2&2&0&-4&-8&-8&0&16&32\end{array}$$