Second Order Differential Equation Calculator

Enter coefficients or a function, then compute instantly. Get roots, steps, and a clean table. Download CSV or PDF, and share your calculations today.

Calculator inputs
Choose a mode and provide initial conditions.
Reset
Allowed: x, y, v (for y′), numbers, + − × ÷, parentheses, ^ for powers, and functions: sin, cos, tan, asin, acos, atan, sqrt, abs, exp, log, log10, pow.
Constant mode returns the analytic solution form and a value table. Numeric mode uses RK4 and returns a value table.

Example data table

This example uses constant coefficients with initial conditions at x0 = 0.

Input Value Meaning
a1Coefficient of y″
b2Coefficient of y′
c1Coefficient of y
x00Initial x
y02Initial value y(x0)
y′0-1Initial slope y′(x0)
x end2End x for table
Δx0.5Step size
For these values, the characteristic equation has a repeated root, producing a decaying exponential with a linear factor.

Formula used

1) Constant coefficients (analytic)

For a·y″ + b·y′ + c·y = 0, use the characteristic polynomial:

a·r² + b·r + c = 0

Compute D = b² − 4ac. The root type determines the general solution:

2) Numeric mode (RK4)

Rewrite the second-order equation y″ = f(x,y,y′) as a first-order system:

y′ = v,    v′ = f(x, y, v)

The calculator advances (y, v) with a 4th-order Runge–Kutta step over Δx.

How to use this calculator

  1. Select a mode: constant coefficients or numeric IVP.
  2. Enter initial values x0, y0, and y′0.
  3. Set x end and a reasonable step size Δx.
  4. Click Solve to view the summary and value table above the form.
  5. Use Download CSV or Download PDF after solving.

Supported equation formats and inputs

This calculator handles second order problems with initial conditions and a clear value table. Choose constant coefficients a·y″ + b·y′ + c·y = 0, or numeric mode y″ = f(x, y, y′). In numeric mode, write f using x, y, and v (for y′), plus functions like sin, cos, exp, and log. Enter x0, y0, y′0, an end x, and a step size. Typical uses include motion, circuits, and population models.

Constant‑coefficient solution details

In constant mode, it forms a·r² + b·r + c = 0 and evaluates the discriminant D = b² − 4ac. If D > 0, two real roots give a sum of exponentials. If D = 0, a repeated root gives (C1 + C2(x−x0))e^{r(x−x0)}. If D < 0, complex roots give e^{α(x−x0)}(C1cos(βt)+C2sin(βt)). C1 and C2 come from y0 and y′0 at x0.

Numeric integration and accuracy controls

Numeric mode rewrites the equation as y′ = v and v′ = f(x, y, v). The calculator advances (y, v) with classic Runge–Kutta 4, giving strong accuracy for smooth f. Your main control is Δx: smaller steps usually reduce error but increase table length. Very tiny steps are blocked, and the output row count is capped to keep the run practical for browsers and exports.

Reading the results table

The table lists x, y(x), and y′(x) at each step, so you can check shape and slope together. Smooth, gradual changes usually indicate stable behavior, while sharp growth or rapid sign flips suggest instability or stiffness. Try reducing Δx or shortening the interval to compare trajectories. In constant mode, table values come from the closed form, which is useful for validating numeric experiments. Note end values for comparison.

Export and repeatable reporting

Use CSV when you need full data for plotting, regression, or documentation. The PDF export creates a compact report with mode, key lines, and a short table preview for quick sharing. For long numeric runs, CSV is preferred because it preserves every row. Re‑running the same inputs reproduces the same table, supporting homework checks, lab notes, and peer review, and supports quick sorting tasks.

FAQs

Q1. What types of second order equations are supported?

Use constant mode for homogeneous linear equations with constant coefficients. Use numeric mode for general initial value problems written as y″ = f(x, y, y′), including damping, forcing, and nonlinear terms.

Q2. Can I solve equations with a forcing term like sin(x)?

Yes. Put the forcing term inside f(x, y, y′) in numeric mode, for example: sin(x) - 0.3*v - y. Constant mode is limited to the homogeneous form a·y″ + b·y′ + c·y = 0.

Q3. How do I choose a good step size (Δx)?

Start with a moderate step, then halve Δx and compare end values y and y′. If results change noticeably, keep reducing Δx. Smaller steps improve accuracy but generate more rows and larger exports.

Q4. Why does the expression field reject my input?

The evaluator allows only x, y, v, numbers, basic operators, parentheses, and listed math functions. Misspelled functions or extra identifiers trigger an “Unsupported identifier” message. Replace implicit multiplication like 2x with 2*x.

Q5. Does the PDF include every computed row?

The PDF is designed as a compact report and may show only a preview of the table. Use CSV when you need the complete dataset for plotting or auditing every step.

Q6. Can I get y″ values as well?

In numeric mode, y″ equals f(x, y, y′). You can evaluate f at any row to obtain y″. The table focuses on y and y′ because they form the state used by the solver.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.