many edits

This commit is contained in:
jverzani
2024-04-26 18:26:12 -04:00
parent 6e807edb46
commit 4f924557ad
45 changed files with 326 additions and 296 deletions

View File

@@ -16,7 +16,7 @@ using ModelingToolkit
---
The [`DifferentialEquations`](https://github.com/SciML/DifferentialEquations.jl) suite of packages contains solvers for a wide range of various differential equations. This section just briefly touches on ordinary differential equations (ODEs), and so relies only on `OrdinaryDiffEq` part of the suite. For more detail on this type and many others covered by the suite of packages, there are many other resources, including the [documentation](https://diffeq.sciml.ai/stable/) and accompanying [tutorials](https://github.com/SciML/SciMLTutorials.jl).
The [`DifferentialEquations`](https://github.com/SciML/DifferentialEquations.jl) suite of packages contains solvers for a wide range of various differential equations. This section just briefly touches on ordinary differential equations (ODEs), and so relies only on `OrdinaryDiffEq`, a small part of the suite. For more detail on this type and many others covered by the suite of packages, there are many other resources, including the [documentation](https://diffeq.sciml.ai/stable/) and accompanying [tutorials](https://github.com/SciML/SciMLTutorials.jl).
## SIR Model

View File

@@ -94,7 +94,7 @@ function make_euler_graph(n)
scatter!(p, xs, ys)
## add function
out = dsolve(u'(x) - F(u(x), x), u(x), ics=(u, x0, y0))
out = dsolve(D(u)(x) - F(u(x), x), u(x), ics=Dict(u(x0) => y0))
plot!(p, rhs(out), x0, xs[end], linewidth=5)
p

View File

@@ -567,7 +567,7 @@ We enter this into `Julia`:
```{julia}
@syms w::positive H::positive y()
eqnc = D2(y)(x) ~ (w/H) * sqrt(1 + y'(x)^2)
eqnc = D2(y)(x) ~ (w/H) * sqrt(1 + D(y(x))^2)
```
Unfortunately, `SymPy` needs a bit of help with this problem, by breaking the problem into steps.

View File

@@ -227,7 +227,6 @@ Finally, the author of the post shows how the interface can compose with other p
```{julia}
earth₄ = Problem(y0 = 0.0 ± 0.0, v0 = 30.0 ± 1.0)
sol_euler₄ = solve(earth₄)
sol_sympl₄ = solve(earth₄, Symplectic2ndOrder(dt = 2.0))