Separable ODEs

General Form

If an ODE can be written as follows, the equation is said to be separable: $$ y' = f(y)g(x) $$ which can be directly integrated to get the solution. $$ \int{\frac{dy}{f(y)}} = \int{g(x)dx} + c_1 $$ There will be one integration constant \(c_1\) that can be determined by an additional condition: initial or boundary condition which can be given as $$ y(x_0) = y_0$$

Example 1

Solve the following ODE $$ y'(x) = 1 $$

solution:

Equation is separable \(dy=dx\). Integration gives: $$ y(x) = x + c_1 $$

Example 2

Classify the following ODE and obtain the solution $$ t y'(t)+ y(t) = 0 $$ with the initial condition \( y(1) = 1 \)

solution:

The equation is linear and separable $$ dy/y=-dt/t \rightarrow log(y) = -log(t) + c \rightarrow y = c_1/t$$ after imposing the initial condition we get \(c_1 = 1\) : $$ y(t) = \frac{1}{t} $$

Example 3

Classify the following ODE and obtain the general solution $$ y'(t)+ y(t)^2 = 0 $$ with the initial condition $$ y(0) = 1$$

solution:

The equation is nonlinear and separable $$ dy/y^2=-dt \rightarrow -1/y = -t + c \rightarrow y = 1/(t+c_1)$$ after imposing the initial condition we get \(c_1 = 1\) : $$ y(t) = \frac{1}{1+t} $$