Enter Solver Inputs
Example Data Table
This sample uses y' = 0.5y, x₀ = 0, y₀ = 2, h = 0.2, and 5 steps.
| Step | x | RK4 Approximation | Exact Value |
|---|---|---|---|
| 0 | 0.0000 | 2.0000 | 2.0000 |
| 1 | 0.2000 | 2.2103 | 2.2103 |
| 2 | 0.4000 | 2.4428 | 2.4428 |
| 3 | 0.6000 | 2.6997 | 2.6997 |
| 4 | 0.8000 | 2.9836 | 2.9836 |
| 5 | 1.0000 | 3.2974 | 3.2974 |
Formula Used
The calculator solves first-order initial value problems in the form y' = f(x, y) with step size h.
Euler Method
yₙ₊₁ = yₙ + h f(xₙ, yₙ)
Heun Method
k₁ = f(xₙ, yₙ), k₂ = f(xₙ + h, yₙ + h k₁), yₙ₊₁ = yₙ + (h / 2)(k₁ + k₂)
Runge-Kutta Fourth Order
k₁ = f(xₙ, yₙ), k₂ = f(xₙ + h/2, yₙ + h k₁/2), k₃ = f(xₙ + h/2, yₙ + h k₂/2), k₄ = f(xₙ + h, yₙ + h k₃)
yₙ₊₁ = yₙ + (h / 6)(k₁ + 2k₂ + 2k₃ + k₄)
Supported Model Equations
Exponential: y' = a y
Linear: y' = a x + b y + c
Logistic: y' = a y (1 - y / b)
Cooling: y' = -a (y - b)
How to Use This Calculator
- Select the ODE model that best matches your problem.
- Choose the main method for the detailed results table.
- Enter initial values for
x₀andy₀. - Set the step size and total number of steps.
- Fill the model parameters using the field labels.
- Press Solve ODE to generate values and the chart.
- Review the summary cards, graph, and error table.
- Use the export buttons to save CSV or PDF copies.
FAQs
1. What does this calculator solve?
It solves first-order ordinary differential equations numerically. You provide initial values, step size, steps, and model parameters. The page then computes Euler, Heun, and RK4 results together.
2. Which method should I choose?
Euler is fastest and simplest. Heun usually improves accuracy with little extra work. RK4 is often the best general choice when you want stronger accuracy for smooth problems.
3. Why does step size matter?
A smaller step size usually improves accuracy because each update moves less distance. Very large steps can miss curvature and cause unstable or misleading results, especially with nonlinear models.
4. What is absolute error in the table?
Absolute error equals the distance between the selected numerical value and the exact value. It helps you judge how well the chosen method performs for the current problem setup.
5. Does the calculator support exact solutions?
Yes. The supported models include exact formulas, so the page can compare numerical output against known values. That makes the solver useful for practice, checking, and method comparison.
6. What does parameter b mean?
Its meaning depends on the model. In logistic growth, b is carrying capacity. In cooling, b is ambient value. In the linear model, b is the coefficient multiplying y.
7. Can I export the computed table?
Yes. After solving, use the CSV button for spreadsheet-friendly output or the PDF button for a printable summary. Both export the visible result section on the page.
8. When is this solver most useful?
It is useful for learning numerical methods, testing sensitivity to step size, checking homework, and comparing approximate techniques before moving into larger simulation tools.