How do you differentiate  g(x) = 3xsin^2(4x) + secx ?

Nov 13, 2017

Make use of the Chain Rule and Product Rule. $\frac{\mathrm{dg}}{\mathrm{dx}} = 3 {\sin}^{2} \left(4 x\right) + 24 x \sin \left(4 x\right) \cos \left(4 x\right) + \tan \left(x\right) \sec \left(x\right)$

Explanation:

Our first term will have to have the product rule applied. The product rule states that given $f \left(x\right) = g \left(x\right) h \left(x\right) , f ' \left(x\right) = g ' \left(x\right) h \left(x\right) + g \left(x\right) h ' \left(x\right)$

Thus our first term...

$\frac{d}{\mathrm{dx}} \left(3 x {\sin}^{2} \left(4 x\right)\right) = 3 {\sin}^{2} \left(4 x\right) + 3 x \frac{d}{\mathrm{dx}} \left({\sin}^{2} \left(4 x\right)\right)$

The derivative for this second term will require use of the chain rule, and of substitution. If we declare $u \left(x\right) = \sin \left(4 x\right)$, then we have $\frac{\mathrm{du}}{\mathrm{dx}} = 4 \cos \left(4 x\right) {\sin}^{2} \left(4 x\right) = {u}^{2}$, meaning $\frac{d}{\mathrm{dx}} {u}^{2} = \frac{d}{\mathrm{du}} \left({u}^{2}\right) \cdot \frac{\mathrm{du}}{\mathrm{dx}} = 2 u \cdot \frac{\mathrm{du}}{\mathrm{dx}} . = 2 \sin \left(4 x\right) \cdot 4 \cos \left(4 x\right) = 8 \sin \left(4 x\right) \cos \left(4 x\right)$

This means:

$\frac{d}{\mathrm{dx}} \left(3 x {\sin}^{2} \left(4 x\right)\right) = 3 {\sin}^{2} \left(4 x\right) + 3 x \left(8 \sin \left(4 x\right) \cos \left(4 x\right)\right) = 3 {\sin}^{2} \left(4 x\right) + 24 x \sin \left(4 x\right) \cos \left(4 x\right)$

Meanwhile, the derivative of $\sec \left(x\right)$ can be found using the quotient rule and the definition of the secant.

$\sec \left(x\right) = \frac{1}{\cos} \left(x\right) \to \frac{d}{\mathrm{dx}} \left(\frac{1}{\cos} x\right) = \frac{\left(0 \cdot \cos x\right) - \left(- \sin x\right)}{{\cos}^{2} x} = \sin \frac{x}{{\cos}^{2} x} = \tan \left(x\right) \cdot \frac{1}{\cos} \left(x\right) = \tan x \sec x$

Thus we have...

$\frac{\mathrm{dg}}{\mathrm{dx}} = 3 {\sin}^{2} \left(4 x\right) + 24 x \sin \left(4 x\right) \cos \left(4 x\right) + \tan \left(x\right) \sec \left(x\right)$