# How do you implicitly differentiate  (xy)^2+xcos(xy)=ln(x/y)+ytan(xy) ?

Oct 5, 2017

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{{x}^{2} {y}^{2} \sin \left(x y\right) + y + x {y}^{3} {\sec}^{2} \left(x y\right) - 2 {x}^{2} {y}^{3} - x y \cos \left(x y\right)}{2 {x}^{3} {y}^{2} - {x}^{3} y \sin \left(x y\right) + x - x y \tan \left(x y\right)}$

#### Explanation:

Implicit differentiation is a special case of the chain rule for derivatives. Generally differentiation problems involve functions i.e. $y = f \left(x\right)$ - written explicitly as functions of $x$.

However, some functions y are written implicitly as functions of $x$. So what we do is to treat $y$ as $y = y \left(x\right)$ and use chain rule. This means differentiating $y$ w.r.t. $y$, but as we have to derive w.r.t. $x$, as per chain rule, we multiply it by $\frac{\mathrm{dy}}{\mathrm{dx}}$. So for given function we proceed as under:

As ${\left(x y\right)}^{2} + x \cos \left(x y\right) = \ln \left(\frac{x}{y}\right) + y \tan \left(x y\right)$, differentiating it w.r.t. $x$ we have

$2 x y \left(y + x \frac{\mathrm{dy}}{\mathrm{dx}}\right) + \cos \left(x y\right) + x \left(- \sin \left(x y\right)\right) \left(y + x \frac{\mathrm{dy}}{\mathrm{dx}}\right) = \frac{1}{\frac{x}{y}} \left(\frac{y - x \frac{\mathrm{dy}}{\mathrm{dx}}}{y} ^ 2\right) + \tan \left(x y\right) \frac{\mathrm{dy}}{\mathrm{dx}} + y {\sec}^{2} \left(x y\right) \left(y + x \frac{\mathrm{dy}}{\mathrm{dx}}\right)$

or $2 x {y}^{2} + 2 {x}^{2} y \frac{\mathrm{dy}}{\mathrm{dx}} + \cos \left(x y\right) - x y \sin \left(x y\right) - {x}^{2} \sin \left(x y\right) \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1}{x} - \frac{1}{y} \frac{\mathrm{dy}}{\mathrm{dx}} + \tan \left(x y\right) \frac{\mathrm{dy}}{\mathrm{dx}} + {y}^{2} {\sec}^{2} \left(x y\right) + x y {\sec}^{2} \left(x y\right) \frac{\mathrm{dy}}{\mathrm{dx}}$

= $\frac{\mathrm{dy}}{\mathrm{dx}} \left(2 {x}^{2} y - {x}^{2} \sin \left(x y\right) + \frac{1}{y} - \tan \left(x y\right)\right) = - 2 x {y}^{2} - \cos \left(x y\right) + x y \sin \left(x y\right) + \frac{1}{x} + {y}^{2} {\sec}^{2} \left(x y\right)$

and $\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{x y \sin \left(x y\right) + \frac{1}{x} + {y}^{2} {\sec}^{2} \left(x y\right) - 2 x {y}^{2} - \cos \left(x y\right)}{2 {x}^{2} y - {x}^{2} \sin \left(x y\right) + \frac{1}{y} - \tan \left(x y\right)}$

= $\frac{{x}^{2} {y}^{2} \sin \left(x y\right) + y + x {y}^{3} {\sec}^{2} \left(x y\right) - 2 {x}^{2} {y}^{3} - x y \cos \left(x y\right)}{2 {x}^{3} {y}^{2} - {x}^{3} y \sin \left(x y\right) + x - x y \tan \left(x y\right)}$

I have solved using this method: