# How do you find the derivative of f(x) = tan^2(x)?

Jul 14, 2016

$f \left(x\right) = {\sin}^{2} \frac{x}{\cos} ^ 2 x$

Let $f \left(x\right) = g \frac{x}{h \left(x\right)}$, so that $g \left(x\right) = {\sin}^{2} x$ and $h \left(x\right) = {\cos}^{2} x$. Then $f ' \left(x\right) = \frac{g ' \left(x\right) \times h \left(x\right) - g \left(x\right) \times h ' \left(x\right)}{h \left(x\right)} ^ 2$.

Let's differentiate $g \left(x\right)$ and $h \left(x\right)$.

$g \left(x\right) = \left(\sin x\right) \left(\sin x\right)$

$g ' \left(x\right) = \cos x \sin x + \cos x \sin x$

$g ' \left(x\right) = 2 \cos x \sin x$

$g ' \left(x\right) = \sin 2 x$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$h ' \left(x\right) = \left(\cos x\right) \left(\cos x\right)$

$h ' \left(x\right) = - \sin x \cos x - \sin x \cos x$

$h ' \left(x\right) = - 2 \sin x \cos x$

$h ' \left(x\right) = - \left(2 \sin x \cos x\right)$

$h ' \left(x\right) = - \sin 2 x$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$f ' \left(x\right) = \frac{g ' \left(x\right) \times h \left(x\right) - g \left(x\right) \times h ' \left(x\right)}{h \left(x\right)} ^ 2$.

$f ' \left(x\right) = \frac{\left(\sin 2 x \times {\cos}^{2} x\right) - \left(- \sin 2 x \times {\sin}^{2} x\right)}{{\cos}^{2} x} ^ 2$

$f ' \left(x\right) = \frac{\left(2 \sin x \cos x \times {\cos}^{2} x\right) - \left(- 2 \sin x \cos x \times {\sin}^{2} x\right)}{{\cos}^{2} x} ^ 2$

$f ' \left(x\right) = \frac{\left(2 \sin x {\cos}^{3} x\right) - \left(- 2 {\sin}^{3} x \cos x\right)}{{\cos}^{4} x}$

$f ' \left(x\right) = \frac{2 \sin x {\cos}^{3} x + 2 {\sin}^{3} x \cos x}{{\cos}^{4} x}$

$f ' \left(x\right) = \frac{2 \sin x \cos x \left({\cos}^{2} x + {\sin}^{2} x\right)}{\cos} ^ 4 x$

$f ' \left(x\right) = \frac{2 \sin x}{\cos} ^ 3 x$

$f ' \left(x\right) = 2 \cot x {\sec}^{2} x$

Hopefully this helps!