First-order linear differential equations.

First-order linear equations.

The equation $$y'+P(x)y=Q(x)\qquad (1)$$ is called linear. To solve it, one needs to make a substitution of variables $y=u(x)v(x),$ where $u(x)$ is a solution to the homogeneous equation $u'+P(x)u=0.$ This equation is solved by the method of separation of variables.

Next, we perform the inverse substitution. $y'=(uv)'=u'v+uv'.$ Consequently,

$$u'v+v'u+P(x)uv=Q(x)$$

$$v(u'+P(x)u)+v'u=Q(x).$$

Note that $u'+P(x)u=0.$ Consequently, we obtain an equation with separable variables.$$v'u=Q(x)\\ v'=\frac{Q(x)}{u(x)}\Rightarrow v(x)=\int\frac{Q(x)}{u(x)}dx+C.$$

Some equations become linear if we swap the dependent variable and the independent variable. For example, the equation $y=(2x+y^3)y',$ where $y$ is a function of $x,$ is nonlinear. Let's express it in differentials: $$ydx-(2x+y^3)dy=0.$$ Since $x$ and $dx$ enter linearly into this equation, the equation will be linear if we consider $x$ as the function to be found and $y$ as the independent variable. This equation can be written in the form $$\frac{dx}{dy}-\frac{2}{y}x=y^2$$ and is solved similarly to equation (1).

To solve the Bernoulli equation, that is, the equation $$y'+a(x)y=b(y)y^n, \qquad (n\neq 1),$$ one should divide both sides by $y^n$ and make the substitution $\frac{1}{y^{n-1}} = z.$ After the substitution, a linear equation is obtained, which can be solved by the method described above.

Riccati's equation.

The Riccati equation, i.e., the equation $$y'+a(x)y+b(x)y^2=c(x),$$ is not solvable in quadratures in the general case. However, if one particular solution $y_1(x)$ is known, then by substituting $y = y_1(x) + z,$ the Riccati equation is reduced to a Bernoulli equation and thus can be solved in quadratures.

Sometimes it is convenient to choose a particular solution based on the form of the free term of the equation (the term that does not contain $y$). For example, for the equation $y'+y^2=x^2-2x$, in the left side, there will be terms similar to the terms in the right side if we take $y = ax + b.$ By substituting into the equation and equating coefficients at similar terms, we find $a$ and $b$ (if a particular solution of the specified form exists, which is not always the case). Another example: for the equation $y'+2y^2=\frac{6}{x^2},$ the same reasoning prompts us to look for a particular solution in the form $y=\frac{a}{x}.$ By substituting $y=\frac{a}{x}$ into the equation, we find the constant $a.$