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: ^.
This example models a harmonic oscillator using a two-equation system.
| Item | Value |
|---|---|
| N | 2 |
| y1' | y2 |
| y2' | -y1 |
| t0 | 0 |
| tEnd | 6.283185 |
| h | 0.1 |
| y1(t0) | 0 |
| y2(t0) | 1 |
| Suggested method | RK4 |
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.
- Euler: y_{k+1} = y_k + h f(t_k, y_k)
- Heun: k1=f(t_k,y_k), k2=f(t_k+h, y_k+h k1), then y_{k+1}=y_k+(h/2)(k1+k2)
- RK4: k1=f(t_k,y_k), k2=f(t_k+h/2, y_k+h k1/2), k3=f(t_k+h/2, y_k+h k2/2), k4=f(t_k+h, y_k+h k3), then y_{k+1}=y_k+(h/6)(k1+2k2+2k3+k4)
- Select how many equations your system contains.
- Enter each derivative expression using t and y1..yN.
- Provide initial values for all states at the start time.
- Set the end time and a step size that fits your dynamics.
- Pick a method and adjust sampling to control table size.
- Press Solve to view results above the form.
- Use CSV or PDF buttons to export the solution table.