This tool solves first-order equations written as dy/dx = f(x, y). It supports several structured models and compares common numerical methods.
- Euler:
yₙ₊₁ = yₙ + h f(xₙ, yₙ) - Heun:
y* = yₙ + h f(xₙ, yₙ), thenyₙ₊₁ = yₙ + h[k₁ + k₂]/2 - RK4:
yₙ₊₁ = yₙ + h(k₁ + 2k₂ + 2k₃ + k₄)/6 - Linear exact check:
y' = ax + by + cis checked by a closed-form solution when possible. - Exponential exact check:
y = y₀e^(a(x-x₀)) - Logistic exact check:
y = b / [1 + ((b-y₀)/y₀)e^(-a(x-x₀))]
- Select the differential equation model that matches your problem.
- Choose Euler, Heun, or RK4 as the main solution method.
- Enter the initial condition, target x value, step size, and parameters.
- Add a known exact value if your teacher or textbook provides one.
- Click solve to view the result above the form.
- Review the graph, comparison table, and step table.
- Export the results as CSV or PDF for records.
| Example | Equation | x₀ | y₀ | Target x | Step | Suggested method | Notes |
|---|---|---|---|---|---|---|---|
| Linear growth | y' = 1x + 0.5y + 0 | 0 | 1 | 2 | 0.25 | RK4 | Good for accuracy comparison. |
| Cooling | y' = -0.3(y - 22) | 0 | 90 | 5 | 0.5 | Heun | Shows approach toward ambient value. |
| Logistic | y' = 0.8y(1 - y / 100) | 0 | 10 | 4 | 0.2 | RK4 | Useful for population modeling. |
Why Differential Equations Matter
Differential equations describe change. They connect a quantity with its rate of change. This idea appears in motion, heat flow, population growth, circuits, medicine, economics, and engineering. Many equations have exact solutions. Many others do not. A calculator helps students test a model before doing longer algebra. It also helps teachers create clean examples. The main goal is not only a final number. The goal is to see how each step changes the answer.
Numerical Methods
Euler method is the simplest approach. It follows the slope at the start of each interval. It is easy to understand, but it can drift when the step is large. Heun method improves Euler. It predicts a value, checks the slope at the end, and averages both slopes. RK4 is stronger. It samples four slopes inside each interval. That balanced average often gives high accuracy with fewer steps.
Accuracy and Step Size
Step size controls precision. A smaller step usually improves the result. It also creates more rows in the solution table. A larger step is faster, but the error can grow. This calculator compares Euler, Heun, and RK4 on the same inputs. That makes the tradeoff easy to see. When an exact answer is available, the tool computes absolute and relative error. You may also enter a textbook answer for checking.
Reading the Output
The result summary gives the final approximation. The chart shows the curve produced by the selected method. The comparison table shows how methods differ. The step table gives each x value, y value, slope, and updated result. These details are useful for homework, lab reports, and lesson notes. Export options save the work for later review. Use the formulas section to match each row with the method rule.
1. What type of equations can this calculator solve?
It solves supported first-order models in the form dy/dx = f(x,y). These include linear, exponential, logistic, cooling, Riccati style, and sinusoidal forced models.
2. Which method should I choose first?
Use RK4 when you want stronger accuracy. Use Euler for basic learning. Use Heun when you want a middle option between simplicity and precision.
3. Why does step size matter?
Step size controls how often the curve is updated. Smaller steps usually reduce error, but they create more calculations and longer tables.
4. Can I compare methods?
Yes. After solving, the comparison table shows Euler, Heun, and RK4 results using the same equation, interval, and step size.
5. What is an exact value?
An exact value is the closed-form solution at the target x. The calculator finds it for selected models or uses your supplied value.
6. Why is my error listed as N/A?
Error needs an exact value. If the selected model has no automatic exact check and no known answer is entered, error cannot be calculated.
7. Can I export my work?
Yes. Use the CSV button for spreadsheet data. Use the PDF button for a compact printable report with summary and step rows.
8. Is this useful for homework?
Yes. It shows formulas, steps, graphs, and errors. Still, you should copy your teacher's required method and show reasoning clearly.