# Nonlinear first order ODE

1. Jan 22, 2013

### Mangoes

1. The problem statement, all variables and given/known data

$$(y^2 + xy)dx - x^2dy = 0$$

3. The attempt at a solution

Put it into derivative form.

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

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

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

I recognized this as a Bernoulli equation where n = 2.

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

Plan to make a substitution of $v = y^{-1}$ and $\frac{dv}{dx} = -y^{-2} \frac{dy}{dx}$

$$-\frac{dv}{dx} + \frac{-1}{x}v = \frac{1}{x^2}$$

$$\frac{dv}{dx} + \frac{1}{x}v = \frac{-1}{x^2}$$

$$u(x) = e^{\int{\frac{1}{x}}dx}$$

$$u(x) = x$$

$$\int{x\frac{dv}{dx} + v} = \int{\frac{-1}{x}}$$

LHS is product of product rule.

$$xv = -lnx + c$$

Since v = y^(-1)

$$\frac{x}{y} = ln{\frac{c}{x}}$$

You could arrange the above equation into various forms, but I see no way to arrange it into the form in the answer key:

$$x + yln{|x|} = cy$$

I've checked again and again and can't see where I'm going wrong with this...

2. Jan 22, 2013

### voko

Recall what the logarithm of a ratio is.

3. Jan 22, 2013

### HallsofIvy

Staff Emeritus
Strictly speaking this should be
$$\frac{x}{y} = ln{\left|\frac{c}{x}\right|}$$
and, of course, $ln|c/x|= ln|c|- ln|x|$