Friday, October 15, 2021

Resolution of differential equations of first order by the method of separable variables

 A non-linear first order differential equation is separable if it can be written in this form:

N(y)dy/dx = M(x)

In order for such a differential equation to be separable, all the y's must be in the first side and all the x's must be in the second side. The independent variable can be in the second side and the dependent variable on the first side. As long as the variables are separated. it doesn't matter. The variable y and x should not be together. They should be separated with one variable in one side and the other in the other side.

Let's integrate both sides of the equation:

∫N(y)(dy/dx).dx = ∫M(x)dx

Let's do a change of variable: u = y(x) . Then we have:

du/dx = y'(x)  

          = dy/dx

du = dy/dx.dx

Substituting y and (dy/dx)dx we have:

∫N(u)du = ∫M(x)dx

In order to solve this equation we have to solve the second integral and substitute for u in the first one.

Let's say that instead of the variable u, we have the variable y the above equation can be written as: ∫N(y)dy = ∫M(x)dx

The solution of this equation can lead to the solution of the differential equation. After calculating the two integrals we arrive to an implicit solution that can lead to an explicit one. An implicit solution is a solution where the value of isn't yet found.

Example: Solve the differential equation dy/dx = (x² - 4) (3y+2)

Let's separate the variables by having y and its derivative in the first side and the x in the second side. We divide both sides by 3y + 2 in order to have x in the second side and y in the first side

(dy/dx)(1/3y+2) = x² - 4

Let's multiply  both sides by dx and simplify by dx in the first side

dx(dy/dx) (1/3y+2) = dx(x² - 4)

dy/3y + 2 = dx(x² - 4)

Let's integrate both sides:

∫dy/ (3y+2) = ∫(x² - 4)dx

The derivative of the numerator being near of that of the numerator, we can do a change of variable by writing 3y + 2 = u. By derivating this expression we get:

du/dy = 3  dy = 1/3du

The above equality becomes by substituting dy and du

∫(1/3du)/u  = 1/3x³- 4x + C

∫(1/3du) (1/u) = 1/3x³- 4x + C

1/3∫ du/u =  1/3x³- 4x + C 

1/3lnu + K = 1/3x³- 4x + C  with u>0 because we can't take the log of negative numbers

Let's substitute u and reduce to the same denominator i:

1/3ln(3y + 2) + K = 1/3x³ - 12x/3 + 3C/3

Let's simplify by 3:

ln(3y + 2) + 3k = x³ - 12x + 3C

ln(3y + 2) = x³ - 12x + 3C-3K

We substitute 3C-3K by another variable

ln(3y + 2) = x³ - 12x + K₁

By definition of logarithm, if lnx = y, then logâ‚‘x = y. Therefore e^y = x

The above equation becomes e^(x³ - 12x + K₁ ) = 3y + 2

y = 1/3[ e^(x³ - 12x +  K₁) - 2]

Practice

Solve dy/dx = 2xy +3y -4x-6