Discrepancy in finding derivative of implicit equation

I was learning implicit differentiation and came across a discrepancy in finding $$\frac{\mathrm{d}y}{\mathrm{d}x}$$ of $$y=x+\frac{1}{y}$$: when differentiating without simplifying there is no $$x$$ in $$\frac{\mathrm{d}y}{\mathrm{d}x}$$, but after simplifying there is.

When I simplified the equation to $$y^2=xy+1$$ I got the right answer. Why did this happen?

I could only conclude it has to do something with how implicit functions are defined. I could not find anything on the internet.

• What's the discrepancy you are facing? Aug 6 '21 at 7:43
• @Anurag A when differentiating without simplifying you see there will be no x in dy/dx but after simplifying there is Aug 6 '21 at 7:46

By differentiating $$y=x+\frac{1}{y}$$ we find $$y'=1-\frac{y'}{y^2} \tag{1}$$ On the other hand, $$y^2=xy+1$$ gives $$2yy'=y+xy'\tag{2}$$ (1) and (2) are both valid equations.
Infact, by using $$x=y-\frac{1}{y}$$ in (2), we remove $$x$$ from (2) and we get (1): $$2yy'=y+xy'=y+\left(y-\frac{1}{y}\right)y'$$ that is $$yy'=y-\frac{y'}{y}$$ and after dividing by $$y$$ (recall that here $$y\not=0$$), $$y'=1-\frac{y'}{y^2}.$$ By reversing the process we may obtain (2) from (1).