What is the general solution of the differential equation ?  xdy=(y^2-3y+2) dx

Nov 7, 2017

$y = \frac{A x - 2}{A x - 1}$

Explanation:

We have:

$x \mathrm{dy} = \left({y}^{2} - 3 y + 2\right) \mathrm{dx}$

This is a First Order separable DE, so we can "separate the variables", to get:

$\int \setminus \frac{1}{{y}^{2} - 3 y + 2} \setminus \mathrm{dy} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$

The RHS can be integrated directly, and for the LHS we can use partial fraction decomposition:

$\frac{1}{{y}^{2} - 3 y + 2} \equiv \frac{1}{\left(y - 1\right) \left(y - 2\right)}$
$\text{ } = \frac{A}{y - 1} + \frac{B}{y - 2}$
$\text{ } = \frac{A \left(y - 2\right) + B \left(y - 1\right)}{\left(y - 1\right) \left(y - 2\right)}$

$1 \equiv A \left(y - 2\right) + B \left(y - 1\right)$

Where $A , B$ are constants that are to be determined. We can find them by substitutions (In practice we do this via the "cover up" method:

Put $y = 1 \implies 1 = - A \implies A = - 1$
Put $y = 2 \implies 1 = B \implies B = 1$

So we can now write:

$\int \setminus \frac{- 1}{y - 1} + \frac{1}{y - 2} \setminus \mathrm{dy} = \int \setminus \frac{1}{x} \setminus \mathrm{dx}$

Which we can now integrate to give:

$- \ln | y - 1 | + \ln | y - 2 | = \ln | x | + \ln A$
$\therefore \ln \left(\frac{y - 2}{y - 1}\right) = \ln A x$
$\therefore \frac{y - 2}{y - 1} = A x$

Which we can re-arrange:

$y - 2 = \left(y - 1\right) A x$

$\therefore y - 2 = A x y - A x$
$\therefore y - A x y = 2 - A x$
$\therefore y \left(1 - A x\right) = 2 - A x$

$\therefore y = \frac{2 - A x}{1 - A x}$

$\therefore y = \frac{A x - 2}{A x - 1}$