# How do you differentiate xy^2 + xy = 12?

##### 2 Answers
Apr 14, 2015

Try this, remembering that $y$ is function of $x$: Apr 14, 2015

You start by assuming the equation defines $y$ as a function of $x$ (the method we're about to use is called "implicit differentiation" because $y$ has not been solved for explicitly in terms of $x$). Then you differentiate both sides with respect to $x$, using the Product Rule and Chain Rule to get the following (using Lebniz notation):

${y}^{2} + 2 x y \setminus \frac{\mathrm{dy}}{\mathrm{dx}} + y + x \setminus \frac{\mathrm{dy}}{\mathrm{dx}} = 0.$

This is an algebra equation that you can now solve for the derivative $\frac{\mathrm{dy}}{\mathrm{dx}}$ to get:

$\setminus \frac{\mathrm{dy}}{\mathrm{dx}} = \setminus \frac{- {y}^{2} - y}{2 x y + x} .$

If this is confusing, it might be less confusing if you write $y = f \left(x\right)$ and then write the original equation as $x {\left(f \left(x\right)\right)}^{2} + x f \left(x\right) = 12$. Now when you differentiate both sides with respect to $x$, you'd write the initial result as

${\left(f \left(x\right)\right)}^{2} + 2 x f \left(x\right) f ' \left(x\right) + f \left(x\right) + x f ' \left(x\right) = 0$

and then solve for $f ' \left(x\right)$ to get

$f ' \left(x\right) = \setminus \frac{- {\left(f \left(x\right)\right)}^{2} - f \left(x\right)}{2 x f \left(x\right) + x} .$

To use this derivative to find the slope of the curve at a specific value of $x$, you'd also have to find a corresponding value of $y$ and plug both numbers into the equation for the derivative. For example, if $x = 1$, then the original equation becomes ${y}^{2} + y = 12$ or ${y}^{2} + y - 12 = 0$ or $\left(y + 4\right) \left(y - 3\right) = 0$, giving two corresponding values of $y$: $y = - 4$ and $y = 3$.

The slope of the curve at $\left(x , y\right) = \left(1 , - 4\right)$ would be $\setminus \frac{\mathrm{dy}}{\mathrm{dx}} = \setminus \frac{- {\left(- 4\right)}^{2} - \left(- 4\right)}{2 \setminus \cdot 1 \setminus \cdot \left(- 4\right) + 1} = \setminus \frac{- 12}{- 7} = \setminus \frac{12}{7}$ and the slope of the curve at $\left(x , y\right) = \left(1 , 3\right)$ would be $\setminus \frac{\mathrm{dy}}{\mathrm{dx}} = \setminus \frac{- {\left(3\right)}^{2} - \left(3\right)}{2 \setminus \cdot 1 \setminus \cdot \left(3\right) + 1} = \setminus \frac{- 12}{7} = - \setminus \frac{12}{7}$.

Here's a picture of this situation: 