Separable Differential Equation (DE)
\(N(x)+M(y)\frac{dy}{dx}=0,\) where \((N(x)\) is a function of \(x\) only and \(M(y)\) is a function of \(y\) only.
To solve: Separate the equation so that all \(y\)’s are on one side and all \(x\)’s are on the other side. Then, integrate.
Example. Find the general solution of \((x^{2}+4)\frac{dy}{dx}=xy.\)
Solution: Note that \(y = 0\) is a solution. To find the other solutions, assume that \(y ≠ 0\) and separate the variable as follows:
$$\begin{aligned}(x^2+4)&\frac{dy}{dx}=xy\\\frac{1}{y}dy&=\frac{x}{x^2+4}dx\end{aligned}$$
Now, integrate, and try to find an explicit equation for \(y\) (if possible).
$$\begin{aligned}
\int\frac{1}{y}dy& =\int\frac{x}{x^{2}+4}dx \\
\ln|y|& =\frac{1}{2}\mathrm{ln}\Big|x^{2}+4\Big|+C \\
e^{\ln|y|}& =e^{\frac{1}{2}\mathrm{ln}\left|x^{2}+4\right|+C} \\
\left|y\right|& =e^{ln|x^{2}+4|^{\frac{1}{2}}}e^{C} \\
\text{y}& =\pm A\sqrt{x^{2}+4},\quad\mathrm{where}A=e^{C}
\end{aligned}$$
First Order Linear Differential Equation (DE)
\(\frac{dy}{dx}+P(x)y=Q(x),\) where \(P(x)\) and \(Q(x)\) are continuous functions.
To solve: The DE must be in the above form with only the coefficient of 1 in front of \(\frac{dy}{dx}.\) Compute the integrating factor, \(I(x)=e^{\int P(x)dx}.\) Multiply the integrating factor across the DE and integrate.
Example. Solve the differential equation \(\frac{x}{2}y^{\prime}+y=6x^{2},\) where x >0.
Solution. DE rewritten: $$y'+\frac{2}{x}y=12x$$
Integrating factor: $$\begin{aligned}I(x)&=e^{\int P(x)dx}=e^{\int\frac{2}{x}dx}=e^{2\ln x}\\&=e^{\ln(x^{2})}=x^{2}\end{aligned}$$
Multiply the DE by the integrating factor, and simplify.
$$\begin{aligned}
x^{2}\left(y^{\prime}+{\frac{2}{x}}y\right)& =x^{2}(12x) \\
x^{2}y^{\prime}+2xy& =12x^{3} \\
(yx^{2})^{\prime}& =12x^{3}
\end{aligned}$$
The main idea is to recognize that the left-hand side of the DE is the product rule applied to the product of the unknown function \(y\) and the integrating factor \(I(x)\), that is \((yx^{2})^{\prime}=y^{\prime}x^{2}+2xy.\)
Now, integrate the DE, and find an explicit equation for y.
$$\begin{aligned}
\int(yx^{2})^{\prime}dx& =\int12x^{3}dx \\
yx^{2}& =3x^{4}+C \\
\text{1}& =\frac{1}{x^{2}}(3x^{4}+C)=3x^{2}+\frac{C}{x^{2}}
\end{aligned}$$