You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,6 +235,49 @@ Full measured breakdowns, including GPU throughput at scale, live in [BENCHMARK_
235
235
236
236
---
237
237
238
+
239
+
240
+
---
241
+
242
+
## 🧮 Solving Differential Equations
243
+
244
+
ParserNG solves ODEs — single equations, systems, and higher-order equations — as a first-class expression, not a bolted-on API. Four functions cover it: `diffeqn` (endpoint), `diffeqnPath` (full trajectory), `diffeqnHO` and `diffeqnPathHO` (the higher-order equivalents, for equations involving `y''`, `y'''`, and beyond).
245
+
246
+
Five solver methods are available, spanning the usual accuracy/stiffness tradeoff:
247
+
248
+
| Method | Order | Stiff-safe? | Use it for |
249
+
| :--- | :--- | :--- | :--- |
250
+
|`euler`| 1st | No | Real-time graphics, particle sims — speed over precision |
251
+
|`rk4`| 4th | No | General-purpose default — solid accuracy, no adaptive bookkeeping |
252
+
|`rk45`| 4th/5th, adaptive | No | Behavior that varies across the interval; industry-standard adaptive stepping |
253
+
|`implicit_euler`| 1st |**Yes**| Stiff systems where stability matters more than tight accuracy |
254
+
|`bdf2`| 2nd |**Yes**| Stiff systems needing better accuracy than `implicit_euler` at the same stability |
255
+
256
+
```java
257
+
// Endpoint only, using RK4 defaults
258
+
MathExpression me =newMathExpression("diffeqn(y[1] + 2*y[0], 0, 1, 5)");
259
+
me.solve();
260
+
261
+
// Full trajectory, resampled to 50 evenly-spaced points
Results assign to a variable or matrix just like any other ParserNG expression — but a `diffeqn`-family call must always be the *entire* input expression (`A = diffeqn(...)` is fine; `sin(diffeqn(...))` is not — see the docs for why).
274
+
275
+
Full syntax reference, argument-by-argument breakdown, and per-method accuracy/stability nuances: [DIFF_ENGINE.md](parser-ng/DIFF_ENGINE.md).
276
+
277
+
---
278
+
279
+
280
+
238
281
## 📐 Examples Across Every Backend
239
282
240
283
Same expression syntax, five different execution tiers. Pick based on how hot the loop is.
@@ -421,6 +464,7 @@ Running any of this in production? Production infrastructures requiring predicta
***High-Fidelity Graphical Plotting:**[GRAPHING.md](parser-ng/GRAPHING.md) — Render configuration rules for JavaFX, Swing, and Android surfaces.
423
466
***Bulk Vectorization Blueprints:**[BULK.md](https://www.google.com/search?q=parser-ng/BULK.md) — Optimization techniques for massive array processing.
467
+
***Differential Equations:**[DIFF_ENGINE.md](parser-ng/DIFF_ENGINE.md) — Full `diffeqn`/`diffeqnPath`/`diffeqnHO`/`diffeqnPathHO` syntax, solver selection guide, and result-capture patterns.
424
468
***Release Artifact Logs:**[LATEST.md](LATEST.md) — Change logs and technical notes for v3.0.3.
425
469
*[MORE.md](MORE.md) — Even more to know
426
470
*[Hello world and original readme](src/main/java/com/github/gbenroscience/README.md) — Original readme for pre-1.0 versions with a lot of, still valid, examples
0 commit comments