You may recall that the inverse of a derivative is the integral. For some differential equations, we can solve simply by integrating both sides, as long as each side only has one variable. These type of differential equations are called separable. A first-order separable differential equation can be written in the form:
\(\cfrac{dy}{dx} = g(x)f(y)\)
\(M(x)dx + N(y)dy = 0\)
We can then separate the functions, integrate on both sides and isolate for \(y\). A simple example is to consider the DE \(\cfrac{dy}{dx} = y\). We know the solution to this equation is \(y = e^x\) since the derivative is itself.
\( \cfrac{dy}{dx} = y\)
\( \cfrac{dy}{y} = dx\)
\( \int {\cfrac{dy}{y}} = \int {dx}\)
\( \ln{y} + C_1 = x + C_2\)
\( \ln{y} = x + C_3\)
\( e^{\ln{y}} = e^{x + C_3}\)
\( y = e^{c_3}e^{x}\)
\(y = Ce^{x}\)
Here, we could take \(C = 1\) for the simplest solution or use the initial value to solve for the particular solution.
Is the equation \(y^{'} - (x+y) \sin {x} = 0\) separable?
We attempt to write the DE in the form \( \cfrac{dy}{dx} = g(x)f(y)\), however are unsuccessful:
\(y^{'} = (x+y) \sin {x}\)
\(y^{'} = x \sin {x} + y \sin {x}\)
Thus, the DE is not separable.
Solve the equation \(\cfrac{dy}{dx} = \cfrac{2x^2 - 1}{y+1} \) given \(y(0)=3\).
The DE is in the form \(\cfrac{dy}{dx} = g(x)f(y)\). We can separate the variables and integrate both sides:
\(\cfrac{dy}{dx} = \cfrac{2x^2 - 1}{y+1} \)
\((y + 1) dy = (2x^2 - 1) dx \)
\(\int {(y + 1) dy} = \int {(2x^2 - 1) dx}\)
\(\cfrac{1}{2}y^2 + y + c_1 = \cfrac{2}{3}x^3 - x + c_2\)
Next, we can collect the constants of integration and arrive to an implicit solution:
\(\cfrac{1}{2}y^2 + y = \cfrac{2}{3}x^3 - x + c_3\)
Then, we can substitute the initial values to solve for the constant (or \(c_3\)):
\(\cfrac{1}{2}y^2 + y = \cfrac{2}{3}x^3 - x + c_3\)
\(\cfrac{1}{2}(3)^2 + (3) = \cfrac{2}{3}(0)^3 - (0) + c_3 \)
\(\cfrac{9}{2} + 3 = c_3 \)
\(c_3 = \cfrac{9}{2} + \cfrac{6}{2}\)
\(c_3 = \cfrac{15}{2}\)
Finally, we can plug the values into the equation above to determine the implicit particular solution:
\(\cfrac{1}{2}y^2 + y = \cfrac{2}{3}x^3 - x + \cfrac{15}{2}\)
Therefore, we can determine that the implicit particular solution is \(\boldsymbol{\cfrac{1}{2}y^2 + y = \cfrac{2}{3}x^3 - x + \cfrac{15}{2}}\).