How to simplify $y = \frac{\sin\rho + \sin2\rho}{\cos\rho + \cos2\rho}$ How can I simplify this function before I differentiate it?
$$y = \frac{\sin\rho + \sin2\rho}{\cos\rho + \cos2\rho}$$
Of course you could immediately start off by using the quotient rule, but that gives a very long and convoluted expression which takes forever to simplify.
I know that one of the possible simplifications of the function pre-differentiation is
$$y = \tan\frac{3p}{2}$$
However I do not know how this is done. If anyone could shed some light on this or show steps for an equally simple simplification of the original function, this would be much appreciated.
 A: Actually you can use the so-called sum-to-product rules for trigonometric identities. Explicitly,
$$
\sin \alpha \pm \sin \beta = 2 \sin \frac{\alpha \pm \beta}{2} \cos \frac{\alpha \mp \beta}{2}
$$
and
$$
\cos \alpha + \cos \beta = 2 \cos \frac{\alpha \pm \beta}{2} \cos \frac{\alpha -\beta}{2}
$$
from these,
\begin{eqnarray}
y = \frac{\sin p + \sin 2p}{\cos p + \cos 2p} &=& \frac{2 \sin \frac{3p}{2} \cos \frac{p}{2}}{2 \cos \frac{3p}{2} \cos \frac{p}{2}}\\ 
                                              &=& \tan \frac{3p}{2}
\end{eqnarray}
A: $$\frac{\sin p+\sin2p}{\cos p+\cos2p}=\frac{\sin\frac{3p}2\cos\frac p2}{\cos\frac{3p}2\cos\frac p2}=\frac{\sin\frac{3p}2}{\cos\frac{3p}2}=\tan\frac{3p}2$$
and the derivative is
$$\frac32\;\sec^2\frac{3p}2$$
A: Using prostaphaeresis formulae, we get 
$$\sin(\rho) + \sin(2\rho) = 2\sin\left(\frac{3}{2}\rho\right)\cos\left(\frac{\rho}{2}\right),$$
and
$$\cos(\rho) + \cos(2\rho) = 2\cos\left(\frac{3}{2}\rho\right)\cos\left(\frac{\rho}{2}\right).$$
Hence,
$$\frac{\sin(\rho) + \sin(2\rho)}{\cos(\rho) + \cos(2\rho)} = \frac{2\sin(\frac{3}{2}\rho)\cos(\frac{\rho}{2})}{2\cos(\frac{3}{2}\rho)\cos(\frac{\rho}{2})} = \frac{\sin(\frac{3}{2}\rho)}{\cos(\frac{3}{2}\rho)} = \tan\left(\frac{3}{2}\rho\right)$$
