Differentiating implicitly gets us

#2y+2xdy/dx = 2y dy/dx#

So that, #dy/dx = y/(y-x)#

**Further discussion**

#2xy=y^2# is equivalent to #y^2-2xy = 0# which in turn is equivalent to #y(y-2x) = 0#.

The graph of this equation consists of the line #y=0# (the #x# axis) and the line #y=2x#

graph{y(y-2x)=0 [-17.19, 14.86, -9.43, 6.59]}

**Description of Cases**

At #(0,0)# there is no derivative.

For points #(x,0)# with #x != 0#, we have #dy/dx = 0#.

Other points on the graph lie on #y=2x# alone and have derivative #dy/dx = 2#

**Rewriting the derivative**

Our result above says #dy/dx = y/(y-x)#.

For #y != 0#, we can write #dy/dx = y^2/(y^2-xy)#

Since #y^2 = 2xy# (see the original equation), we can write

#dy/dx = y^2/(2xy-xy) = y^2/(xy) = y/x#

Checking the three cases, we see that

At #(0,0)# we have #y/x# does not exist..

For points #(x,0)# with #x != 0#, we have #y/x = 0#.

Other points on the graph have #y=2x# alone and have derivative #y/x = (2x)/x = 2#.

Therefore, #dy/dx = y/x# is also true.