16

I came across this Question where I have to find $$f^{(10)}$$ for the following function at $x = 0$ $$f(x) = e^x\sin x$$

I tried differentiating a few times to get a pattern but didn’t get one, can someone provide the solution.

user601297
  • 1,136

10 Answers10

73

Hint:

As $\;\mathrm e^x\sin x=\operatorname{Im}\bigl(\mathrm e^{(1+i)x}\bigr)$, you have to find first the real and imaginary parts of $(1+i)^{10}$.

Some details:

There results from the above remark and linearity of differentiation that $\;(\mathrm e^x\sin x)'=\bigl(\operatorname{Im}(\mathrm e^{(1+i)x})\bigr)'= \operatorname{Im}\bigl((1+i)\mathrm e^{(1+i)x}\bigr)$, hence $$\;(\mathrm e^x\sin x)''=\bigl(\operatorname{Im}((1+i)\mathrm e^{(1+i)x}))\bigr)'= \operatorname{Im}\bigl((1+i)^2\mathrm e^{(1+i)x}\bigr),$$ and more generally $$(\mathrm e^x\sin x)^{(k)}=\bigl(\operatorname{Im}(\mathrm e^{(1+i)x})\bigr)^{(k)}=\operatorname{Im}\bigl((1+i)^k(\mathrm e^{(1+i)x})\bigr).$$

Bernard
  • 179,256
44

Hint:

$$f(x)=e^x\sin x$$ $$f'(x)=e^x(\sin x +\cos x)$$ $$f''(x)=e^x(\sin x+\cos x)+e^x(\cos x -\sin x)=2e^x(\cos x)$$ $$f'''(x)=e^x(2\cos x)-e^x(2\sin x)=2e^x(\cos x-\sin x)$$ $$f^{IV}(x)=2e^x(\cos x-\sin x)-2e^x(\cos x+\sin x)=-4e^x(\sin x)=-4f(x)$$

Rhys Hughes
  • 13,103
  • 15
    First time to see roman numerals to denote derivatives. Nice! – Taladris Jan 18 '19 at 01:47
  • 14
    Lower case too, awful notation if you ask me. – marshal craft Jan 18 '19 at 07:43
  • 5
    I have no problem with lowercase roman numerals in general, but here it looks like taking the power to the imaginary unit (times $v$)... – ilkkachu Jan 18 '19 at 11:36
  • 30
    There will be some confusion when you get to the tenth derivative...... – Spencer Jan 18 '19 at 13:40
  • 1
    @Spencer And now you have me thinking about whether derivatives could be extended to the reals as exponents and factorials have been. Could it mean anything sane to take the 1.5th derivative? – Shufflepants Jan 18 '19 at 15:21
  • @marshalcraft good point. I've edited to use capitals instead, given yours and Spencer's comments. – Rhys Hughes Jan 18 '19 at 15:31
  • 7
    @Shufflepants https://en.wikipedia.org/wiki/Fractional_calculus – user5402 Jan 18 '19 at 16:13
  • Seems you would need some smaller more canonical notion of a derivative to have fractional nth derivatives. And them preferably a natural one which has some use maybe or maybe one with no useful application is more interesting. – marshal craft Jan 19 '19 at 11:27
  • Could just say take derivative a sub dominant interval, number of times. Hehe. (from music theory, not to confuse people reading) – marshal craft Jan 19 '19 at 11:30
19

Using power series: it is well-known that $e^x=\sum_{k=0}^\infty \frac{x^k}{k!}$ and $\sin(x)=\sum_{k=0}^\infty (-1)^k\frac{x^{2k+1}}{(2k+1)!}$ for any real number $x$, so

$$ e^x\sin(x)=(1+x+\frac{x^2}{2!}+\dots+\frac{x^{10}}{10!}+\dots)(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}+\dots) $$

By expanding, the coefficient of $x^{10}$ is $\frac{1}{9!1!}-\frac{1}{7!3!}+\frac{1}{5!5!}-\frac{1}{7!3!}+\frac{1}{9!1!}$

But this coefficient is also $\frac{f^{(10)}(0)}{10!}$, so

$$ f^{(10)}(0)=\frac{10!}{9!1!}-\frac{10!}{7!3!}+\frac{10!}{5!5!}-\frac{10!}{7!3!}+\frac{10!}{9!1!} = 10 -120 + 252 - 120 +10 = 32$$

Taladris
  • 12,203
  • 5
  • 35
  • 61
  • 3
    Take note of this solution, if the derivative at some point is needed, you don't need a symbolic expression for the $n$th derivative evaluated at some arbitrary point $x$. In some cases where a symbolic expression is not available, you can still find the $n$th derivative at some special point for arbitrary $n$. Also, there exists a general method based on Newton-Raphson division to find the $n$th derivative of an arbitrary function at some given point using some power of $\log(n)$ multiplications. Some computer algebra systems use such methods to compute series expansions. – Count Iblis Jan 18 '19 at 03:14
11

Use Leibniz' Rule for higher derivatives of a product: $$\frac{d^n}{dx^n}(uv) =\frac{d^nu}{dx^n}v+\binom n1\frac{d^{n-1}u}{dx^{n-1}}\frac{dv}{dx} +\binom n2\frac{d^{n-2}u}{dx^{n-2}}\frac{d^2v}{dx^2}+\cdots+u\frac{d^nv}{dx^n}\ .$$ In your case take $u=e^x$ and $v=\sin x$. Since you are going to substitute $x=0$ after differentiating, all the $e^x$ terms will be $1$, all the $\sin x$ terms will be $0$ and all the cos $x$ terms will be $1$ (though some of them will pick up a negative sign when you differentiate). So the answer is $$\eqalign{0+\binom{10}11&{}+\binom{10}20+\binom{10}3(-1)+\binom{10}40+\binom{10}51\cr &\qquad{}+\binom{10}60+\binom{10}7(-1)+\binom{10}80+\binom{10}91+\binom{10}{10}0\cr &=10-120+252-120+10\cr &=32\ .\cr}$$

David
  • 84,708
  • 9
  • 96
  • 166
5

One trick here is to use $e^{ix}=\cos x+i\sin x$ and define $g(x)=e^x\cos x$ then $f(x)$ and $g(x)$ are both real functions.

Let $h(x)=g(x)+if(x)=e^{(1+i)x}$ then the tenth derivative of $h(x)$ is $(1+i)^{10}h(x)$ and the tenth derivative of $f(x)$ is the imaginary part of this.

Because you only want the value at $x=0$ you can evaluate there, with $h(0)=g(0)+if(0)$

Mark Bennet
  • 101,769
5

$$(e^x(a\cos x+b\sin x))'=e^x(a\cos x+b\sin x)+e^x(b\cos x-a\sin x)=e^x((a+b)\cos x+(b-a)\sin x).$$

So

$$(0,1)\to(1,1)\to(2,0)\to(2,-2)\to(0,-4)\to(-4,-4)\to(-8,0)\to(-8,8)\to(0,16)\to(16,16)\to(32,0).$$


If you divide by increasing powers of $2$, in pairs, the pattern emerges, with period $8$:

$$(0,1)\to(1,1)\to(1,0)\to(1,-1)\to(0,-1)\to(-1,-1)\to(-1,0)\to(-1,1)\to(0,1)\to(1,1)\to(1,0).$$

5

I get $f^{10}(x)=32e^x\cos x$.

Here's what I did:

\begin{align}f'(x)&=e^x(\sin x+\cos x)\\ \implies f''(x)&=2e^x\cos x\\ \implies f^3(x)&=2e^x(\cos x-\sin x)\\ \implies f^4(x)&=2e^x(-2\sin x)=-4f(x)\\ \implies f^5(x)&=-4f'(x)\\ \implies f^8(x)&=-4f^4(x)=16f(x)\\ \implies f^{10}(x)&=16f''(x)\end{align}

Archer
  • 6,591
5

Regarding the question about looking for a pattern:

Repeated application of the product rule gives

$$ f(x) = e^x \sin x$$ $$ f'(x) = e^x \sin x + e^x \cos x$$ $$ f''(x) = e^x \sin x + e^x \cos x + e^x \cos x - e^x \sin x = 2\ e^x \cos x$$ Is a pattern emerging? $$ f^{(3)}(x) = 2\ e^x \cos x -2\ e^x \sin x$$ $$ f^{(4)}(x) = 2\ e^x \cos x -2\ e^x \sin x - 2\ e^x \sin x - 2\ e^x \cos x = -4\ e^x \sin x$$ Yes. We can then conclude that

$ f^{(6)}(x) = -8\ e^x \cos x$, $f^{(8)}(x) = 16\ e^x \sin x$, and $f^{(10)}(x) = 32\ e^x \cos x$

such that $f^{(10)}(0) = 32 $

Terje D.
  • 171
4

Use the formula $(fg)^{(n)}= \sum\limits_{k=0}^{n} \binom {n} {k} (f)^{(k)}(g)^{(n-k)}$.

2

Using recurrence relation: $$\begin{align}f^{(0)}=&e^x\sin x\\ f^{(1)}=&e^x\sin x+e^x\cos x=f^{(0)}+e^x\cos x\\ f^{(2)}=&f^{(1)}+\color{red}{e^x\cos x}-e^x\sin x=f^{(1)}+\color{red}{f^{(1)}-f^{(0)}}-f^{(0)}\\ \color{blue}{f^{(n)}=}&\color{blue}{2f^{(n-1)}-2f^{(n-2)}, f^{(0)}(0)=0, f^{(1)}(0)=1} \Rightarrow \\ f^{(n)}=&\frac12i\left[(1-i)^n-(1+i)^n\right] \Rightarrow \\ f^{(10)}(0)=&\frac12i[(1-i)^{10}-(1+i)^{10}]=\\ =&-\frac12i\left[{10\choose 1}i+{10\choose 3}i^3+{10\choose 5}i^5+{10\choose 7}i^7+{10\choose 9}i^9\right]=\\ =&{10\choose 1}-{10\choose 3}+{10\choose 5}-{10\choose 7}+{10\choose 9}=\\ =&10-120+252-120+10=\\ =&32.\end{align}$$


Addendum: Direct calculation from the recurrence relation above: $$\color{blue}{f^{(n)}=2\left[f^{(n-1)}-f^{(n-2)}\right], f^{(0)}(0)=0, f^{(1)}(0)=1}\\ \begin{array}{c|c|c|c|c|c|c|c|c} f^{(0)}&f^{(1)}&f^{(2)}&f^{(3)}&f^{(4)}&f^{(5)}&f^{(6)}&f^{(7)}&f^{(8)}&f^{(9)}&f^{(10)}\\ \hline 0&1&2&2&0&-4&-8&-8&0&16&32\end{array}$$

farruhota
  • 32,168