How can I get a formula for the n-th derivative of this function? I know that it cycles every 4 derivatives with a factor of $-4$. $e^x(\cos x-\sin x) \to e^x(-2\sin x) \to -2e^x(\sin x+\cos x) \to -4e^x\cos x$
4 Answers
One easier way is to use complex expressions.
$f(x) = e^x \cos x = \Re(e^{(1+i)x})$
$f^{(n)}(x) = \Re((1+i)^ne^{(1+i)x})$
Now use $(1+i)^n = (\sqrt 2)^ne^{i\frac{n\pi}{4}} = (\sqrt 2)^n(\cos{\frac{n\pi}{4} + i\sin{\frac{n\pi}{4}}})$ and $e^{(1+i)x} = e^x(\cos x + i\sin x)$to finish up:
$f^{(n)}(x) = (\sqrt 2)^ne^x(\cos{\frac{n\pi}{4}\cos x - \sin{\frac{n\pi}{4}}} \sin x)$
- 26,801
$e^x\cos x$ is the real part of $e^{(1+i)x}=e^x(\cos x+i\sin x)$. The $n$-th derivative of $e^x\cos x$ is the real part of the $n$-th derivative of $e^{(1+i)x}$. The $n$-th derivative of $e^{(1+i)x}$ is $(1+i)^ne^{(1+i)x}$. Using polar form $(1+i)^n=2^{n/2}(\cos n\pi/4+i\sin n\pi/4)$. So the $n$-th derivative of $e^x\cos x$ is $$2^{n/2}\left(\cos\frac{n\pi}4\cos x-\sin\frac{n\pi}4\sin x \right). $$
- 158,341
You can use the addition formula: $$\cos x\cos y-\sin x\sin y=\cos(x+y)$$ Hence: $$y=e^x\cos x\\ y'=e^x\cos x-e^x\sin x=\sqrt2\cdot e^x\left(\frac1{\sqrt2}\cos x-\frac1{\sqrt2}\sin x\right)=\\ \sqrt2\cdot e^x\left(\cos \frac{\pi}4\cos x-\sin \frac{\pi}4\sin x\right)=2^{\frac12}e^x\cos \left(x+\frac{\pi}{4}\right)\\ y''=2^{\frac22}e^x\cos \left(x+\frac{2\pi}{4}\right)\\ \vdots\\ y^{(n)}=2^{\frac n2}e^x\cos \left(x+\frac{n\pi}{4}\right).$$
- 31,482
You can always use Leibniz rule. It is hassle free abd easy to use. It also gives you an idea of writing your results in generalized forms.
- 31