Euler & Runge–Kutta numerical solver
Euler and RK4 iterations, tables, and plots.
Open calculatorMathematics / Free calculator
Solve y″ + py′ + qy = 0 with initial value and derivative, including real, repeated, and complex characteristic roots.
Enter your values and select Calculate.
For y″ + y = 0, y(0) = 0 and y′(0) = 1, y = sin(x). At x = 1, y ≈ 0.8414709848.
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.