Skip to content

Commit 4c2ff72

Browse files
committed
Use ω(t) as intermediate function instead of dθ
Easier to connect these concepts in the reader's mind if they see the angular velocity as its own function rather than a differential (as opposed to a derivative, even).
1 parent bf06f8a commit 4c2ff72

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/examples/classical_physics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ But we have numerical ODE solvers! Why not solve the *real* pendulum?
120120

121121
Notice that now we have a second order ODE.
122122
In order to use the same method as above, we need to transform it into a system
123-
of first order ODEs by employing the notation `` = \dot{θ}``.
123+
of first order ODEs by employing the notation ``ω(t) = \dot{θ}``.
124124

125125
```math
126126
\begin{align*}
127-
\dot{θ} &= \\
128-
\dot{} &= - \frac{g}{L} \sin(θ)
127+
\dot{θ} &= ω \\
128+
\dot{ω} &= - \frac{g}{L} \sin(θ)
129129
\end{align*}
130130
```
131131

@@ -143,8 +143,8 @@ tspan = (0.0, 6.3)
143143
144144
#Define the problem
145145
function simplependulum(du, u, p, t)
146-
θ, = u
147-
du[1] =
146+
θ, ω = u
147+
du[1] = ω
148148
du[2] = -(g / L) * sin(θ)
149149
end
150150

0 commit comments

Comments
 (0)