ODE System Solver Calculator

Model interacting states with clear numerical solving. Choose Euler, Heun or RK4 for better accuracy. Download results, review steps, and share reports easily now.

ODE System Solver

Enter a first-order system using variables t and y1..yN. Supported functions: sin, cos, tan, asin, acos, atan, sqrt, abs, exp, ln, log, log10, floor, ceil. Constants: pi, e. Power operator: ^.

Matches y1..yN derivatives you provide.
RK4 is typically most accurate for similar step size.
1 shows every step; larger values reduce rows.
Smaller h usually improves stability and accuracy.
Affects table, CSV, and PDF formatting.

System Definition

Provide derivatives y1'..yN' and initial conditions at t0. Example: y1' = y2, y2' = -y1.

Equation 1
y1
Use t and y1..y2 only.
Equation 2
y2
Use t and y1..y2 only.
Reset
Example Data Table

This example models a harmonic oscillator using a two-equation system.

Item Value
N2
y1'y2
y2'-y1
t00
tEnd6.283185
h0.1
y1(t0)0
y2(t0)1
Suggested methodRK4
Formula Used

Let the system be y' = f(t, y) with y = (y1..yN). Each method advances from (t_k, y_k) to (t_{k+1}, y_{k+1}) using step h.

How to Use This Calculator
  1. Select how many equations your system contains.
  2. Enter each derivative expression using t and y1..yN.
  3. Provide initial values for all states at the start time.
  4. Set the end time and a step size that fits your dynamics.
  5. Pick a method and adjust sampling to control table size.
  6. Press Solve to view results above the form.
  7. Use CSV or PDF buttons to export the solution table.
FAQs
1) What kind of systems can I solve here?
Any first-order system expressed as y1'..yN' with numeric initial values. If you have higher-order equations, convert them into a first-order system by introducing extra state variables.
2) Which method should I choose?
Euler is fast but least accurate. Heun improves accuracy with modest cost. RK4 is usually the best balance of accuracy and stability for many smooth problems at practical step sizes.
3) Why do I get NaN or Infinity errors?
This typically means the system is stiff, the step size is too large, or the expression contains a division by zero or invalid operation. Reduce step size, verify expressions, and consider reformulating the model.
4) How do I write the equations correctly?
Use variables t and y1..yN exactly. Use operators +, -, *, /, ^ and supported functions like sin, exp, and sqrt. For example: y2 - 0.2*y1.
5) Can I solve stiff ODE systems accurately?
This tool uses explicit methods, which can struggle with stiff systems. You may need very small steps to remain stable. For stiff problems, implicit methods are often better, but they require more advanced solvers.
6) What does “sample every” mean?
It controls how often rows are recorded. A value of 1 records every step. A value of 10 records every tenth step plus the final point, reducing table size and export length.
7) Why is the final time exact even if the step does not fit?
The solver uses the chosen step size until near the end, then takes a smaller last step so the last row lands exactly on the requested end time.
8) Are the CSV and PDF exports identical?
The CSV contains all recorded rows. The PDF is a readable report and may truncate long tables, but it always includes method settings and key output structure.

Related Calculators

rlc circuit solverlinear ode solversensitivity analysis solverforward euler solverelectrical circuit solvereuler method solverrl circuit solverlinearization solvernonhomogeneous ode solvergauss seidel method solver

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.