You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# where $w(x) = w^{(\alpha,\beta,\gamma,\delta,\epsilon)}(x) = (1-x)^\alpha(1+x)^\beta(2+x)^\gamma(3+x)^\delta(5-x)^\epsilon$ is a modification of the Jacobi weight.
7
-
# We shall use results from [this paper](https://arxiv.org/abs/2302.08448) to consider these semi-classical orthogonal polynomials as modifications of the Jacobi polynomials $P_n^{(\alpha,\beta)}(x)$.
7
+
# We shall use results from [this paper](https://arxiv.org/abs/2302.08448) to consider these semi-classical orthogonal polynomials as modifications of the orthonormalized Jacobi polynomials $\tilde{P}_n^{(\alpha,\beta)}(x)$.
8
8
9
-
using ApproxFun, FastTransforms, LinearAlgebra, Plots, LaTeXStrings
9
+
using ApproxFun, FastTransforms, LazyArrays, LinearAlgebra, Plots, LaTeXStrings
q = k ->lmul!(P1, lmul!(P, [zeros(k); 1.0; zeros(n-k)]))
31
31
qvals = k ->ichebyshevtransform(q(k))
32
32
33
-
# With the symmetric Jacobi matrix for $P_n^{(\alpha, \beta)}(x)$ and the modified plan, we may compute the modified Jacobi matrix and the corresponding roots (as eigenvalues):
33
+
# With the symmetric Jacobi matrix for $\tilde{P}_n^{(\alpha, \beta)}(x)$ and the modified plan, we may compute the modified Jacobi matrix and the corresponding roots (as eigenvalues):
34
34
x =Fun(x->x, NormalizedJacobi(β, α))
35
35
XP =SymTridiagonal(Symmetric(Multiplication(x, space(x))[1:n+1, 1:n+1]))
36
36
XQ = FastTransforms.modified_jacobi_matrix(P, XP)
@@ -61,18 +61,21 @@ function threshold!(A::AbstractArray, ϵ)
# A faster method now exists via the `GramMatrix` architecture and its associated displacement equation. We compute `U`:
69
-
U =Symmetric(Multiplication(u, space(u))[1:n+1, 1:n+1])
70
-
71
-
# Then we form a `GramMatrix` together with the Jacobi matrix:
72
-
G =GramMatrix(U, XP)
68
+
# A faster method now exists via the `GramMatrix` architecture and its associated displacement equation. Given the modified orthogonal polynomial moments implied by the normalized Jacobi series for $u(x)$, we pad this vector to the necessary size and construct the `GramMatrix` with these moments, the multiplication operator, and the constant $\tilde{P}_0^{(\alpha,\beta)}(x)$:
# And compute its cholesky factorization. The upper-triangular Cholesky factor represents the connection between original Jacobi and semi-classical Jacobi as ${\bf P}^{(\alpha,\beta)}(x) = {\bf Q}(x) R$.
75
77
R =cholesky(G).U
78
+
R[1:10, 1:10]
76
79
77
80
# Every else works almost as before, including evaluation on a Chebyshev grid:
78
81
q = k ->lmul!(P1, ldiv!(R, [zeros(k); 1.0; zeros(n-k)]))
0 commit comments