Mathematics / Free calculator

Second-order homogeneous ODE

Solve y″ + py′ + qy = 0 with initial value and derivative, including real, repeated, and complex characteristic roots.

01 Your inputs

Calculated on your device. Inputs are not transmitted or stored.

02 Your result

Enter your values and select Calculate.

The method

y″+py′+qy=0

A worked example

For y″ + y = 0, y(0) = 0 and y′(0) = 1, y = sin(x). At x = 1, y ≈ 0.8414709848.

Assumptions & limits

Constant real coefficients, homogeneous equation. The source treats |p² − 4q| ≤ 10⁻¹² as a repeated root. Nearly repeated roots, cancellation, extreme exponents, and long time intervals can reduce accuracy. Nearly repeated roots are rejected when |p² − 4q| × (x − x₀)² exceeds 10⁻⁸ within that branch. Review the differential-equation residual. Full double precision between operations; displayed values use up to 10 decimal places. Numerical outputs above 10¹⁰⁰ and nonfinite function evaluations are rejected.

Calculation source: Math Workbench: characteristic-root solution of constant-coefficient ODEs.

Explore Math Workbench ↗