Bernoulli Differential Equations# If the differential equation is in the form of
$$
\begin{align}
y^{\prime}+p(x)y=q(x)y^n
\end{align}
$$
$$
\begin{align}
y^{\prime}+p(x)y=q(x)y^n
\end{align}
$$
If $n=0$, then the differential equation is linear differential equation:
$$
\begin{aligned}
y^{\prime}+p(x)y=q(x)
\end{aligned}
$$
$$
\begin{aligned}
y^{\prime}+p(x)y=q(x)
\end{aligned}
$$
If $n=1$, then the differential equation is separable differential equation:
$$
\begin{aligned}
y^{\prime}+p(x)y &=q(x)y\\
\dfrac{dy}{y} &= (q(x)-p(x))dx
\end{aligned}
$$
$$
\begin{aligned}
y^{\prime}+p(x)y &=q(x)y\\
\dfrac{dy}{y} &= (q(x)-p(x))dx
\end{aligned}
$$
If $n \neq 1, 0$, then it is said to be Bernoulli’s Differential Equation in $y$. The differential equation is neither separable, homogenous nor linear differential equation for $n \neq 0, 1$.
However, if we multiply both sides by $y^{-n}$ and by using the substitution $u = y^{1-n}$, then we get linear differential equation in $u$. Let us multiply $(1)$ with $y^{-n}$
$$
\begin{align}
y^{-n}y^{\prime}+y^{-n}p(x)y&=q(x)y^ny^{-n} \notag\\
y^{-n}y^{\prime}+y^{1-n}p(x)y&=q(x)
\end{align}
$$
$$
\begin{align}
y^{-n}\dfrac{dy}{dx}+y^{-n}p(x)y&=q(x)y^ny^{-n} \notag\\
y^{-n}\dfrac{dy}{dx}+y^{1-n}p(x)y&=q(x)
\end{align}
$$
Let $u=y^{1-n}$. Differentiating $u$ by chain rule, we get
$$
\begin{aligned}
\dfrac{du}{dx} = (1-n)y^{-n}\dfrac{dy}{dx}
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{du}{dx} = (1-n)y^{-n}\dfrac{dy}{dx}
\end{aligned}
$$
Substituting $u$ into $(2)$:
$$
\begin{align}
\dfrac{1}{(1-n)}\dfrac{du}{dx}+p(x)u &= q(x) \notag\\
\dfrac{u^{\prime}}{1-n} + p(x)u &= q(x) \notag\\
u^{\prime}+p(x)u(1-n) &= q(x)(1-n) \notag\\
u^{\prime}+P(x)u &= Q(x)
\end{align}
$$
$$
\begin{align}
\dfrac{1}{(1-n)}\dfrac{du}{dx}+p(x)u &= q(x) \notag\\
\dfrac{u^{\prime}}{1-n} + p(x)u &= q(x) \notag\\
u^{\prime}+p(x)u(1-n) &= q(x)(1-n) \notag\\
u^{\prime}+P(x)u &= Q(x)
\end{align}
$$
where $P(x) = (1-n)p(x)$ and $Q(x) = q(x)(1-n)$. It is obvious that $(3)$ is a linear differential equation.
$\textbf{\small Example: }$ Find the solution of nonlinear differential equation
$$
\begin{aligned}
x\dfrac{dy}{dx} + y = 3x^2y^{-3}
\end{aligned}
$$
$$
\begin{aligned}
x\dfrac{dy}{dx} + y = 3x^2y^{-3}
\end{aligned}
$$
$\textbf{\small Solution: }$ Observe that differential equation is Bernoulli’s Equation since
$$
\begin{aligned}
\dfrac{dy}{dx} + \dfrac{y}{x} = 3xy^{-3}
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} + \dfrac{y}{x} = 3xy^{-3}
\end{aligned}
$$
where $p(x) = \frac{1}{x}$, $q(x) = 3x^2$ and $n=-3$. Therefore, we use the substitution $u = y^{1-n} = y^{4}$. Differentiating both sides $u^{\prime} = 4y^3y^{\prime}$. Thus,
$$
\begin{aligned}
\dfrac{dy}{dx} + \dfrac{y}{x} &= 3xy^{-3}\\
y^3\dfrac{dy}{dx} + y^3\dfrac{y}{x} &= 3xy^{-3}y^3\\
y^3\dfrac{dy}{dx} + \dfrac{y^4}{x} &= 3x\\
\dfrac{1}{4}\cdot\dfrac{du}{dx} + \dfrac{u}{x} &= 3x\\
\dfrac{du}{dx} + \dfrac{4u}{x} &= 12x
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} + \dfrac{y}{x} &= 3xy^{-3}\\
y^3\dfrac{dy}{dx} + y^3\dfrac{y}{x} &= 3xy^{-3}y^3\\
y^3\dfrac{dy}{dx} + \dfrac{y^4}{x} &= 3x\\
\dfrac{1}{4}\cdot\dfrac{du}{dx} + \dfrac{u}{x} &= 3x\\
\dfrac{du}{dx} + \dfrac{4u}{x} &= 12x
\end{aligned}
$$
Using the method in here , we obtain the following integrating factor
$$
\begin{aligned}
\lambda(x) &= e^{\int p(x)\,dx}\\
&= e^{\int \frac{4}{x}\,dx}\\
&= e^{ln|x^4|}\\
&= x^4
\end{aligned}
$$
$$
\begin{aligned}
\lambda(x) &= e^{\int p(x)\,dx}\\
&= e^{\int \frac{4}{x}\,dx}\\
&= e^{ln|x^4|}\\
&= x^4
\end{aligned}
$$
Multiplying the differential equation with integrating we get
$$
\begin{aligned}
x^4\dfrac{du}{dx} + 4x^3u &= 12x^5\\
(x^4 \cdot u)^{\prime} &= 12x^5\\
\int (x^4 \cdot u)^{\prime} &= \int 12x^5\\
x^4\cdot u &= 2x^6 + C\\
u &= 2x^2 + Cx^{-4}
\end{aligned}
$$
$$
\begin{aligned}
x^4\dfrac{du}{dx} + 4x^3u &= 12x^5\\
(x^4 \cdot u)^{\prime} &= 12x^5\\
\int (x^4 \cdot u)^{\prime} &= \int 12x^5\\
x^4\cdot u &= 2x^6 + C\\
u &= 2x^2 + Cx^{-4}
\end{aligned}
$$
And finally we back substitute $u$:
$$
\begin{aligned}
y^4 &= 2x^2+Cx^{-4}\\
y &= \pm [2x^2+Cx^{-4}]^{\frac{1}{4}}
\end{aligned}
$$
$$
\begin{aligned}
y^4 &= 2x^2+Cx^{-4}\\
y &= \pm [2x^2+Cx^{-4}]^{\frac{1}{4}}
\end{aligned}
$$
Now, we will consider some discontinuities over the differential equations.
Linear Differential Equations with Discontinuous Coeffecients# Consider linear differential equation
$$
\begin{aligned}
\dfrac{dy}{dx} + p(x)y = q(x)
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} + p(x)y = q(x)
\end{aligned}
$$
if the coeffecients have discontuinity at $x_0$, then we can solve two differential equations for $x < x_0$ and $x > x_0$ such that the solution is continuous at that point. In other words, limit must be exist and equal to function at that value
$$
\begin{aligned}
\lim_{x \rightarrow \pm x_0} y(x) = y(x_0)
\end{aligned}
$$
$$
\begin{aligned}
\lim_{x \rightarrow \pm x_0} y(x) = y(x_0)
\end{aligned}
$$
$\textbf{\small Example: }$ Find a continuous solution satisfying the given differential equation and the indicated initial condition
$$
\begin{aligned}
\dfrac{dy}{dx} + p(x)y = \dfrac{1}{x}, \; y(1) = 2
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} + p(x)y = \dfrac{1}{x}, \; y(1) = 2
\end{aligned}
$$
where
$$
\begin{aligned}
p(x) =
\begin{cases}
0 & \text{if } 0 < x \leq 1\\
\dfrac{1}{x} & \text{if } 1 > x \\
\end{cases}
\end{aligned}
$$
$$
\begin{aligned}
p(x) =
\begin{cases}
0 & \text{if } 0 < x \leq 1\\
\dfrac{1}{x} & \text{if } 1 > x \\
\end{cases}
\end{aligned}
$$
Let first evaluate $0 < x \leq 1$. We have linear nonhomogenous initial value problem
$$
\begin{aligned}
\dfrac{dy}{dx} = \dfrac{1}{x}, \; y(1) = 2
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} = \dfrac{1}{x}, \; y(1) = 2
\end{aligned}
$$
Then,
$$
\begin{aligned}
\dfrac{dy}{dx} &= \dfrac{1}{x}\\
\int \dfrac{dy}{dx} &= \int \frac{1}{x}\,dx\\
y(x) &= \ln(x) + C
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} &= \dfrac{1}{x}\\
\int \dfrac{dy}{dx} &= \int \frac{1}{x}\,dx\\
y(x) &= \ln(x) + C
\end{aligned}
$$
Imposing $y(1) = 2$
$$
\begin{aligned}
y(1) = ln(1) + C &= 2\\
C &= 2
\end{aligned}
$$
$$
\begin{aligned}
y(1) = ln(1) + C &= 2\\
C &= 2
\end{aligned}
$$
Thus we obtain the solution of initial value problem is
$$
\begin{aligned}
y(x) = \ln(x) + 2, \; 0 < x \leq 1
\end{aligned}
$$
$$
\begin{aligned}
y(x) = \ln(x) + 2, \; 0 < x \leq 1
\end{aligned}
$$
For $x > 1$, we have linear nonhomogenous initial value problem
$$
\begin{aligned}
x\dfrac{dy}{dx} + y &= 1\\
\dfrac{dy}{dx} + \dfrac{y}{x} &= \dfrac{1}{x}
\end{aligned}
$$
$$
\begin{aligned}
x\dfrac{dy}{dx} + y &= 1\\
\dfrac{dy}{dx} + \dfrac{y}{x} &= \dfrac{1}{x}
\end{aligned}
$$
and thus $p(x) = \frac{1}{x}$ and $q(x) = \frac{1}{x}$. So the integrating factor is $\lambda(x) = e^{\int \frac{1}{x}dx} = x$. Using this $\lambda$
$$
\begin{aligned}
x\dfrac{dy}{dx} + y &= 1\\
(x \cdot y)^{\prime} &= 1\\
\int (x \cdot y)^{\prime} &= \int 1\\
xy(x) &= x + D\\
y(x) &= 1 + \dfrac{D}{x}
\end{aligned}
$$
$$
\begin{aligned}
x\dfrac{dy}{dx} + y &= 1\\
(x \cdot y)^{\prime} &= 1\\
\int (x \cdot y)^{\prime} &= \int 1\\
xy(x) &= x + D\\
y(x) &= 1 + \dfrac{D}{x}
\end{aligned}
$$
Imposing the condition $y(1) = 2$
$$
\begin{aligned}
2 = \lim_{x \rightarrow 1^{+}} \left(1 + \dfrac{D}{x}\right)
\end{aligned}
$$
$$
\begin{aligned}
2 = \lim_{x \rightarrow 1^{+}} \left(1 + \dfrac{D}{x}\right)
\end{aligned}
$$
Thus $D = 1$. We obtain the solution of initial value problem is
$$
\begin{aligned}
y(x) =
\begin{cases}
\ln(x) + 2 & \text{if } 0 < x \leq 1\\
1 + \dfrac{1}{x} & \text{if } 1 > x \\
\end{cases}
\end{aligned}
$$
$$
\begin{aligned}
y(x) =
\begin{cases}
\ln(x) + 2 & \text{if } 0 < x \leq 1\\
1 + \dfrac{1}{x} & \text{if } 1 > x \\
\end{cases}
\end{aligned}
$$
Ricatti’s Differential Equations# If the differential equation is in the form of
$$
\begin{aligned}
\dfrac{dy}{dx} = P(x) + Q(x)y + R(x)y^2
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} = P(x) + Q(x)y + R(x)y^2
\end{aligned}
$$
Then it is said to be “Ricatti’s differential equation” in $y$. The differential equation neither separable, homogenous nor Bernoulli’s differential equation.
If $y_1(x)$ is a particular solution of the Ricatti’s differential equation it means that it satisfies the equation
$$
\begin{aligned}
\dfrac{dy_1(x)}{dx} = P(x) + Q(x)y_1 + R(x)y_1^2
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy_1(x)}{dx} = P(x) + Q(x)y_1 + R(x)y_1^2
\end{aligned}
$$
Then the substitution $y = y_1 + v^{-1}$ transform Ricatti’s differential equation into linear differential equation in $v$.
Taking the derivative of the both sides we have
$$
\begin{aligned}
\dfrac{dy}{dx} = y_1^{\prime}(x) - v^{-2}v^{\prime}
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} = y_1^{\prime}(x) - v^{-2}v^{\prime}
\end{aligned}
$$
Substituting this into main equation we have
$$
\begin{aligned}
y_1^{\prime}(x) - v^{-2}v^{\prime} &= P(x) + Q(x)(y_1(x) + v^{-1}) + R(x)(y_1(x) + v^{-1})^2\\
&= P(x) + Q(x)y_1(x) + Q(x)v^{-1} + R(x)y_1(x)^2 + 2R(x)y_1(x)v^{-1} + R(x)v^{-2}\\
&= P(x) + [Q(x) + 2R(x)y_1(x)]v^{-1} + R(x)v^{-2}\\
- v^{-2}v^{\prime} &= [Q(x) + 2R(x)y_1(x)]v^{-1} + R(x)v^{-2}
\end{aligned}
$$
$$
\begin{aligned}
y_1^{\prime}(x) - v^{-2}v^{\prime} &= P(x) + Q(x)(y_1(x) + v^{-1}) + R(x)(y_1(x) + v^{-1})^2\\
&= P(x) + Q(x)y_1(x) + Q(x)v^{-1} + R(x)y_1(x)^2 + 2R(x)y_1(x)v^{-1} + R(x)v^{-2}\\
&= P(x) + [Q(x) + 2R(x)y_1(x)]v^{-1} + R(x)v^{-2}\\
- v^{-2}v^{\prime} &= [Q(x) + 2R(x)y_1(x)]v^{-1} + R(x)v^{-2}
\end{aligned}
$$
Since
$$
\begin{aligned}
y_1^{\prime}(x) = \dfrac{dy_1(x)}{dx} = P(x) + Q(x)y_1 + R(x)y_1^2
\end{aligned}
$$
$$
\begin{aligned}
y_1^{\prime}(x) = \dfrac{dy_1(x)}{dx} = P(x) + Q(x)y_1 + R(x)y_1^2
\end{aligned}
$$
Multiplying both sides with $v^2$
$$
\begin{aligned}
v^{\prime} &= -[Q(x) + 2R(x)y_1(x)]v - R(x)\\
v^{\prime} + [Q(x) + 2R(x)y_1(x)]v &= -R(x)
\end{aligned}
$$
$$
\begin{aligned}
v^{\prime} &= -[Q(x) + 2R(x)y_1(x)]v - R(x)\\
v^{\prime} + [Q(x) + 2R(x)y_1(x)]v &= -R(x)
\end{aligned}
$$
$\textbf{\small Example: }$ Find the solution of the initial value problem of $y_1(x) = \sin(x)$ is a particular solution of the differential equation
$$
\begin{aligned}
\dfrac{dy}{dx} = 1-\cos^2(x) + \cos(x) -2y\sin(x) + y^2, \; y(0) = 1
\end{aligned}
$$
$$
\begin{aligned}
\dfrac{dy}{dx} = 1-\cos^2(x) + \cos(x) -2y\sin(x) + y^2, \; y(0) = 1
\end{aligned}
$$
We have differential equation in the form of the Ricatti’s differential equation as follows:
$$
\begin{aligned}
P(x) &= 1-\cos^2(x)+\cos(x)\\
Q(x) &= -2\sin(x)\\
R(x) &= 1
\end{aligned}
$$
$$
\begin{aligned}
P(x) &= 1-\cos^2(x)+\cos(x)\\
Q(x) &= -2\sin(x)\\
R(x) &= 1
\end{aligned}
$$
Let $y = y_1 + v^{-1}$. Then $y = \sin(x) + v^{-1}$ and $\frac{dy}{dx} = \cos(x) - v^{-2}\frac{dv}{dx}$.
$$
\begin{aligned}
\cos(x) - v^{-2}\dfrac{dv}{dx} &= 1-\cos^2(x) + \cos(x) -2\sin(x)[\sin(x) + v^{-1}] + [\sin(x) + v^{-1}]^2\\
&= 1-\cos^2(x) + \cos(x) -2\sin^2(x) - 2\sin(x)v^{-1} + \sin^2(x) + 2\sin(x)v^{-1} + v^{-2}\\
-v^{-2}\dfrac{dv}{dx} &= 1 - (\cos^2(x) + \sin^2(x)) + v^{-2}\\
-v^{-2}\dfrac{dv}{dx} &= v^{-2}\\
\dfrac{dv}{dx} &= -1
\end{aligned}
$$
$$
\begin{aligned}
\cos(x) - v^{-2}\dfrac{dv}{dx} &= 1-\cos^2(x) + \cos(x) -2\sin(x)[\sin(x) + v^{-1}] + [\sin(x) + v^{-1}]^2\\
&= 1-\cos^2(x) + \cos(x) -2\sin^2(x) - 2\sin(x)v^{-1} + \sin^2(x) + 2\sin(x)v^{-1} + v^{-2}\\
-v^{-2}\dfrac{dv}{dx} &= 1 - (\cos^2(x) + \sin^2(x)) + v^{-2}\\
-v^{-2}\dfrac{dv}{dx} &= v^{-2}\\
\dfrac{dv}{dx} &= -1
\end{aligned}
$$
Thus $v = -x + C$ and $y = \sin(x) + v^{-1}$ implies
$$
\begin{aligned}
y(x) = \sin(x) + \dfrac{1}{C-x}
\end{aligned}
$$
$$
\begin{aligned}
y(x) = \sin(x) + \dfrac{1}{C-x}
\end{aligned}
$$
is one parameter solution of Ricatti’s equation.
$$
\begin{aligned}
y(0) = \sin(0) + \dfrac{1}{C} = \dfrac{1}{C} = 1
\end{aligned}
$$
$$
\begin{aligned}
y(0) = \sin(0) + \dfrac{1}{C} = \dfrac{1}{C} = 1
\end{aligned}
$$
Therefore, the solution of IVP
$$
\begin{aligned}
y(x) = \sin(x) + \dfrac{1}{1-x}
\end{aligned}
$$
$$
\begin{aligned}
y(x) = \sin(x) + \dfrac{1}{1-x}
\end{aligned}
$$