13
13
# =========================================================================================================================
14
14
15
15
# --- Error bounds using a priori estimate from [1] ---
16
-
17
- # See Theorem 4.2 in [1]. This is a bound based on an a priori estimate
18
- # of the norm of the exact solution x(t).
19
16
# These bounds use the supremum norm (p = Inf).
17
+
18
+ # see Theorem 4.2 in [1]; this bound is based on an a priori estimate
19
+ # of the norm of the exact solution x(t)
20
20
function error_bound_apriori (α, F₁, F₂; N)
21
21
nF₂ = opnorm (F₂, Inf )
22
22
μF₁ = logarithmic_norm (F₁, Inf )
@@ -26,7 +26,7 @@ function error_bound_apriori(α, F₁, F₂; N)
26
26
return ε
27
27
end
28
28
29
- # See Theorem 4.2 in [1]
29
+ # see Theorem 4.2 in [1]
30
30
function convergence_radius_apriori (α, F₁, F₂)
31
31
nF₂ = opnorm (F₂, Inf )
32
32
μF₁ = logarithmic_norm (F₁, Inf )
41
41
42
42
# --- Error bounds using power series method from [1] ---
43
43
44
- # See Theorem 4.3 in [1], which uses the power series method.
44
+ # see Theorem 4.3 in [1], which uses the power series method
45
45
function error_bound_pseries (x₀, F₁, F₂; N)
46
46
nx₀ = norm (x₀, Inf )
47
47
nF₁ = opnorm (F₁, Inf )
@@ -52,7 +52,7 @@ function error_bound_pseries(x₀, F₁, F₂; N)
52
52
return ε
53
53
end
54
54
55
- # See Theorem 4.3 in [1].
55
+ # see Theorem 4.3 in [1]
56
56
function convergence_radius_pseries (x₀, F₁, F₂)
57
57
nx₀ = norm (x₀, Inf )
58
58
nF₁ = opnorm (F₁, Inf )
@@ -64,47 +64,37 @@ function convergence_radius_pseries(x₀, F₁, F₂)
64
64
end
65
65
66
66
# --- Error bounds using spectral abscissa from [2] ---
67
+ # These bounds use the spectral norm (p = 2).
67
68
68
69
# compute eigenvalues and sort them by increasing real part
69
- function _error_bound_specabs_Re_λ₁ (F₁; check = true )
70
+ function _error_bound_specabs_Re_λ₁ (F₁)
70
71
λ = eigvals (F₁; sortby= real)
71
- λ₁ = last (λ)
72
- Re_λ₁ = real (λ₁)
73
- if check && Re_λ₁ > 0
74
- throw (ArgumentError (" expected Re(λ₁) ≤ 0, got $Re_λ₁ " ))
75
- end
76
- return Re_λ₁
72
+ return real (last (λ))
77
73
end
78
74
79
- # See Definition (2.2) in [2]. These bounds use the spectral norm (p = 2)
80
- function _error_bound_specabs_R (x₀, F₂, Re_λ₁)
75
+ # see Corollary 1 in [2]
76
+ function error_bound_specabs (x₀, F₁, F₂; N, check= true )
77
+ Re_λ₁ = _error_bound_specabs_Re_λ₁ (F₁)
78
+ if check && Re_λ₁ >= 0
79
+ throw (ArgumentError (" expected Re(λ₁) < 0, got $Re_λ₁ " ))
80
+ end
81
+
82
+ # Equation (2.2)
81
83
nx₀ = norm (x₀, 2 )
82
84
nF₂ = opnorm (F₂, 2 )
83
- R = nx₀ * nF₂ / abs (Re_λ₁)
84
- return R
85
- end
86
-
87
- # See Corollary 1 in [2]
88
- function error_bound_specabs (x₀, F₁, F₂; N, check= true )
89
- Re_λ₁ = _error_bound_specabs_Re_λ₁ (F₁; check= check)
90
- R = _error_bound_specabs_R (x₀, F₂, Re_λ₁)
85
+ R = nx₀ * nF₂ / - Re_λ₁
91
86
if check && R >= 1
92
87
throw (ArgumentError (" expected R < 1, got R = $R ; try scaling the ODE" ))
93
88
end
94
89
95
- nx₀ = norm (x₀, 2 )
96
- if iszero (Re_λ₁)
97
- nF₂ = opnorm (F₂, 2 )
98
- ε = t -> nx₀ * (nx₀ * nF₂ * t)^ N
99
- else
100
- ε = t -> nx₀ * R^ N * (1 - exp (Re_λ₁ * t))^ N
101
- end
90
+ # Equation (4.29)
91
+ ε = t -> nx₀ * R^ N * (1 - exp (Re_λ₁ * t))^ N
102
92
return ε
103
93
end
104
94
105
- # See Corollary 1 in [2]
106
- function convergence_radius_specabs (x₀, F₁, F₂; check = true )
107
- Re_λ₁ = _error_bound_specabs_Re_λ₁ (F₁; check = check )
95
+ # see Corollary 1 in [2]
96
+ function convergence_radius_specabs (x₀, F₁, F₂)
97
+ Re_λ₁ = _error_bound_specabs_Re_λ₁ (F₁)
108
98
109
99
if Re_λ₁ < 0
110
100
T = Inf
0 commit comments