Finding the $n$-th derivative of $f(x) =e^x \sin x$, solving the recurrence relation I am trying to find a closed solution for the nth derivative of the function:
$f(x) = e^x \sin x$
So far I have been able to obtain the derivative as:
$f^{(n)}(x) = e^x S_n \sin x + e^x C_n \cos x$
The sequences S and C are defined as below:
$S_n = S_{n-1} - C_{n-1}$
$C_n = S_{n-1} + C_{n-1}$
$S_0 = 1$,
$C_0 = 0$
I have been able to further simplify this by combining the two equations and obtaining:
$C_n = 2S_{n-2}$
$S_n = S_{n-1} - 2 S_{n-3}$
However, I have no idea what to do now. Can anyone help me find the closed form solution?

\begin{align}
\left( \begin{array}{r} S_n\\C_n\\ \end{array} \right) &=
\left( \begin{array}{rr}
1 &-1\\
1 &1\\
\end{array}
\right)
\left(\begin{array}{c} S_{n-1}\\C_{n-1}\\ \end{array} \right)\\
&=\left( \begin{array}{rr}
1 &-1\\
1 &1\\
\end{array}
\right)^n
\left(\begin{array}{c} S_{0}\\C_{0}\\ \end{array} \right)
\end{align}
Approach 1: Compute eigen-decomposition of the matrix and continue.
Approach 2: Eigenvalues are $(1+i)$ and $(1-i)$. Therefore, $S_n$ must be of the form $A(1+i)^n+B(1-i)^n$. Now, use values of $S_0$ and $S_1$ to compute $A$ and $B$. $A=B=1/2$.
After further simplification, we get
$$S_n = \sqrt{2^n} \cos \frac{n\pi}{4}, C_n = \sqrt{2^n} \sin \frac{n\pi}{4}$$
