# How do you differentiate g(x) =x^2cscx using the product rule?

Feb 13, 2016

$\frac{\mathrm{dg} \left(x\right)}{\mathrm{dx}} = 2 x \csc x - {x}^{2} \cot x \csc x$

#### Explanation:

The product rule states that the derivative of two functions of $x$, let's call them $u$ and $v$, is $u ' v + u v '$.

First, let's begin by letting $u = {x}^{2}$ and $v = \csc x$, so our example fits with the product rule. Now we can differentiate $u$ and $v$:
$u = {x}^{2} \to u ' = 2 x$
$v = \csc x \to v ' = - \cot x \csc x$

On to substitutions:
$\frac{\mathrm{dg} \left(x\right)}{\mathrm{dx}} = \left(u\right) ' \left(v\right) + \left(u\right) \left(v\right) '$
$\frac{\mathrm{dg} \left(x\right)}{\mathrm{dx}} = 2 x \csc x - {x}^{2} \cot x \csc x$

This result is fine, but many teachers like the result expressed in sines and cosines. Using some identities, we can do that:
$= \frac{2 x}{\sin} x - \frac{{x}^{2} \cos x}{\sin} x \cdot \frac{1}{\sin} x$

$= \frac{2 x}{\sin} x - \frac{{x}^{2} \cos x}{\sin} ^ 2 x$

$= \frac{2 x \sin x}{\sin} ^ 2 x - \frac{{x}^{2} \cos x}{\sin} ^ 2 x$

$= \frac{2 x \sin x - {x}^{2} \cos x}{\sin} ^ 2 x$