For f(x) = e^xsin x find f(0), f'(0), f''(0) and f'''(0)
For $f(x) = e^{x}\sin x$ find $f(0)$, $f'(0)$, $f''(0)$ and $f'''(0)$.
Explanation of Method
Each differentiation rotates the trigonometric part by 45 degrees.
Step 1: The value at the origin
\[ f(0) = e^{0}\sin0 = 0. \]
Step 2: First derivative
\[ f'(x) = e^{x}\sin x+e^{x}\cos x = e^{x}\bigl(\sin x+\cos x\bigr), \qquad f'(0) = 1. \]
Step 3: Second derivative
The sines cancel and the cosines double: \[f''(x) = e^{x}\bigl(\sin x+\cos x\bigr)+e^{x}\bigl(\cos x-\sin x\bigr) = 2e^{x}\cos x, \qquad f''(0) = 2.\]
Step 4: Third derivative
\[ f'''(x) = 2e^{x}\cos x-2e^{x}\sin x = 2e^{x}\bigl(\cos x-\sin x\bigr), \qquad f'''(0) = 2. \]
Step 5: The pattern behind the numbers
Each differentiation multiplies the amplitude by $\sqrt2$ and advances the phase by $\tfrac{\pi}{4}$, since $\sin x+\cos x = \sqrt2\sin\!\left(x+\tfrac{\pi}{4}\right)$. Hence
\[ f^{(n)}(x) = \bigl(\sqrt2\bigr)^{n}e^{x}\sin\!\left(x+\frac{n\pi}{4}\right), \qquad f^{(n)}(0) = \bigl(\sqrt2\bigr)^{n}\sin\frac{n\pi}{4}. \]
Step 6: Verification
\[n = 0:\ 1\cdot0 = 0; \quad n = 1:\ \sqrt2\cdot\frac{\sqrt2}{2} = 1; \quad n = 2:\ 2\cdot1 = 2; \quad n = 3:\ 2\sqrt2\cdot\frac{\sqrt2}{2} = 2 \;\;\checkmark\]
\[n = 4:\ 4\sin\pi = 0, \quad n = 5:\ 4\sqrt2\cdot\left(-\frac{\sqrt2}{2}\right) = -4 \;\;\checkmark\]
\[\text{Maclaurin series: } e^{x}\sin x = x+x^{2}+\frac{x^{3}}{3}+0\cdot x^{4}-\frac{x^{5}}{30}+\cdots \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,f(0) = 0, \qquad f'(0) = 1, \qquad f''(0) = 2, \qquad f'''(0) = 2\,}\]
Remark
Remark. The cleanest explanation is complex: $e^{x}\sin x = \operatorname{Im}e^{(1+i)x}$, and differentiating multiplies by $1+i = \sqrt2\,e^{i\pi/4}$ — a stretch by $\sqrt2$ together with a rotation through $45^{\circ}$. That single observation gives the whole formula, and explains why $f^{(4)}(0) = 0$: four rotations make $180^{\circ}$, returning the imaginary part to a multiple of $\sin\pi$.