Skip to content

Commit 702c726

Browse files
committed
Change back notation
Not the best notation
1 parent 56e331b commit 702c726

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tutorials/models/01-classical_physics.jmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ $$\ddot{\theta} + \frac{g}{L}{\sin(\theta)} = 0$$
5050

5151
Notice that now we have a second order ODE.
5252
In order to use the same method as above, we nee to transform it into a system
53-
of first order ODEs by employing the notation $\omega = \dot{\theta}$.
53+
of first order ODEs by employing the notation $d\theta = \dot{\theta}$.
5454

5555
$$
56-
\begin{align}
57-
&\dot{\theta} = \omega \\
58-
&\dot{\omega} = - \frac{g}{L}{\sin(\theta)}
59-
\end{align}
56+
\begin{align*}
57+
&\dot{\theta} = d{\theta} \\
58+
&\dot{d\theta} = - \frac{g}{L}{\sin(\theta)}
59+
\end{align*}
6060
$$
6161

6262
```julia
@@ -74,17 +74,17 @@ tspan = (0.0,6.3)
7474
#Define the problem
7575
function simplependulum(du,u,p,t)
7676
θ = u[1]
77-
ω = u[2]
78-
du[1] = ω
77+
= u[2]
78+
du[1] =
7979
du[2] = -(g/L)*sin(θ)
8080
end
8181

8282
#Pass to solvers
83-
prob = ODEProblem(simplependulum,u₀, tspan)
83+
prob = ODEProblem(simplependulum, u₀, tspan)
8484
sol = solve(prob,Tsit5())
8585

8686
#Plot
87-
plot(sol,linewidth=2,title ="Simple Pendulum Problem", xaxis = "Time", yaxis = "Height", label = ["Theta","dTheta"])
87+
plot(sol,linewidth=2,title ="Simple Pendulum Problem", xaxis = "Time", yaxis = "Height", label = ["\\theta" "d\\theta"])
8888
```
8989

9090
So now we know that behaviour of the position versus time. However, it will be useful to us to look at the phase space of the pendulum, i.e., and representation of all possible states of the system in question (the pendulum) by looking at its velocity and position. Phase space analysis is ubiquitous in the analysis of dynamical systems, and thus we will provide a few facilities for it.

0 commit comments

Comments
 (0)