Differentiate $f(x)=e^x\sin x$ 
$f(x)=e^x\sin x$

$$f'(x)=e^x\sin x+e^x\cos x $$
$$=e^x\sin x+e^x\sin (\frac{\pi}{2}+x)$$
That's what I got. But, my book wrote something else.
$$f'(x)=\sqrt{2}e^x\sin (x+\frac{\pi}{4})$$
How they had taken common?

Hint: Use the formula
$\sin C+\sin D=2\sin\left(\frac{C+D}2\right)\cos\left(\frac{C-D}2\right)$
where $C=x$ and $D=π/2+x$
