Direction Field Visualizer
Plot slope fields and trace solution curves for \(y' = f(t,y)\) using an adaptive Dormand–Prince 5(4) solver — click anywhere on the field to draw a solution curve through that point.
What Is a Direction Field?
A direction field (or slope field) for \(y' = f(t,y)\) places a short arrow at each grid point \((t,y)\) whose slope equals \(f(t,y)\). Any solution curve must be tangent to the arrows everywhere it passes.
Adaptive Solver
Clicking a point \((t_0,y_0)\) solves the IVP with an adaptive Dormand–Prince 5(4) Runge–Kutta method. Step size is automatically shrunk near steep slopes or blow-up points and enlarged in smooth regions — maintaining accuracy without wasted computation.
How to Use
- Type \(f(t,y)\) in the equation box. Use
torxfor the independent variable. - Press Enter or click Update Field to redraw the arrows.
- Click anywhere on the canvas to trace a solution curve through that point.
- Multiple curves use distinct colors automatically.
- Clear Solutions removes all curves. Download PNG saves the view.
Keyboard Navigation
- Tab through all controls; Enter in the equation field updates the plot.
- Click function names in the table to insert them directly into the equation box.
Direction field visualization. Click on the canvas to draw a solution curve through the chosen point.
Click a function name to insert it into the equation box.
| Code | Notation |
|---|---|
| sqrt(x) | \(\sqrt{x}\) |
| cbrt(x) | \(\sqrt[3]{x}\) |
| abs(x) | \(|x|\) |
| sin(x) | \(\sin x\) |
| cos(x) | \(\cos x\) |
| tan(x) | \(\tan x\) |
| asin(x) | \(\arcsin x\) |
| acos(x) | \(\arccos x\) |
| atan(x) | \(\arctan x\) |
| sinh(x) | \(\sinh x\) |
| cosh(x) | \(\cosh x\) |
| tanh(x) | \(\tanh x\) |
| exp(x) | \(e^{x}\) |
| log(x) | \(\ln x\) |
| log10(x) | \(\log_{10} x\) |
| pi | \(\pi\) |
| e | \(e\) |
| ceil(x) | \(\lceil x\rceil\) |
| floor(x) | \(\lfloor x\rfloor\) |
| round(x) | \(\operatorname{round}(x)\) |
| max(a,b) | \(\max(a,b)\) |
| min(a,b) | \(\min(a,b)\) |