How do you find (dy)/(dx) given xcos(2x+3y)=ysinx?

Apr 15, 2017

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

Explanation:

We have:

$x \cos \left(2 x + 3 y\right) = y \sin x$

Method 1 - Implicit Differentiation

Applying the product rule and chain rule we get:

$\left(x\right) \left(\frac{d}{\mathrm{dx}} \cos \left(2 x + 3 y\right)\right) + \left(\frac{d}{\mathrm{dx}} x\right) \left(\cos \left(2 x + 3 y\right)\right) = \left(y\right) \left(\frac{d}{\mathrm{dx}} \sin x\right) + \left(\frac{d}{\mathrm{dx}} y\right) \left(\sin x\right)$

$\therefore x \left(\frac{d}{\mathrm{dx}} \cos \left(2 x + 3 y\right)\right) + \cos \left(2 x + 3 y\right) = y \cos x + \sin x \frac{\mathrm{dy}}{\mathrm{dx}}$

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

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

Now we multiply out and collect terms:

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

Factoring out $\frac{\mathrm{dy}}{\mathrm{dx}}$ we get:

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

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

Method 2 - Using the Implicit Function Theorem:

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \frac{\frac{\partial f}{\mathrm{dx}}}{\frac{\partial f}{\mathrm{dy}}}$

Where:

$f \left(x , y\right) = 0$

We have:
Let:

$f \left(x , y\right) = x \cos \left(2 x + 3 y\right) - y \sin x$

Then the partial derivatives are:

 (partial f)/(partial x) = (x)((partial )/(partial x) cos(2x+3y))+ ((partial )/(partial x)x)(cos(2x+3y)) - ycos x

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = x \left(- 2 \sin \left(2 x + 3 y\right)\right) + \cos \left(2 x + 3 y\right) - y \cos x$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = - 2 x \sin \left(2 x + 3 y\right) + \cos \left(2 x + 3 y\right) - y \cos x$

And:

$\frac{\partial f}{\partial y} = - x \sin \left(2 x + 3 y\right) \left(3\right) - \sin x$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = - \left(3 x \sin \left(2 x + 3 y\right) + \sin x\right)$

And so:

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