$n$-derivative of function $f(x)=e^x \sin x$ at $x=0$

1.1k Views Asked by At

I have function $f(x) = e^x \sin{x}$ and must found $f^{(n)}(0)$

$f'(x) = e^x(\sin{x} + \cos{x}) $

$f''(x) = 2 e^x \cos{x}$

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

$f''''(x) = -4 e^x \sin{x}$

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

I think $f^{(n)}(0) = \alpha (-1)^n x^{2n+1}$ but I can't find $\alpha$

3

There are 3 best solutions below

0
On BEST ANSWER

Observe \begin{align} f(x)=e^x\sin x = \operatorname{Im} [e^{(1+i)x}]. \end{align} Using Taylor series for the exponential function, we have \begin{align} \operatorname{Im}e^{(1+i)x} = \operatorname{Im} \sum^\infty_{n=0}\frac{(1+i)^nx^n}{n!}. \end{align} Thus, it follows \begin{align} f^{(n)}(0) = \operatorname{Im}\ (1+i)^n = \operatorname{Im} (\sqrt{2}e^{i\frac{\pi}{4}})^n. \end{align} It should be elementary from here on.

0
On

Let us try to discover a general formula. I see two possible approaches.

The first one is to use induction: assume that $f^{(n)} (x) = \Bbb e ^x (a_n \cos x + b_n \sin x)$. We have $a_0 = 0$ and $b_0 = 1$. Then

$$f^{(n+1)} = \Bbb e ^x (a_n \cos x + b_n \sin x) + \Bbb e ^x (- a_n \sin x + b_n \cos x) = \Bbb e ^x [(a_n + b_n) \cos x + (b_n - a_n) \sin x ] ,$$

which gives us a recurrence relation that can be written in matrix form as

$$\begin{pmatrix} a_{n+1} \\ b_{n+1} \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} \begin{pmatrix} a_n \\ b_n \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^2 \begin{pmatrix} a_{n-1} \\ b_{n-1} \end{pmatrix} = \dots = \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^{n+1} \begin{pmatrix} a_0 \\ b_0 \end{pmatrix} .$$

If $I$ is the identity matrix, prove by induction (it is easy) that

$$\begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^{4n} = (-4)^n I .$$

It follows that

$$\begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^{4n+1} = (-4)^n \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} , \\ \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^{4n+2} = (-4)^n \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix}^2 = (-4)^n \begin{pmatrix} 0 & 2 \\ -2 & 0 \end{pmatrix} , \\ \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} ^{4n+3} = (-4)^n \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix}^3 = (-4)^n \begin{pmatrix} -2 & 2 \\ -2 & -2 \end{pmatrix} ,$$

whence it follows that

$$\begin{pmatrix} a_{4n} \\ b_{4n} \end{pmatrix} = (-4)^n \begin{pmatrix} 0 \\ 1 \end{pmatrix} , \\ \begin{pmatrix} a_{4n+1} \\ b_{4n+1} \end{pmatrix} = (-4)^n \begin{pmatrix} 1 & 1 \\ -1 & 1 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = (-4)^n \begin{pmatrix} 1 \\ 1 \end{pmatrix} , \\ \begin{pmatrix} a_{4n+2} \\ b_{4n+2} \end{pmatrix} = (-4)^n \begin{pmatrix} 0 & 2 \\ -2 & 0 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = (-4)^n \begin{pmatrix} 2 \\ 0 \end{pmatrix} , \\ \begin{pmatrix} a_{4n+3} \\ b_{4n+3} \end{pmatrix} = (-4)^n \begin{pmatrix} -2 & 2 \\ -2 & -2 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = (-4)^n \begin{pmatrix} 2 \\ -2 \end{pmatrix} , \\$$

which gives the result

$$f^{(4n)} (x) = \Bbb e^x (-4)^n \sin x , \\ f^{(4n+1)} (x) = \Bbb e^x (-4)^n (\cos x + \sin x), \\ f^{(4n+2)} (x) = \Bbb e^x (-4)^n 2 \cos x , \\ f^{(4n+3)} (x) = \Bbb e^x (-4)^n (2 \cos x - 2 \sin x) ,$$

whence one finally gets

$$f^{(4n)} (0) = 0 , \\ f^{(4n+1)} (0) = (-4)^n , \\ f^{(4n+2)} (0) = 2 (-4)^n , \\ f^{(4n+3)} (0) = 2 (-4)^n .$$


An alternative approach would be to use Leibniz's general formula

$$(fg)^{(n)} = \sum _{k=0} ^n \binom n k f^{(n-k)} g^{(k)}$$

whence it follows that

$$\tag{*} (\Bbb e ^x \sin x) ^{(n)} (0) = \sum _{k=0} ^n \binom n k \sin^{(k)} (0) .$$

It is easy now (again, induction) to see that

$$\sin^{(4n)} = \sin, \quad \sin^{(4n+1)} = \sin' = \cos, \quad \sin^{(4n+2)} = \cos' = -\sin, \quad \sin^{(4n+3)} = -\sin' = -\cos ,$$

meaning that

$$\sin^{(4n)} (0) = 0, \quad \sin^{(4n+1)} (0) = 1, \quad \sin^{(4n+2)} (0) = 0, \quad \sin^{(4n+3)} (0) = -1 .$$

Plugging these in (*) will give you a result, but you would have to work on it a little bit in order to reach the same form obtained through the first method.

0
On

You have already found a pattern:

$f^{(1)}(x) = e^x(\sin{x} + \cos{x}) $

$f^{(2)}(x) = 2 e^x \cos{x}$

$f^{(3)}(x) = 2 e^x (\cos{x} - \sin{x})$

$f^{(4)}(x) = -4 e^x \sin{x}$

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

This means that $f^{(5)}(x) = -4 f^{(1)}(x)$, $f^{(6)}(x) = -4 f^{(2)}(x)$ and so on.

You can now easily find $f^{(4i)}(x)$, $f^{(4i+1)}(x)$, $f^{(4i+2)}(x)$ and $f^{(4i+3)}(x)$ for all $i \geq 0$ – use induction in $i$. Moreover, since $e^0 = 1$ and $\sin 0 = 0$ and $\cos 0 = 1$, you can now easily find the values of these derivatives at $0$.