Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions book_src/chapters/chapter1.do.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class ForwardEuler_v0:
"""Compute solution for t_span[0] <= t <= t_span[1],
using N steps."""
t0, T = t_span
self.dt = T / N
self.dt = (T - t0) / N
self.t = np.zeros(N + 1) # N steps ~ N+1 time points
self.u = np.zeros(N + 1)

Expand Down Expand Up @@ -394,8 +394,8 @@ by systems of ODEs, i.e., multiple ODEs where the right-hand side of one equatio
systems are also referred to as vector ODEs. One simple example is
!bt
\begin{alignat*}{2}
u' &= v, \quad &&u(0) = 1\\
v' &= -u, \quad &&v(0) = 0.
u' &= -v, \quad &&u(0) = 1\\
v' &= u, \quad &&v(0) = 0.
\end{alignat*}
!et
The solution of this system is $u=\cos t, v=\sin t$, which can easily be verified by inserting the solution into the equations
Expand Down