HC03
HC03
HC03
Fitzhugh-Nagumo revisited
Phase Portraits
Diagonalization
Planar Linear Systems
Real Eigenvalues
Generating the portrait
Transitions
dV
dt = V (V − a)(1 − V ) − W + I,
dW
dt = ϵ(V − bW ).
Different parameter settings yield either
Subthreshold oscillations or Action potentials
0.1 1
0.8
0
0.6
0.4
−0.1
V
V
0.2
0
−0.2
−0.2
−0.3 −0.4
0 200 400 600 800 1000 0 200 400 600 800 1000
Time (ms) Time (ms)
u ′ = T −1 y ′ = T −1 Ay = T −1
| {zAT} u
D
If we choose T to be the matrix with eigenvectors as columns,
then D is diagonal. (T maps standard unit vectors to eigenvectors)
Mathematical Methods 2023-11-28 7 / 29
Diagonalization
u ′ = T −1 y ′ = T −1 Ay = T −1
| {zAT} u
D
If we choose T to be the matrix with eigenvectors as columns,
then D is diagonal. (T maps standard unit vectors to eigenvectors)
Mathematical Methods 2023-11-28 7 / 29
Eigenvalue combinations
′ a11 a12
y = y
a21 a22
Get eigenvalues from characteristic polynomial
Possibilities
▶ λ1 < 0 < λ2 Saddle
▶ λ1 < λ2 < 0 Stable Node
▶ 0 < λ1 < λ2 Unstable Node (reverse time)
General solution is x(t) = c1 eλ1 t v1 + c2 eλ2 t v2
https://chat.openai.com/share/
07e3ac2a-9e2d-4347-a948-5b8160c8bb4b
The code appears to be pretty ok. Execution leads to two
problems.
▶ First, The command Hold is not there, and is not
needed=⇒ Remove that line
▶ Second, The command expm is part of the package
scipy.linalg not numpy. =⇒ Load that submodule explicitly.
for i in range(8):
sol = np.zeros((2, len(t)))
for jj in range(len(t)):
sol[:, jj] = np.dot(spla.expm(t[jj] * A), y0[:, i])
plt.plot(sol[0, :], sol[1, :])
plt.xlim([-2, 2])
plt.ylim([-2, 2])
plt.show()
Mathematical Methods 2023-11-28 17 / 29
The transition from saddle to spiral
saddle critical node stable spiral
Fitzhugh-Nagumo revisited
Phase Portraits
Diagonalization
Planar Linear Systems
Real Eigenvalues
Generating the portrait
Transitions
Quadrature:=Numerical integration
Z b
f (x)dx =?
a
′′
For one interval: f (x) − p1 (x) = (x − x0 )(x − x1 ) f2
Determine error by integration
Rx Rx ′′
E1 = x01 f (x) − p1 (x)dx = x01 (x − x0 )(x − x1 ) f2 dx
f ′′ h3 ′′
Rh
|{z} 0 v (v − h) 2 dv = 12 f
=
x=x0 +v
(b − a)h2
Error ≈ C
12
ε = Ch4
Fitzhugh-Nagumo revisited
Phase Portraits
Diagonalization
Planar Linear Systems
Real Eigenvalues
Generating the portrait
Transitions
The approximation
▶ f (s, y (s)) ≈ f (x, y(x)) yields Euler-forward.
▶ f (s, y (s)) ≈ f (x + h, y (x + h)) yields Euler-backward.
Euler-backward defines the solution implicitly by
y (x + h) − y (x) = hf (x + h, y (x + h)).