Calculator Inputs
Formula Used
Supported nonlinear models:
Logistic: y' = r·y·(1 - y/K)
Riccati: y' = a·y² + b·y + c
Bernoulli: y' + P·y = Q·yⁿ
Duffing: x'' + δx' + αx + βx³ = γcos(ωt)
Pendulum: θ'' + cθ' + (g/L)sin(θ) = 0
Forward Euler update:
yᵢ₊₁ = yᵢ + h·f(tᵢ, yᵢ)
For second-order systems, the calculator rewrites the equation as a first-order system using state and velocity variables.
RK4 update:
yᵢ₊₁ = yᵢ + (h/6)(k₁ + 2k₂ + 2k₃ + k₄)
with intermediate slopes computed from the differential equation at different points inside the step.
Summary statistics: final value, minimum, maximum, mean, standard deviation, and phase behavior are derived from the computed solution table.
How to Use This Calculator
Choose a nonlinear model that matches the behavior you want to study. Logistic and Bernoulli are first-order examples, while Duffing and Pendulum are second-order systems.
Pick a numerical method. RK4 usually gives better accuracy for the same step size, while Euler is simpler and useful for quick approximations.
Enter the time range, step size, initial state, and initial velocity when the chosen model needs it. Then fill in the model-specific coefficients.
Press Calculate. The result appears immediately below the header and above the form, including summary metrics, a computed table, and Plotly graphs.
Use the export buttons to save the numerical table as CSV or capture the full result block as a PDF report.
Example Data Table
| Model | Method | Time Range | Step | Initial State | Key Parameters | Example Final Value |
|---|---|---|---|---|---|---|
| Logistic Growth | RK4 | 0 to 10 | 0.1 | y(0) = 1 | r = 0.8, K = 20 | Approximately 16.87 |
| Riccati Equation | Euler | 0 to 6 | 0.05 | y(0) = 0.5 | a = 0.05, b = -0.8, c = 1.5 | Depends on coefficient balance |
| Damped Pendulum | RK4 | 0 to 12 | 0.02 | θ(0) = 1.1, θ'(0)=0 | g = 9.81, L = 1, c = 0.15 | Oscillatory decay toward equilibrium |
Example values are illustrative and help demonstrate how the calculator is structured.
FAQs
1) What does this calculator solve?
It numerically solves selected nonlinear differential equations across a chosen time range. You can test first-order and second-order models, inspect tables, and compare solution behavior using Euler or RK4.
2) When should I choose RK4 instead of Euler?
Choose RK4 when you want better accuracy and smoother trajectories at moderate step sizes. Euler is easier to understand, but nonlinear systems often need much smaller steps to stay reliable.
3) Why can nonlinear solutions diverge quickly?
Quadratic, cubic, or sinusoidal terms can magnify small changes in state. Large coefficients or coarse step sizes may push the approximation away from the true path and cause blow-up.
4) How do I choose a good step size?
Start with a small positive step, then reduce it and compare results. If the final value or graph changes noticeably, your original step was probably too large.
5) What does the phase graph show?
The phase graph plots state against velocity for second-order models, or state against slope for first-order models. It helps reveal cycles, damping, and nonlinear curvature more clearly than a time plot alone.
6) Can this calculator find symbolic closed-form solutions?
No. This page is designed for numerical approximation, not symbolic algebra. It is best for exploring behavior, testing parameters, and building intuition about nonlinear dynamics.
7) Why does the pendulum stay nonlinear?
The pendulum uses the full sine term instead of the small-angle linear approximation. That keeps large-angle motion realistic and preserves true nonlinear effects in the solution.
8) What do the CSV and PDF downloads contain?
The CSV export includes the computed numerical rows. The PDF export captures the visible result area, including summary metrics, interpretation, graphs, and the table displayed after calculation.