Am I using the chain rule correctly? I'm supposed to find $y'$ and $y''$ of this function:
$$y=e^{\alpha x} \sin\beta x$$
This is what I have done so far:
$$y'=e^{\alpha x}\sin\beta x\cdot \alpha x'\sin\beta x\cdot \sin'\beta x \cdot \beta x$$
$$y'=e^{\alpha x}\sin\beta x\cdot \alpha \sin\beta x\cdot \cos\beta x \cdot \beta$$
I tried to find $y''$, but my answer was really messy so I must not have done the first derivative correctly. 
What have I done wrong?
 A: Too many $\cdot$ s. First, you should use the product rule.
This gives you
$$y'= \sin\beta x \frac{d}{dx} e^{\alpha x} + e^{\alpha x}  \frac{d}{dx} \sin\beta x$$
Now use the chain rule: 
$$y'= \sin(\beta x)\alpha e^{\alpha x} + e^{\alpha x} \beta \cos(\beta x)$$
To answer your question in the header: it looks like you are using the chain rule correctly, but I think you should look to your product rule. 
A: You went wrong by not applying the product rule first. If you look closely, you have a product of two different functions.
$$y=\color{red}{e^{ax}}\color{blue}{\sin(\beta x)}$$
$$\begin{align}y'&=(e^{\alpha x})(\color{blue}{\sin(\beta x)})'+(\sin(\beta x))(\color{red}{e^{\alpha x}})' &\text{(Using the product rule : $(fg)'=fg'+gf'$)}\\
&=(e^{\alpha x})(\beta\cos(\beta x))+(\sin(\beta x))(\alpha e^{\alpha x})& (\text{Chain rule})\\
&=e^{\alpha x}(\alpha\sin(\beta x))+\beta \cos(\beta x))&(\text{Factor out $e^{\alpha x}$)} \\
\end{align}$$
A: Hint
Another way using logarithmic differentiation $$y=e^{\alpha x}\sin(\beta x)$$ $$\log(y)=\alpha x+\log\big(\sin(\beta x)\big)$$ $$\frac{y'}y=\alpha+\frac{\beta \cos(\beta x)}{\sin(\beta x)}$$ then $$y'={\alpha}e^{\alpha x}\sin(\beta x)+\beta e^{\alpha x}\cos (\beta x)$$ Now, for the second derivative, consider $y'=u+v$ with $u={\alpha}e^{\alpha x}\sin(\beta x)$ and $v=\beta e^{\alpha x}\cos (\beta x)$ and do the same as above to get $u'$ and $v'$.
A: $y'=(e^{\alpha x})'(\sin(\beta x)+(e^{\alpha x})(\sin(\beta x))'={\alpha}e^{\alpha x}(\sin(\beta x))+(e^{\alpha x})(\beta \cos (\beta x))$
