69

I've got this task I'm not able to solve. So i need to find the 100-th derivative of $$f(x)=e^{x}\cos(x)$$ where $x=\pi$.

I've tried using Leibniz's formula but it got me nowhere, induction doesn't seem to help either, so if you could just give me a hint, I'd be very grateful.

Many thanks!

windircurse
  • 1,894

7 Answers7

124

HINT:

$e^x\cos x$ is the real part of $y=e^{(1+i)x}$

As $1+i=\sqrt2e^{i\pi/4}$

$y_n=(1+i)^ne^{(1+i)x}=2^{n/2}e^x\cdot e^{i(n\pi/4+x)}$

Can you take it from here?

  • 4
    Thanks for your comment. I get the idea and it is, I must say, a really original approach, haven't seen anyone doing derivatives this way. – windircurse Apr 21 '16 at 11:58
  • 14
    @windircursed This was the trick behind your question. Whenever you are asked to find the derivative of a very high order, always look for a way to manipulate the function in such a way, that the derivatives become either periodic or trivially easy. In this case, the insight is in writing the trigonometric function as a function of the exponential function, who's derivative is easy. – Saikat Apr 21 '16 at 12:08
  • Now that OP gets a solution, can you please expand your hint? I still can't "take it from here"... – Stephan Apr 21 '16 at 13:02
  • 4
    @Stephan. The real part of $e^{i(n\pi/4+x)}$ is $\cos(n\pi/4+x)$

    So, the real part of $2^{n/2}e^x\cdot e^{i(n\pi/4+x)}$ is $2^{n/2}e^x\cos(n\pi/4+x)$ which is the required answer

    – lab bhattacharjee Apr 21 '16 at 15:00
  • 4
    This method is also useful if you want to integrate things like $e^x \cos(2x)$ without integration by parts. – Joel Apr 22 '16 at 08:15
  • 4
    @Joel, Same as $$n=-1$$ right? – lab bhattacharjee Apr 23 '16 at 05:42
107

Find fewer order derivatives:

\begin{align} f'(x)&=&e^x (\cos x -\sin x)&\longleftarrow&\\ f''(x)&=&e^x(\cos x -\sin x -\sin x -\cos x) \\ &=& -2e^x\sin x&\longleftarrow&\\ f'''(x)&=&-2e^x(\sin x + \cos x)&\longleftarrow&\\ f''''(x)&=& -2e^x(\sin x + \cos x + \cos x -\sin x)\\ &=& -4e^x \cos x \\ &=& -4f(x)&\longleftarrow&\\ &...&\\ \therefore f^{(100)}(\pi)&=&-4^{25} f(\pi) \end{align}

choco_addicted
  • 8,786
  • 8
  • 24
  • 53
  • 7
    I think I got it. I actually calculated another four (up to 8-th) derivatives using WA. This is basically inductive approach. When I tried it first time, I stopped at the third derivative, and it turns out the 4-th is the important one, heh. Thanks for the effort. – windircurse Apr 21 '16 at 12:02
  • 43
    Keep in mind that the basic circular trig-function derivatives are cyclic with period four: sin -> cos -> -sin -> -cos -> sin. Any time you're looking for derivatives to combine, you're using the 4th derivative. If you need them to cancel, you're using the 2nd derivative. This is the basis of the canonical solutions to second-order differential equations. – Prune Apr 21 '16 at 21:30
41

There is this more systematic approach (requires linear algebra) which we can extend for more complicated cases. The key fact is that you have a set of functions (vectors) whose linear span is closed under the derivative operator. (You will never get something that is not a linear combination of $e^x \cos(x)$ and $e^x \sin(x)$ by taking derivatives).

Consider the vector space $V$ generated by $e^x \cos(x), e^x \sin(x)$. The derivative $D:V\to V$ is a linear map in that space. In those basis vectors

$$D = \left( \begin{array}{cc} 1 & -1 \\ 1 & 1 \\ \end{array} \right)$$

The problem is now to calculate $D^{100}$. For that, we could diagonalise $D$. However, in this case, $D^4 = -4 I$ so $D^{100} = -4^{25} D$. Therefore

$$D(e_1) = 4 e_1 = e^x \cos(x)$$

mlainz
  • 1,275
28

Alternatively, one may use the General Leibniz rule/Cauchy formula $$ (fg)^{(n)}(x)=\sum_{k=0}^n\binom{n}{k}f^{(n-k)}(x)g^{(k)}(x) $$ with $$ f(x)=e^x,\quad f^{(n-k)}(x)=e^x,\quad g(x)=\cos x,\quad g^{(k)}(x)=\cos(x+k\pi/2). $$

Olivier Oloa
  • 120,989
17

$\cos(x) = \frac {\exp(\mathrm{i}x) + \exp (-\mathrm{i}x)}2$

And the rest is basically grunt work.

2

There is a pattern, which is easy to see in this problem, (e^x = @)

@cosx

1st derivative - @cosx -@sinx

2nd derivative - -2@sinx

3rd .. - -2(@sinx + @cosx)

4th .. - -4@cosx

100 = 0mod4

So, 100th derivative of @cosx should be of the form a@cosx and a is (-4)^25.

So, at x = π, 100th derivative is 4²⁵e^π.

2

I'm a little late to the game, but you can check your work in Wolfram Alpha with this query:

D[E^x Cos[x], {x, 100}]  at x = pi

which matches the answer posted by @choco_addicted. The syntax comes from the Wolfram Language page for the D function.