# Second-Order ODE Solver (Characteristic Equation)

Solve a·y'' + b·y' + c·y = f(x): characteristic roots, three homogeneous cases, undetermined coefficients with resonance, and C1/C2 from initial conditions.

> Canonical page: https://elysiatools.com/en/tools/second-order-ode-solver

- **Category:** Math & Numbers

- **Keywords:** second order ode, characteristic equation, auxiliary equation, undetermined coefficients, homogeneous solution, resonance, damped oscillator, initial value problem, differential equations, calculus

## Overview

The Second-Order ODE Solver computes solutions to linear differential equations of the form a·y'' + b·y' + c·y = f(x). It evaluates the characteristic equation to classify homogeneous solutions into real distinct, repeated, or complex conjugate roots, determines particular solutions using undetermined coefficients with resonance adjustments, and calculates integration constants C1 and C2 when initial conditions are provided.

## Inputs

- **Coefficient a (y'')** (number): Coefficient of y'' (must be nonzero).
- **Coefficient b (y')** (number): Coefficient of y'.
- **Coefficient c (y)** (number): Coefficient of y.
- **Forcing f(x)** (select)
- **F (constant term)** (number): Used when forcing = Constant.
- **Polynomial Coefficients (constant first)** (text): Comma-separated coefficients, constant term first (degree ≤ 5). Used when forcing = Polynomial.
- **A (amplitude)** (number): Used when forcing = Exponential.
- **k (rate)** (number): Used when forcing = Exponential.
- **A (sin amplitude)** (number): Used when forcing = Sine/cosine.
- **B (cos amplitude)** (number): Used when forcing = Sine/cosine.
- **k (angular frequency)** (number): Used when forcing = Sine/cosine.
- **x₀ (initial x)** (number): Initial point (used with y₀ and y'₀).
- **y₀ = y(x₀)** (number): Provide together with y'₀ to pin down C1, C2.
- **y'₀ = y'(x₀)** (number): Initial derivative (both or neither of y₀, y'₀).

## When to use

- Solving second-order linear ordinary differential equations with constant coefficients.
- Analyzing forced systems like harmonic oscillators or RLC circuits under constant, polynomial, exponential, or sinusoidal inputs.
- Evaluating initial value problems to determine constants C1 and C2 from given y(x₀) and y'(x₀) values.

## How it works

- Input coefficients a, b, and c to construct the auxiliary characteristic equation a·r² + b·r + c = 0 and calculate its discriminant.
- Select the forcing function f(x)—none, constant, polynomial, exponential, or sinusoidal—and supply its corresponding parameters.
- The solver computes the characteristic roots, determines the homogeneous solution yh, and calculates the particular solution yp while handling resonance if the forcing term shares roots.
- Optionally enter initial conditions x₀, y₀, and y'₀ to solve the 2×2 linear system for integration constants C1 and C2.

## Use cases

- Verifying analytical calculus and differential equations coursework solutions step by step.
- Modeling damped and driven physical oscillators in classical mechanics.
- Calculating transient and steady-state responses in electrical circuits described by second-order ODEs.

## Frequently asked questions

### How does the solver handle negative discriminants?

When the discriminant is negative, the solver produces complex conjugate roots α ± βi and writes the homogeneous solution in terms of e^(αx) multiplied by sine and cosine terms.

### What happens if a forcing term causes resonance?

If the forcing frequency or exponential rate matches a root of the characteristic equation, the solver multiplies the trial particular solution by x or x² to find the correct particular solution.

### What types of non-homogeneous forcing terms are supported?

You can select constant values, polynomials up to degree 5, exponentials A·e^(kx), or sinusoidal functions A·sin(kx) + B·cos(kx).

### Do I need to provide initial conditions?

No. If initial conditions are omitted, the solver outputs the general solution containing arbitrary constants C1 and C2.

### Why must coefficient a be nonzero?

If a is zero, the equation reduces to a first-order differential equation rather than a second-order equation.

## Related tools

- [Inverse Laplace Transform Calculator (Partial Fractions)](https://elysiatools.com/en/tools/inverse-laplace-calculator): Partial-fraction inverse Laplace transform for proper rational functions: root factorization (real + conjugate pairs), exact coefficient system, term-by-term inversion.
- [Laplace Transform Calculator (Table Lookup)](https://elysiatools.com/en/tools/laplace-transform-calculator): Table lookup of L{f(t)} for 14 standard pairs, with parameter substitution, region of convergence, derivation note, and optional numeric F(s₀) evaluation.
- [Partial Fraction Decomposer (Rational Functions)](https://elysiatools.com/en/tools/partial-fraction-decomposer): Decompose N(x)/D(x) into A/(x−r)^j + (Bx + C)/((x−α)² + β²) with long division for improper fractions and numeric residual verification.
- [Z-Transform Calculator (Table Lookup)](https://elysiatools.com/en/tools/z-transform-calculator): Table lookup of the unilateral Z-transform for 11 standard pairs, with parameter substitution, region of convergence, derivation note, and optional numeric X(z₀) evaluation.
- [Absolute Value Calculator](https://elysiatools.com/en/tools/absolute-value-calculator): Calculate the absolute value of positive, negative, or decimal numbers and explain the sign relationship
- [Air Changes per Hour (ACH, n = Q/V)](https://elysiatools.com/en/tools/air-changes-per-hour): Compute the air change rate (ACH / n) of a room from the outdoor supply airflow Q and the room volume V: n = Q/V (1/h). Three modes: solve ACH (given Q and V), solve airflow (given n and V), or solve volume (given n and Q). Flow in m³/s/m³/h/CFM, volume in m³/ft³/L. Also reports the well-mixed single-zone purge time to reach a target residual fraction ε (default 1%): t = −ln(ε)/n hours.
- [Bearing Life L10 Calculator](https://elysiatools.com/en/tools/bearing-life-l10): Calculate the basic rating life of a rolling bearing: L10 = (C/P)^p, with p = 3 for ball bearings and p = 10/3 for roller bearings. When a speed is provided, converts to L10h in operating hours.
- [Bolt Torque Clamp Force Calculator](https://elysiatools.com/en/tools/bolt-torque-clamp-force): Convert between bolt tightening torque and axial clamp force. T = K·F·d, where K is the nut factor (~0.20 for dry steel). Solve torque from force, or force from torque.

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [Audio Encoding and Format Conversion Tools](https://elysiatools.com/en/hubs/audio-convert): Compare audio format conversion, bitrate changes, sample-rate conversion, codec swaps, and export tools in one hub for delivery and archive workflows.
- [Image Format Conversion and Animated Export Tools](https://elysiatools.com/en/hubs/image-convert): Compare image format converters for JPG, PNG, GIF, AVIF, WebP, TIFF, ICO, base64, and animation-friendly exports in one hub.
- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [Color Space Conversion Tools for Web and Print](https://elysiatools.com/en/hubs/design-convert): Curated tools for web-to-print color space conversion in one hub.
