Advanced maths

Polynomial ODE initial value calculator

Compare fixed-step Euler, Heun or classical RK4 with a half-step run for y′=P(x,y).

Your numbers

Polynomial expression using numbers, x, y, + − * / ^ and parentheses; division only by a nonzero number. No functions or code. Expanded coefficient magnitude ≤1,000,000; read the tool’s degree and variable limits.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Try it, understand it

Explore the result

Use y′=y with y(0)=1 to compare fixed-step methods against a known exponential reference.

Worked example comparison
ExampleOutputWhat to notice
Classical RK4, ten stepsCoarse-grid endpoint approximation2.71828The endpoint is about 2.7182797441.
Forward Euler, ten stepsCoarse-grid endpoint approximation2.593742The endpoint is (1.1)^10, about 2.5937424601.
Heun, ten stepsCoarse-grid endpoint approximation2.714081The endpoint is (1+0.1+0.1²/2)^10, about 2.7140808466.

Check your understanding

Does the second run change the ODE or initial point?

No. It uses the same equation and initial point with twice as many equal steps.

Is agreement at the endpoint enough to certify a trajectory?

No. Difficult or unresolved behavior can still exist between sampled points.

Behind the numbers

How this calculation works

Specify the initial point, final x and polynomial slope field, then advance on a uniform grid. A second run halves the signed step size. Comparing endpoint values can reveal step-size sensitivity, but the difference is not a certified error bound or proof that the solution is resolved.

THE FORMULAAdvance y by the selected explicit fixed-step formula; compare endpoint with a run using twice as many steps

A worked example

For y′=y, y(0)=1, ten classical RK4 steps to x=1 give about 2.7182797441. The known solution exp(x) gives exp(1)≈2.7182818285; the half-step run is a separate numerical comparison.

Good to know

Scalar polynomial right side degree ≤6. Equal explicit steps only, no adaptive solver, stiffness detection, event handling or exact symbolic solution. Backward direction is supported. A stage or state above magnitude 10¹⁰ stops the calculation. Table and plot sample long trajectories; every integration step is still used.

An initial-value problem needs both a slope rule and a point

The polynomial P(x,y) describes dy/dx. The initial y belongs at the entered starting x; it is not automatically a value at zero. Forward or backward integration then follows the sign of the interval step.

The selected method advances on equal steps. Euler uses one local slope, Heun averages an initial and predicted endpoint slope, and classical RK4 combines four stage slopes. These are numerical methods, not three names for an exact symbolic solution.

The Taylor approximation calculator can provide a separate finite exponential approximation for the default growth example. It is not an exact reference for a general entered ODE.

A half-step comparison is evidence rather than a guarantee

The calculator runs the same method with the entered step count and with twice that count. Their endpoint difference indicates sensitivity to that change. Agreement alone does not certify accuracy: both runs can share a bias or fail to resolve difficult behavior.

For y′=y with y(0)=1, ten RK4 steps to x=1 give about 2.7182797441. This particular problem has known solution exp(x), allowing an independent accuracy check. A general entered polynomial equation may have no displayed exact reference.

Stability and blow-up need an honest stopping state

An explicit fixed-step method can be unstable for a stiff problem, and a genuine solution can become unbounded over a finite interval. The tool stops if a stage or state exceeds the stated magnitude limit rather than plotting a fabricated continuation.

The table and SVG sample long computed trajectories for readability, while every integration step is still used. The vector field calculator illustrates local arrows; solving an ODE follows a starting condition through a slope rule. Neither a smooth-looking sampled curve nor a small endpoint difference proves that all intervening behavior is resolved.

A few questions, answered

Is this an adaptive RK45 solver?

No. The RK4 option is classical fixed-step fourth-order Runge–Kutta, with a separate half-step comparison.

Can I integrate toward a smaller x?

Yes. The final x can be below the initial x, producing a negative step. The initial y still belongs at the initial x.

Is the step-halving difference an error bound?

No. It compares two numerical runs and is not a certified bound, stiffness test or proof of convergence.

Find your calculator

Start typing to explore the library.