# Solving first order ordinary differential equation

I was trying to compute the solution for the following differential equation: $$x(2x^2ylog(y)+1)y'=2y$$

As I couldn't get anywhere I checked the hints in the textbook which are the following:

Reverse the way of thinking, namely view $x$ as a function and $y$ as a variable, considering that $y=\frac{dy}{dx}=\frac{1}{\frac{dx}{dy}} => y'=\frac{1}{x'}$ . Then it goes to say that the equation now becomes $$x'-\frac{x}{2y}=log(y)x^3$$

This final equation is obviously simple enough to solve, but how on Earth did they arrive there?

• Are you sure it's not $x'-\frac{x}{2y}=log(y)x^3$? – user103828 Feb 2 '15 at 21:44
• You're right, I'll correct it right away – johnweas Feb 2 '15 at 21:45

Substitute $y'=\frac{1}{x'}$, \begin{align*} \frac{x(2x^2y \log(y)+1)}{x'}=2y \\ \Rightarrow \frac{x(2x^2y \log(y)+1)}{2y}=x' \\ \Rightarrow x^3 \log(y) + \frac{x}{2y}=x' \\ \end{align*} and rearranging gets you to your equation.