# 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://test.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

- [Carmichael Function λ(n) Calculator](https://test.elysiatools.com/en/tools/carmichael-function): Group exponent λ(n) from prime factorization with φ(n) comparison, primitive-root existence, Korselt's Carmichael-number detection, and optional sample-unit verification.
- [Chinese Remainder Theorem Solver (System of Congruences)](https://test.elysiatools.com/en/tools/chinese-remainder-theorem): Generalized pairwise-merge CRT for 2–20 congruences: coprime moduli give the product modulus, consistent non-coprime moduli give the lcm, inconsistent systems are rejected.
- [Permutation / Combination / Subset Generator (With Repeats)](https://test.elysiatools.com/en/tools/combinatorial-generation): Deduplicated, lexicographic permutations / combinations / subsets of up to 12 items with exact multiset counts; display capped at 200 entries.
- [Euler Totient Function φ(n) Calculator](https://test.elysiatools.com/en/tools/euler-totient-function): Exact φ(n) from trial-division factorization (n ≤ 10¹²) with optional coprime listing and Euler's theorem recall.
- [Zero-Sum Game Solver (Saddle Point / Linear Programming)](https://test.elysiatools.com/en/tools/game-theory-zero-sum): Two-person zero-sum games: saddle-point test first, then mixed strategies from a single-phase simplex LP with dual shadow prices, verified by security-level checks.
- [Inverse Laplace Transform Calculator (Partial Fractions)](https://test.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://test.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.
- [Multiplicative Order Calculator mod n (ordₙ(a))](https://test.elysiatools.com/en/tools/order-of-element-mod-n): Smallest k with a^k ≡ 1 (mod n) via φ(n) reduction: power table, minimality proof, cyclic subgroup , primitive-root and maximal-order flags.

## Samples

- [Web Image Processing Python Samples](https://test.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://test.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://test.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://test.elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [Differential Equations, Transforms, and Numerical Methods](https://test.elysiatools.com/en/hubs/differential-equations-transforms-numerical-methods): Solve engineering math problems across ODEs, Laplace or Z transforms, convolution, and numerical approximation while checking method fit, units, and initial conditions.
