Skip to content

Second-order ordinary differential equations

For simplicity, all definitions and statements are for complex values functions and vector spaces over \(\mathbb{C}\).

Linear second-order ODEs with constant coefficients

Let \(L[y] = f\) be given by

\[ L[y] = \ddot y + p \dot y + qy = f \qquad (*), \]

with \(f,p,q \in \mathbb{R}\).

Definition: the set of all solutions to \((*)\) is called the general solution.

Property: if \(y_1,y_2\) are both solutions to the homogeneous case \(L[y]=0\) then \(\forall c_1,c_2 \in \mathbb{R}\), \(y=c_1y_1 + c_2y_2\) is a solution.

\[ L[y] = L[c_1y_1 + c_2y_2] = c_1L[y_1] + c_2L[y_2], \]

Then the consequence is that the general solution is a linear space.

\((*)\) is said to have resonance if \(f\) can be split into linearly independent terms of which at least one lies in the solution space of \((*)\).

Solving homogeneous linear second-order ODEs with constant coefficients

Therefore solving

\[ L[y] = \ddot y + p \dot y + qy = 0. \]

Ansatz: let \(y(t) = e^{\lambda t}\) with \(\lambda \in \mathbb{C}\). Then

\[ L[y(t)] = \lambda^2 e^{\lambda t} + p \lambda e^{\lambda t} + q e^{\lambda t} = e^{\lambda t} (\lambda^2 + p \lambda + q) = 0, \]

obtaining the characteristic equation \(\chi(\lambda) = \lambda^2 + p \lambda + q = 0\). If two roots \(\lambda_1,\lambda_2 \in \mathbb{C}\) are found the solution space is

\[ y(t) = c_1 e^{\lambda_1 t} + c_2 e^{\lambda_2 t}, \quad c_1,c_2 \in \mathbb{C}, \]

if instead one root \(\lambda_1 \in \mathbb{C}\) is foundt the solution space is

\[ y(t) = (c_1 + c_2t) e^{\lambda_1 t}. \]
Proof:

Will be added later.

Example

Let the homogeneous linear second-order ode be given by \(\ddot y + 4 \dot y + 8y = 0\). Then the characteristic equation is given by \(\chi(\lambda) = \lambda^2 + 4\lambda + 8 = 0\) with solutions \(\lambda_1 = -2 + 2i\) and \(\lambda_2 = -2 - 2i\). Then the general solution is given by

\[ y(t) = c_1 e^{(-2 + 2i)1 t} + c_2 e^{(-2 - 2i) t}, \quad c_1,c_2 \in \mathbb{C}, \]

and we can write the real solution as

\[ y(t) = e^{-2t}\big(d_1\cos 2t + d_2 \sin 2t \big), \quad d_1,d_2 \in \mathbb{R}. \]

Solving inhomogeneous linear second-order ODEs with constant coefficients

Theorem: let \(y_p\) be a particular solution to \((*)\). Then the general solution to \((*)\) is given by

\[ y = y_h + y_p, \]

with \(y_h\) the solution to the homegeneous case.

Proof:

Let \(y\) be a solution to \((*)\), then \(L[y - y_p] = L[y] - L[y_p] = f - f = 0\). Therefore \(y = (y - y_p) + y_p = y_h + y_p\).

Method of variation of parameters

We need the general solution to the homogeneous case

\[ y_h(t) = c_1 y_1(t) + c_2 y_2(t), \qquad c_1,c_2 \in \mathbb{C}. \]

Ansatz: let \(y_p(t) = c_1(t) y_2(t) + c_2(t) y_2(t)\), then taking the derivative of \(y_p(t)\)

\[ \dot y_p(t) = \dot c_1(t) y_2(t) + \dot c_2(t) y_2(t) + c_1(t) \dot y_2(t) + c_2(t) \dot y_2(t), \]

we demand that \(\dot c_1(t) y_2(t) + \dot c_2(t) y_2(t) = 0\). Then taking the second derivative of \(y_p(t)\)

\[ \ddot y_p(t) = \dot c_1(t) \dot y_2(t) + \dot c_2(t) \dot y_2(t) + c_1(t) \ddot y_2(t) + c_2(t) \ddot y_2(t), \]

then we have for \((*)\)

\[ \ddot y_p(t) + p \dot y_p(t) + q = c_1\big(\ddot y_1 + p \dot y_1 + q y_1\big) + c_2\big(\ddot y_2 + p \dot y_2 + q y_2\big) + \dot c_1 \dot y_1 + \dot c_2 \dot y_2 = f \]

we demand that \(\dot c_1 \dot y_1 + \dot c_2 \dot y_2 = f\). Then we can create a linear system of demands

\[ \begin{pmatrix} y_1 && y_2 \\ \dot y_1 && \dot y_2\end{pmatrix} \begin{pmatrix} \dot c_1 \\ \dot c_2 \end{pmatrix} = \begin{pmatrix} 0 \\ f \end{pmatrix}, \]

named the Wronskian and we can solve for \(c_1(t)\) and \(c_2(t)\) by integration.

Ansatz method

Let \(f(t) = p(t)e^{\lambda t}\), rule of thumb: \(y_p\) is of related type to inhomogeneity \(f\). Then for \(A_n, B_n\) and \(P_n\) polynomials of degree \(\leq n\) and \(\alpha \in \mathbb{R}\)

Inhomogeneity Particular solution
\(L[y] = P_n\) \(t^m A_n\)
\(L[y] = P_n e^{\alpha t}\) \(t^m A_n e^{\alpha t}\)
\(L[y] = P_n \cos \omega t\) \(t^m \big(A_n \cos \omega t + B_n \sin \omega t \big)\)
\(L[y] = P_n \sin \omega t\) \(t^m \big(A_n \cos \omega t + B_n \sin \omega t \big)\)
\(L[y] = P_n e^{\alpha t} \cos \omega t\) \(t^m e^{\alpha t} \big(A_n \cos \omega t + B_n \sin \omega t \big)\)
\(L[y] = P_n e^{\alpha t} \sin \omega t\) \(t^m e^{\alpha t} \big(A_n \cos \omega t + B_n \sin \omega t \big)\)

Choose \(m \in \mathbb{N} \cup \{0\}\) as small as possible such that no term in the ansatz solves the homogeneous equation \(L[y] = 0\).