# Who can find the solution to this ODE?

1. Aug 14, 2009

### Cody Palmer

Looking for the solution to the following ODE:
$$$\frac{dy}{dx} = \frac{x^2y^2 - y}{x}$$$

2. Aug 14, 2009

### rock.freak667

rewrite it as

$$\frac{dy}{dx}=xy^2-\frac{y}{x} \Rightarrow \frac{dy}{dx}+\frac{y}{x}=xy^2$$

Last edited by a moderator: May 4, 2017
3. Aug 14, 2009

### Cody Palmer

I had not thought of turning it into a Bernoulli equation. Actually though I found out another, more elementary way of doing it using exact differentials:
$$$\frac{dy}{dx} = \frac{x^2y^2 - y}{x} \Rightarrow x dy = x^2y^2 dx - y dx$$$
Divide through by $$y^2$$
$$$x\frac{1}{y^2} dy = x^2 dx - \frac{1}{y} dx \Rightarrow x\frac{1}{y^2} dy - (- \frac{1}{y}) dx = x^2 dx$ $\frac{x\frac{1}{y^2} dy - (- \frac{1}{y}) dx}{x^2} = dx$$$
The LHS is the exact differential for the quotient $$\frac{-\frac{1}{y}}{x}$$
So we can integrate both sides to get
$$$-\frac{1}{xy} = x + c \Rightarrow y=-\frac{1}{x^2 + cx}$$$

4. Aug 14, 2009

### coomast

Nice Cody Palmer, very nice

coomast