Hello,

Use complex numbers.

1) Write #e^x \cos(x) = e^x\mathfrak{Re}(e^{ix}) = \mathfrak{Re}(e^{(1+i)x})#.

2) Calculate #n#-th derivative of #e^{(1+i)x}# :

#\frac{d^n}{dx^n}e^{(1+i)x} = (1+i)^n e^{(1+i)x}#.

3) Take the real part :

#\frac{d^n}{dx^n}e^{x}cos(x) = \mathfrak{Re}((1+i)^n e^{(1+i)x}) = e^x\mathfrak{Re}((1+i)^n e^{ix})#.

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

#(1+i)^n e^{i x}= \sqrt{2}^n e^{i (n pi/4 + x)} = 2^{n/2} (\cos(n pi/4 + x) + i sin(n pi /4+x))#

Finally, taking real part,

#\frac{d^n}{dx^n}e^{x}cos(x) =2^{n/2}e^x cos(n pi/4 + x)#