# How do you differentiate f(x)=x^2/ln(tanx) using the quotient rule?

$f ' \left(x\right) = \frac{2 x \cdot \ln \left(\tan x\right) - {x}^{2} \cdot \csc x \cdot \sec x}{\ln \left(\tan x\right)} ^ 2$

#### Explanation:

We start with the given function $f \left(x\right) = {x}^{2} / \left(\ln \left(\tan x\right)\right)$

We use the quotient formula for finding derivatives

$\frac{d}{\mathrm{dx}} \left(\frac{u}{v}\right) = \frac{v \cdot \frac{d}{\mathrm{dx}} \left(u\right) - u \cdot \frac{d}{\mathrm{dx}} \left(v\right)}{v} ^ 2$

Let $u = {x}^{2}$ and $v = \ln \left(\tan x\right)$

Let us use the formula

$f ' \left(x\right) = \frac{d}{\mathrm{dx}} \left({x}^{2} / \ln \left(\tan x\right)\right) = \frac{\ln \left(\tan x\right) \cdot \frac{d}{\mathrm{dx}} \left({x}^{2}\right) - {x}^{2} \cdot \frac{d}{\mathrm{dx}} \left(\ln \left(\tan x\right)\right)}{\ln \left(\tan x\right)} ^ 2$

$f ' \left(x\right) = \frac{\ln \left(\tan x\right) \cdot 2 x - {x}^{2} \cdot \frac{1}{\tan x} \cdot \frac{d}{\mathrm{dx}} \left(\tan x\right)}{\ln \left(\tan x\right)} ^ 2$

$f ' \left(x\right) = \frac{\ln \left(\tan x\right) \cdot 2 x - {x}^{2} \cdot \frac{1}{\tan x} \cdot {\sec}^{2} x}{\ln \left(\tan x\right)} ^ 2$

Take note that $\frac{1}{\tan} x = \cos \frac{x}{\sin} x = \csc x \cdot \cos x$

$f ' \left(x\right) = \frac{\ln \left(\tan x\right) \cdot 2 x - {x}^{2} \cdot \csc x \cdot \cos x \cdot {\sec}^{2} x}{\ln \left(\tan x\right)} ^ 2$

$f ' \left(x\right) = \frac{\ln \left(\tan x\right) \cdot 2 x - {x}^{2} \cdot \csc x \cdot \sec x}{\ln \left(\tan x\right)} ^ 2$

$f ' \left(x\right) = \frac{2 x \cdot \ln \left(\tan x\right) - {x}^{2} \cdot \csc x \cdot \sec x}{\ln \left(\tan x\right)} ^ 2$