# How do you find the derivative of y = 2x+ cos(xy) ?

##### 1 Answer
Dec 21, 2015

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

#### Explanation:

$y = 2 x + \cos \left(x y\right)$
Differentiate with respect to x on both the sides.

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d \left(2 x\right)}{\mathrm{dx}} + \frac{d \left(\cos \left(x y\right)\right)}{\mathrm{dx}}$
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 \frac{\mathrm{dx}}{\mathrm{dx}} - \sin \left(x y\right) \cdot \frac{d \left(x y\right)}{\mathrm{dx}}$ Chain rule
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 - \sin \left(x y\right) \cdot \left\{x \cdot \frac{\mathrm{dy}}{\mathrm{dx}} + y \frac{\mathrm{dx}}{\mathrm{dx}}\right\}$ Product rule.
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 - \sin \left(x y\right) \cdot \left\{x \frac{\mathrm{dy}}{\mathrm{dx}} + y\right\}$
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 - x \sin \left(x y\right) \frac{\mathrm{dy}}{\mathrm{dx}} - y \cdot \sin \left(x y\right)$
dy/dx + x sin(xy) dy/dx) = 2 - y sin(xy)  collecting dy/dx together on one side of the equation.
$\left(1 + x \sin \left(x y\right)\right) \frac{\mathrm{dy}}{\mathrm{dx}} = 2 - y \sin \left(x y\right)$

To solve for dy/dx we divide both sides by $\left(1 + x \sin \left(x y\right)\right)$

We get $\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{2 - y \sin \left(x y\right)}{1 + \sin \left(x y\right)}$