Skip to content

Commit fca7213

Browse files
committedDec 11, 2022
fix a few bugs
1 parent 61173bd commit fca7213

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎docs/pages.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pages = [
1212
"examples/modelingtoolkitize_index_reduction.md"],
1313
"Advanced Examples" => Any["examples/tearing_parallelism.md",
1414
"examples/sparse_jacobians.md",
15-
"examples/symbolicnumeric_differential.md"]],
15+
"examples/perturbation.md"]],
1616
"Basics" => Any["basics/AbstractSystem.md",
1717
"basics/ContextualVariables.md",
1818
"basics/Variable_metadata.md",

‎docs/src/examples/symbolicnumeric_differential.md ‎docs/src/examples/perturbation.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Symbolic-Numerical Perturbation Theory for ODEs](@id perturb_diff)
1+
# [Symbolic-Numeric Perturbation Theory for ODEs](@id perturb_diff)
22

33
## Prelims
44

@@ -38,16 +38,15 @@ In the first two examples, we applied the perturbation method to algebraic probl
3838

3939
As the first ODE example, we have chosen a simple and well-behaved problem, which is a variation of a standard first-year physics problem: what is the trajectory of an object (say, a ball or a rocket) thrown vertically at velocity $v$ from the surface of a planet? Assuming a constant acceleration of gravity, $g$, every burgeoning physicist knows the answer: $x(t) = x(0) + vt - \frac{1}{2}gt^2$. However, what happens if $g$ is not constant? Specifically, $g$ is inversely proportional to the distant from the center of the planet. If $v$ is large and the projectile travels a large fraction of the radius of the planet, the assumption of constant gravity does not hold anymore. However, unless $v$ is large compared to the escape velocity, the correction is usually small. After simplifications and change of variables to dimensionless, the problem becomes
4040

41-
$$
41+
```math
4242
\ddot{x}(t) = -\frac{1}{(1 + \epsilon x(t))^2}
43-
\,,
44-
$$
43+
```
4544

4645
with the initial conditions $x(0) = 0$, and $\dot{x}(0) = 1$. Note that for $\epsilon = 0$, this equation transforms back to the standard one. Let's start with defining the variables
4746

4847
```@example perturb
4948
n = 3
50-
@variables ϵ t y[1:n](t) ∂∂y[1:n]
49+
@variables ϵ t y[1:n](t) ∂∂y[1:n](t)
5150
```
5251

5352
Next, we define $x$.

0 commit comments

Comments
 (0)
Please sign in to comment.