# How do you find the nth derivative of e^x cos x?

Feb 19, 2015

Hello,

Use complex numbers.

1) Write ${e}^{x} \setminus \cos \left(x\right) = {e}^{x} \setminus m a t h \mathfrak{a} k \left\{R e\right\} \left({e}^{i x}\right) = \setminus m a t h \mathfrak{a} k \left\{R e\right\} \left({e}^{\left(1 + i\right) x}\right)$.

2) Calculate $n$-th derivative of ${e}^{\left(1 + i\right) x}$ :

$\setminus \frac{{d}^{n}}{{\mathrm{dx}}^{n}} {e}^{\left(1 + i\right) x} = {\left(1 + i\right)}^{n} {e}^{\left(1 + i\right) x}$.

3) Take the real part :

$\setminus \frac{{d}^{n}}{{\mathrm{dx}}^{n}} {e}^{x} \cos \left(x\right) = \setminus m a t h \mathfrak{a} k \left\{R e\right\} \left({\left(1 + i\right)}^{n} {e}^{\left(1 + i\right) x}\right) = {e}^{x} \setminus m a t h \mathfrak{a} k \left\{R e\right\} \left({\left(1 + i\right)}^{n} {e}^{i x}\right)$.

To simplify that, you have to write $\left(1 + i\right) = \setminus \sqrt{2} {e}^{i \setminus \frac{\setminus \pi}{4}}$ (trigonometric form of $1 + i$). So,

${\left(1 + i\right)}^{n} {e}^{i x} = \setminus {\sqrt{2}}^{n} {e}^{i \left(n \frac{\pi}{4} + x\right)} = {2}^{\frac{n}{2}} \left(\setminus \cos \left(n \frac{\pi}{4} + x\right) + i \sin \left(n \frac{\pi}{4} + x\right)\right)$

Finally, taking real part,

$\setminus \frac{{d}^{n}}{{\mathrm{dx}}^{n}} {e}^{x} \cos \left(x\right) = {2}^{\frac{n}{2}} {e}^{x} \cos \left(n \frac{\pi}{4} + x\right)$