Differential equation for straight lines through origin

Sketch a few members of the straight lines through the origin. By eliminating parameters, derive a differential equation which describes this family.

Attempt

$\displaystyle y = mx$ (since there are infinite gradients)

$\displaystyle \frac{dy}{dx} = m$

but the correct answer was: $\displaystyle \frac{dy}{dx} = \frac{y}{x}$. I am not sure why.

Re: Differential equation for straight lines through origin

y=mx+c

Since, c=0

m=y/x

Differentiating on both sides....

0=y dx - x dy / y²

1 dx/y - x dy/y² =0

1 dx/y = x dy/ y²

1 dx / x = 1 dy / y

y/x = dy/dx

And that's your required answer ��