# How do you differentiate f(x)=sin^2(sqrt(3x/(x-1)^2))*cos2x  using the chain rule?

Mar 30, 2017

$\frac{\mathrm{df}}{\mathrm{dx}} = - \frac{\sqrt{3}}{2 \sqrt{x}} \sin \left(\sqrt{\frac{12 x}{x - 1} ^ 2}\right) \frac{\left(x + 1\right)}{x - 1} ^ 2 \cdot \cos 2 x - {\sin}^{2} \left(\sqrt{3 \frac{x}{x - 1} ^ 2}\right) \sin 2 x$

#### Explanation:

Let us first differentiate $g \left(x\right) = {\sin}^{2} \left(\sqrt{3 \frac{x}{x - 1} ^ 2}\right)$

let us write this as chain, where $g \left(x\right) = {\sin}^{2} \left(h \left(x\right)\right)$, $h \left(x\right) = \sqrt{p \left(x\right)}$,

$p \left(x\right) = \frac{3 x}{x - 1} ^ 2$ and using chain rule

$\frac{\mathrm{dg} \left(x\right)}{\mathrm{dx}} = \frac{\mathrm{dg}}{\mathrm{dh}} \times \frac{\mathrm{dh}}{\mathrm{dp}} \times \frac{\mathrm{dp}}{\mathrm{dx}}$

= $2 \sin \left(h \left(x\right)\right) \cos \left(h \left(x\right)\right) \times \frac{1}{2 \sqrt{p \left(x\right)}} \times \frac{3 {\left(x - 1\right)}^{2} - 6 x \left(x - 1\right)}{x - 1} ^ 4$

= $\sin \left(2 h \left(x\right)\right) \times \frac{1}{2 \sqrt{p \left(x\right)}} \times \frac{3 {x}^{2} - 6 x + 3 - 6 {x}^{2} + 6 x}{x - 1} ^ 4$

= $\sin \left(\sqrt{\frac{12 x}{x - 1} ^ 2}\right) \times \frac{1}{2 \sqrt{\frac{3 x}{x - 1} ^ 2}} \times \frac{- 3 {x}^{2} + 3}{x - 1} ^ 4$

= $- 3 \sin \left(\sqrt{\frac{12 x}{x - 1} ^ 2}\right) \times \frac{1}{2 \sqrt{3 x}} \times \frac{{x}^{2} - 1}{x - 1} ^ 3$

= $- \frac{\sqrt{3}}{2 \sqrt{x}} \sin \left(\sqrt{\frac{12 x}{x - 1} ^ 2}\right) \frac{\left(x + 1\right)}{x - 1} ^ 2$

and hence

$\frac{\mathrm{df}}{\mathrm{dx}} = - \frac{\sqrt{3}}{2 \sqrt{x}} \sin \left(\sqrt{\frac{12 x}{x - 1} ^ 2}\right) \frac{\left(x + 1\right)}{x - 1} ^ 2 \cdot \cos 2 x - {\sin}^{2} \left(\sqrt{3 \frac{x}{x - 1} ^ 2}\right) \sin 2 x$