General Form
Second Order Linear ODEs can be written in the most general form:
$$ y''(x) + p(x) y'(x) + q(x) y(x) = r(x) $$
If \(r=0\), the equation is said to be homogeneous. The general solution can be expressed as follows:
$$ y(x) = c_1 y_1(x) + c_2 y_2(x) + y_p(x) $$
where \(c_1, c_2\) are unkown constants that can be determined by additional conditions: initial conditions or boundary conditions.
The most common form of initial conditions are
$$ y(x_0) = y^0 $$ $$ y'(x_0) = y^1 $$
where function value and its derivative is specified at point \(x_0\). An example for boundary conditions can be given as
$$ y(x_0) = 0 $$ $$ y(x_1) = 1 $$
where function values are given at two different points.
Example 1
Solve the following ODE $$ y''(x) = 1 $$ where \(p=q=0\), \(r=1\)
solution:
Integration gives: \( y'(x) = x + c_1\) after second integration:
$$ y(x) = \frac{x^2}{2} + c_1 x + c_2 $$
where \(y_1(x) = x\), \(y_2(x)=1\), \(y_p(x) = x^2/2\).
Example 2
Free falling mass can be modelled by the following ODE
$$ m y''(t) = m g $$ with initial conditions
$$ y(0) = 0, y'(0) = 0 $$
where initial position and velocity is zero.
solution:
Integration gives:
$$ y(t) = \frac{1}{2} g t^2 + c_1 t + c_2 $$
after imposing the initial conditions we get \(c_1 = 0, c_2=0\) :
$$ y(t) = \frac{1}{2} g t^2 $$
Method of Reduction of Order
If a second order ODE is of the form
$$ y''(x) + p(x) y'(x) = 0 $$
we can solve it by reducing the order if we define a new variable \(u=y'\).
If the ODE is not in the desired form, we can still reduce the order if we know a solution to the problem.
Let the known solution be \(y_1\), then the second linearly independent solution will be assumed to be of the form
$$ y_2(x) = u(x) \, y_1(x) $$
After substitution we will get a second order ODE for \(u\) which is reducible to first order.
Example 1
Solve the following ODE $$ x y'' + y' = 0 $$
solution:
Let \(u = y'\) then equation becomes \(x u' + u = 0\) which is a separable: \( du/u = -dx/x\).
Integration gives: \(log(u) = -log(x) + log(c_1)\) after exponentiation \(y' = u = c_1/x\) and integration:
$$ y(x) = c_1 log(x) + c_2 $$
Example 2
Find the general solution of $$ x^2 y'' - 2 y = 0 $$ given the solution \( y_1 = x^2 \)
solution:
$$ y_2 = u(x) x^2 \rightarrow y_2' = u' x^2 + 2 u x \rightarrow y_2'' = u'' x^2 + 4 u' x + 2 u$$
$$ x^2 u'' + 4 x u' = 0 , x v' + 4 v = 0 $$
$$ x dv = - 4 v dx, dv/v = - 4 dx/x, log(v) = -4 log(x) $$
$$ v = 1/x^4, u = - 1 / (3 x^3) $$
$$ y_2 = - 1 / (3 x) $$
$$ y(x) = c_1 x^2 + c_2/x $$
Problems
Problem 1
$$ x y'' - y' = 0 $$
Answer:
$$ y(x) = c_1 x^2 + c_2 $$