Integrating both sides of an equation with respect to different variables
Why is it legitimate to solve the differential equation $\frac{dy}{dx}=\frac{y}{x}$ by taking $\int \frac{1}{y}\ dy=\int \frac{1}{x}\ dx$?