# I How do you solve this equation?

1. Jun 18, 2017

### davidge

How can we solve a differential equation of the form $$a(r)Y' = Y - Y^2$$ for $Y \equiv \phi(r)$? An equation of this form appears in https://en.wikipedia.org/wiki/Deriv...field_equations_to_find_A.28r.29_and_B.28r.29. If there were not the $Y^2$, that would be a easy to solve differential equation: just a first order linear differential equation. The problem is the $Y^2$ though.

2. Jun 18, 2017

### Ssnow

You must use the separable variables method.

3. Jun 18, 2017

### Ssnow

Note: In order to have a closed form for the solution $Y$ you must integrate $\int \frac{dr}{a(r)}$, so it depends by the expression of $a(r)$ ...
Ssnow

4. Jun 18, 2017

### Staff: Mentor

5. Jun 18, 2017

### davidge

Just too easy! Thanks for the hint

$$a(r) \frac{dy}{dr} = y - y^2 \\ \frac{dy}{y} + \frac{dy}{1-y} = \frac{dr}{a(r)} \\ \text{ln}y + c_1 - \text{ln}(1-y) + c_2 = \int \frac{1}{a(r)}\ dr \\ C \equiv c_1 + c_2 \\ \text{ln}\bigg(\frac{y}{1-y}\bigg) + C = \int \frac{1}{a(r)} \ dr \\ \frac{y}{1-y} = e^{\int \frac{1}{a(r)}\ dr - C} \\ y\bigg(1- e^{\int \frac{1}{a(r)}\ dr - C}\bigg) = e^{\int \frac{1}{a(r)}\ dr - C} \\ \Rightarrow y = \frac{e^{\int \frac{1}{a(r)}\ dr - C}}{\bigg(1- e^{\int \frac{1}{a(r)}\ dr - C}\bigg)}$$