# What is the general solution of the differential equation y-xy'=3-2x^2y'?

## Symbolab says the answer is $y = \frac{x {c}_{1}}{2 x - 1} + 3$?

Apr 6, 2018

$y = 3 + \frac{C x}{2 x - 1}$

#### Explanation:

We have:

$y - x y ' = 3 - 2 {x}^{2} y '$

Which we can rearrange and collect terms to get:

$2 {x}^{2} y ' - x y ' + y = 3$

$\therefore \left(2 {x}^{2} - x\right) y ' = 3 - y$

$\therefore \frac{1}{3 - y} \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1}{x \left(2 x - 1\right)}$

Which is a separable ODE, so if we "separate the variables" then:

$- \int \setminus \frac{1}{y - 3} \setminus \mathrm{dy} = \int \setminus \frac{1}{x \left(2 x - 1\right)} \setminus \mathrm{dx}$

We can decompose the RHS integral into partial fractions, and we gain:

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

And integrating we get:

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

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

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

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

$\therefore y = 3 + \frac{C x}{2 x - 1} \setminus \setminus \setminus \setminus$ where $C = \frac{1}{A} \setminus \setminus \setminus \setminus$ QED

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Side Note on the Constant of Integration:

In order to answer the follow-up query where to did $\ln A$ come from, it is is easier to explain in the solution in FAQ form.

Why do we have (or need) a constant in a DE solution?

Quite simply because the derivative of any constant is zero, then when we integrate (which we do solve a DE) there is always the possibility that the original DE solution contained a constant,. eg:

$\left\{\begin{matrix}y = 2 x + 1 \\ y = 2 x + 2 \\ y = 2 x + c\end{matrix}\right. \implies \frac{\mathrm{dy}}{\mathrm{dx}} = 2$

So the "General" solution of the DE:

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 \text{ is } y = 2 x + C$

Every order of the DE will introduce a constant, so a Second Order equation will introduce two (independent) constants:

Why is the constant always called $C$?

It isn't - it can be called $C$, $A$, $k$ or anything else suitable. It is just a mathematical symbol used to denote a constant. commonly it is called $C$ (for constant, as is frequently used when we perform an integration) but equally common alternatives vary according to the solution, eg: $k$ for exponential decay $A , B$ for sinoisiodal solutions

e.g.: $y = {e}^{- k t}$, $y = A \cos \left(\omega t\right) + B \sin \left(\omega t\right)$

In the above solution $\ln A$ was the constant, why?

We could have used $C$ and gained the solution

$- \ln \left(y - 3\right) = \ln \left(2 x - 1\right) - \ln x + C$

Then we could write $C = \ln {e}^{C}$ (using the rules of logs), so the final solution would be

$y = 3 + \frac{\frac{1}{{e}^{C}} x}{2 x - 1}$

There is nothing wrong with this, the solution is still valid, $\frac{1}{e} ^ C$ is still a constant but by writing the constant in a different form we can gain a simpler solution. In this case seeing that all terms involved a logarithm, then writing the constant as the log of a constant simplified things, this is a common technique.

E.g. If my original question involved constant $\alpha$ and $\beta$ and upon solving the DE we used $C$ is the constant and gained a solution of the form:

$y = \alpha \cos \left(\omega t\right) + \beta \sin \left(\omega t\right) + \frac{\tan \left(\alpha + \beta\right)}{\cos \alpha + \sin \beta} + \alpha + \beta + C$

We can more concisely write this as:

$y = \alpha \cos \left(\omega t\right) + \beta \sin \left(\omega t\right) + A$

You will often encounter a solution whose solution itself generates a constant term, and this constant then mysteriously vanishes because it is incorporated into the constant that came form integration

Apr 6, 2018

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

#### Explanation:

Now, when dealing with separable DEs, the objective is to have one side in terms of $y , \mathrm{dy}$ and the other in terms of $x , \mathrm{dx}$. This one looks a bit rough to separate, but after a few steps, it's not so bad.

So,

$y - x y ' = 3 - 2 {x}^{2} y '$

We can move $2 {x}^{2} y '$ over to the left.

$2 {x}^{2} y ' - x y ' = 3 - y$

Factor out $y ' .$

$y ' \left(2 {x}^{2} - x\right) = 3 - y$

We can move $2 {x}^{2} - x$ to the right, entailing division by it on the right, and $3 - y$ to the left, entailing division by it on the left. Also, replace $y '$ with $\frac{\mathrm{dy}}{\mathrm{dx}}$.

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

$\frac{\mathrm{dy}}{3 - y} = \frac{\mathrm{dx}}{2 {x}^{2} - x}$

We then integrate both sides.

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

The integral on the right side looks a bit more complex. It will require partial fraction decomposition of the integrand, $\frac{1}{2 {x}^{2} - x}$

Factor the denominator and decompose in accordance with the rules for decomposition involving linear factors in the denominator.

$\frac{1}{x \left(2 x - 1\right)} = \frac{A}{x} + \frac{B}{2 x - 1}$

Add up the right side.

$\frac{1}{x \left(2 x - 1\right)} = \frac{A \left(2 x - 1\right) + B x}{\left(x\right) \left(2 x - 1\right)}$

Equate numerators to find $A , B .$

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

Let $x = 0.$

$1 = - A , A = - 1$

Let $x = \frac{1}{2.}$

$1 = \frac{1}{2} B , B = 2$

Thus, $\int \frac{\mathrm{dx}}{x \left(2 {x}^{2} - 1\right)} = - \int \frac{\mathrm{dx}}{x} + 2 \int \frac{\mathrm{dx}}{2 x - 1}$

These are simple integrals.

$- \int \frac{\mathrm{dx}}{x} + \frac{1}{2} \int \frac{\mathrm{dx}}{2 x - 1} = - \ln | x | + \ln | 2 x - 1 |$

Combine the logarithms to get $\ln | \frac{2 x - 1}{x} |$

The right side is much nicer. $\int \frac{\mathrm{dy}}{3 - y} = - \ln | 3 - y |$

Then, we have

$- \ln | 3 - y | = \ln | \frac{2 x - 1}{x} | + C$

Do not forget that constant, it is important. We would technically have two constants, one from each side, but we absorbed them into the single constant on the right.

$\ln | 3 - y | = - \ln | \frac{2 x - 1}{x} | + C$

This implicit solution is not good enough, we need an explicit solution. Exponentiate both sides.

${e}^{\ln | 3 - y |} = {e}^{\left(- \ln | \frac{2 x - 1}{x}\right) | + C}$

Recalling that ${e}^{\ln} a = a , {e}^{a \cdot b} = {e}^{a} {e}^{b}$:

$| 3 - y | = {e}^{- \ln | \frac{2 x - 1}{x} |} \cdot {e}^{C}$

$- \ln | \frac{2 x - 1}{x} | = \ln | {\left(\frac{2 x - 1}{x}\right)}^{-} 1 | = \ln | \frac{x}{2 x - 1} |$

$| 3 - y | = {e}^{\ln | \frac{x}{2 x - 1} |} \cdot {e}^{C}$

$| 3 - y | = | \frac{x}{2 x - 1} | {e}^{C}$

Omit the absolute values.

$3 - y = \pm {e}^{C} \left(\frac{x}{2 x - 1}\right)$

Let $A = \pm {e}^{C}$, this is just an arbitrary constant.

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

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

This does fall in line with the answer Symbolab gave me.