Second-Order Linear ODEs
Second-order linear ODEs model systems with inertia or storage in two forms: displacement and velocity, charge and current, or position and momentum. The second derivative records acceleration or curvature, so these equations appear in vibrations, circuits, beams, control systems, and diffusion approximations after modal decomposition.
The main advantage of linearity is superposition. Once two independent homogeneous solutions are known, their linear combination gives the full homogeneous response. Nonhomogeneous problems then add a particular response determined by the forcing. This page focuses on the homogeneous constant-coefficient case and the language needed for later forced problems.
Definitions
A second-order linear ODE has the form
It is homogeneous when and nonhomogeneous when . An initial value problem specifies
For the homogeneous equation
two solutions are linearly independent on an interval if neither is a constant multiple of the other. Their Wronskian is
For constant coefficients,
we try and obtain the characteristic equation
Key results
If are continuous on an interval containing , then the initial value problem has a unique solution on that interval. This is stronger than the local first-order theorem because linearity and continuity prevent branching while the coefficients remain finite.
For homogeneous equations, the solution space is two-dimensional. If form a fundamental set, then every homogeneous solution is
For constant coefficients the characteristic roots determine the basis:
| Characteristic roots | Homogeneous basis | Behavior |
|---|---|---|
| Distinct real | Pure exponential growth or decay | |
| Repeated real | Exponential with polynomial factor | |
| Complex | Oscillation with envelope |
The repeated-root case is the one most often mishandled. A double root produces because a second independent solution is needed. Writing two copies of does not create a two-dimensional family.
The Wronskian detects independence. For the constant-coefficient bases above, the Wronskian is nonzero on the whole interval. Abel's identity says that for
the Wronskian satisfies
Thus if the Wronskian is zero at one point, it is zero everywhere; if it is nonzero at one point, it never vanishes on the interval.
In mechanical vibration,
has characteristic equation . The sign of the discriminant distinguishes overdamping, critical damping, and underdamping. The same algebra appears in RLC circuits after translating mass, damping, and stiffness into inductance, resistance, and reciprocal capacitance.
The homogeneous solution is often called the natural response of the system. It describes what the system does after the initial displacement and velocity are set but no external forcing is applied. A positive real part in a characteristic root means growth, a negative real part means decay, and a zero real part means sustained neutral oscillation in the ideal model. In physical systems, a growing homogeneous response usually signals negative damping, feedback instability, or a model being used outside its intended range.
The constants and are not decoration; they encode the two pieces of initial information required by a second-order law. In mechanics those data are position and velocity. In an RLC circuit they may correspond to charge and current. Solving for constants should always use a small two-equation linear system. Mental substitution is tempting, but it is a common source of sign errors when the derivative contains both a product-rule term and a chain-rule term.
The repeated-root solution can be justified by reduction of order. If is already known and the characteristic root is repeated, we seek . Substitution reduces the problem to , so . The part proportional to is already in the first solution, leaving as the new independent solution. This reasoning is more reliable than memorizing the repeated-root rule as a special trick.
Complex roots are also not a separate mystery. Euler's formula gives
Because the ODE has real coefficients, the real and imaginary parts are both real solutions. The parameter controls the envelope and controls the angular frequency. If , the amplitude decays; if , the model has undamped sinusoidal motion; if , oscillations grow.
It is important to normalize the equation only when doing so is harmless. Dividing by in is fine if is a nonzero constant. For variable coefficients, dividing by a leading coefficient that vanishes at some point changes the interval on which the standard theorem applies. The interval must avoid zeros of the leading coefficient and discontinuities of the normalized coefficient functions.
The same characteristic-root method reappears in systems of first-order equations. Setting and turns a second-order equation into a two-dimensional first-order system. The characteristic roots of the scalar equation become eigenvalues of the system matrix. This is why damping cases correspond to node, spiral, and repeated-eigenvalue behavior in the phase plane.
For checking a solution, direct substitution is the final authority, but three quick checks are efficient. First, the number of independent constants should match the order of the homogeneous equation. Second, the initial values should be verified after differentiating. Third, the qualitative behavior should match the roots: no oscillation for real roots, oscillation for nonzero imaginary parts, and decay only when the real parts are negative.
Visual
Worked example 1: Distinct real roots with initial data
Problem. Solve
Method.
- Form the characteristic equation:
- Factor:
- The roots are
- Write the general solution:
- Differentiate:
- Apply :
- Apply :
- Solve the linear system. Add the equations:
Then
Answer.
Check. At , and .
The two terms also explain the future behavior. The term grows while the term decays, so the coefficient controls the long-term sign and growth. If the initial conditions had made , the solution would have been purely decaying. This kind of modal interpretation is useful in design because it shows which initial data excite unstable or slowly decaying modes.
Worked example 2: Underdamped vibration
Problem. Solve
Method.
- The characteristic equation is
- Use the quadratic formula:
- The homogeneous solution is
- Apply :
- Differentiate carefully. Let . Then
- Compute :
- At , with ,
Thus
Answer.
Check. The envelope decays, so the solution is a damped oscillation. The initial derivative calculation also gives , as required.
The damping classification is underdamped because the roots have nonzero imaginary parts. The angular frequency of oscillation is , while the exponential decay rate is . A plot should cross the axis repeatedly with shrinking amplitude. If a numerical solution instead drifts upward or stops oscillating immediately, the derivative or characteristic-root calculation should be inspected.
Code
import sympy as sp
x = sp.symbols("x", real=True)
y = sp.Function("y")
ode = sp.Eq(sp.diff(y(x), x, 2) + 2 * sp.diff(y(x), x) + 5 * y(x), 0)
solution = sp.dsolve(ode, ics={y(0): 1, sp.diff(y(x), x).subs(x, 0): 0})
print(solution)
Common pitfalls
- Forgetting the factor in the second solution for a repeated characteristic root.
- Using complex exponentials as the final answer when a real-valued engineering problem expects the equivalent sine-cosine form.
- Applying initial conditions before differentiating the full solution, especially when an exponential envelope multiplies trigonometric terms.
- Confusing the discriminant of the characteristic equation with the physical damping coefficient.
- Assuming nonzero Wronskian at one point is needed at every point. For a linear homogeneous equation, one nonzero point is enough on the interval.
- Dropping the leading coefficient when forming the characteristic equation for .
- Treating the constants as arbitrary after initial data have been supplied. A homogeneous general solution becomes a particular initial-value solution only after both constants are fixed.
- Forgetting that the independent variable need not be time. The same formulas apply to spatial beam or boundary-value models, but the interpretation of growth and decay changes.
- Calling a solution stable because one mode decays while another grows. Stability requires every homogeneous mode allowed by the initial data to remain bounded, and asymptotic stability requires decay.