Skip to content

Commit 85a1b75

Browse files
committed
Fix bug in AM methods
1 parent 3da7262 commit 85a1b75

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

newton_cotes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ $$
120120

121121
:::{prf:example}
122122

123-
(1) By Weirstrass theorem, the set of all polynomials is dense in $\cts[a,b]$.
123+
(1) **Polynomials.** By Weirstrass theorem, the set of all polynomials is dense in $\cts[a,b]$.
124124

125-
(2) Define the set of continuous, piecewise affine functions
125+
(2) **Piecewise polynomials.** Define the set of continuous, piecewise affine functions
126126

127127
$$
128128
\mathcal{F} = \{ f \in \cts[a,b] : \exists \textrm{ a partition $\{x_j\}$ of $[a,b]$ s.t. } f|_{[x_{j-1},x_j]} \in \poly_1 \}

ode/ode_stability.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,30 @@ plt.axis('equal');
6868
```
6969

7070
```{code-cell} ipython3
71-
def AM2(theta):
71+
def AM3(theta):
7272
w = np.exp(1j*theta)
7373
return (w**2 - w)/(5.0*w**2/12.0 + 2.0*w/3.0 - 1.0/12.0)
7474
75-
def AM3(theta):
75+
def AM4(theta):
7676
w = np.exp(1j*theta)
77-
return (w**3 - w**2)/(3.0*w**3/8.0 + 19.0*w**2/24.0 - 5.0*w/24.0 - 1.0/24.0)
77+
return (w**3 - w**2)/(3.0*w**3/8.0 + 19.0*w**2/24.0 - 5.0*w/24.0 + 1.0/24.0)
7878
```
7979

8080
```{code-cell} ipython3
81-
z = AM2(theta)
81+
z = AM3(theta)
8282
plt.plot(np.real(z),np.imag(z))
8383
84-
z = AM3(theta)
84+
z = AM4(theta)
8585
plt.plot(np.real(z),np.imag(z))
8686
87-
plt.legend(("AM2","AM3"))
87+
plt.legend(("AM3","AM4"))
8888
plt.xlim([-7, 2])
8989
plt.ylim([-4, 4])
9090
plt.grid(True)
9191
plt.axis('equal');
9292
```
9393

94-
These discs are bigger than those for the AB methods, but they are also not A-stable methods.
94+
These discs are bigger than those for the AB methods, but they are also not A-stable methods. The imaginary axis is not contained in their stability domains, so these methods cannot be used for hyperbolic problems.
9595

9696
+++
9797

0 commit comments

Comments
 (0)