# Quotient rule and implicit differentiation

Find $$\frac{dy}{dx}$$ for $$x^2=\frac{x-y}{x+y}$$.

I have solved this in two ways.

First, I multiplicated the whole equation by $$x+y$$ and then I calculated the implicit derivative. I got the following solution:

$$\frac{1-3x^2-2xy}{x^2+1}$$

So far so good. When I calculated the implicit derivative of the original expression using the quotient rule though, I got a different solution, i.e.:

$$-\frac{x(y+x)^2-y}{x}$$

I have tried using Wolfram and I got the same results.

Can anyone explain to me why I get different solutions ?

• Seeing your step-by-step workings would be more helpful to us in addressing any potential errors (because we don't know how you worked it out). – Eevee Trainer Mar 22 at 8:11
• The results you get from Wolfram or any other computational engine are also different depending on whether you start to compute the derivative right away or first multiply by the denominator. – Pawel Mar 22 at 8:41
• Oh, I see, I misread. My bad. – Eevee Trainer Mar 22 at 8:41
• Related to, and essentially a duplicate of, math.stackexchange.com/q/1938228/265466 and math.stackexchange.com/q/2019620/265466. – amd Mar 22 at 8:56
• Thanks, now I see. The results just seem to be different but in reality they aren't. – Pawel Mar 22 at 9:38

Note that solving $$\quad x^2=\frac{x-y}{x+y}\quad$$ for $$y$$ gives $$\quad y=x\frac{1-x^2}{1+x^2}$$
Your first solution : $$\frac{1-3x^2-2xy}{x^2+1} =\frac{1-3x^2-2x\left(x\frac{1-x^2}{1+x^2} \right)}{x^2+1} = \frac{1-4x^2-x^4}{(1+x^2)^2}$$
Your second solution : $$-(x+y)^2+\frac{y}{x}=-\left(x+x\frac{1-x^2}{1+x^2}\right)^2+\frac{1}{x}\left(x\frac{1-x^2}{1+x^2}\right)=\frac{1-4x^2-x^4}{(1+x^2)^2}$$ Thus $$\frac{1-3x^2-2xy}{x^2+1}=-(x+y)^2+\frac{y}{x}$$