119119# #########
120120
121121# Ultraspherical(1)\(D*Chebyshev())
122- diff (S:: ChebyshevU ; dims= 1 ) = diff (Ultraspherical (S))
122+ diff (S:: ChebyshevU , m... ; dims= 1 ) = diff (Ultraspherical (S), m... ; dims)
123+ diff (S:: Legendre , m... ; dims= 1 ) = diff (Ultraspherical (S), m... ; dims)
124+
123125
124126# Ultraspherical(1/2)\(D*Legendre())
127+ # Special cased as its a Ones
125128function diff (S:: Legendre{T} ; dims= 1 ) where T
126129 A = _BandedMatrix (Ones {T} (1 ,∞), ℵ₀, - 1 ,1 )
127130 ApplyQuasiMatrix (* , Ultraspherical {T} (convert (T,3 )/ 2 ), A)
@@ -134,6 +137,20 @@ function diff(S::Ultraspherical{T}; dims=1) where T
134137 ApplyQuasiMatrix (* , Ultraspherical {T} (S. λ+ 1 ), A)
135138end
136139
140+ # higher order
141+
142+ function diff (:: ChebyshevT{T} , m:: Integer ; dims= 1 ) where T
143+ μ = pochhammer (one (T),m- 1 )* convert (T,2 )^ (m- 1 )
144+ D = _BandedMatrix ((μ * (0 : ∞))' , ℵ₀, - m, m)
145+ ApplyQuasiMatrix (* , Ultraspherical {T} (m), D)
146+ end
147+
148+ function diff (C:: Ultraspherical{T} , m:: Integer ; dims= 1 ) where T
149+ μ = pochhammer (convert (T,C. λ),m)* convert (T,2 )^ m
150+ D = _BandedMatrix (Fill (μ,1 ,∞), ℵ₀, - m, m)
151+ ApplyQuasiMatrix (* , Ultraspherical {T} (C. λ+ m), D)
152+ end
153+
137154# Ultraspherical(λ-1)\ (D*wUltraspherical(λ))
138155function diff (WS:: Weighted{T,<:Ultraspherical} ; dims= 1 ) where T
139156 S = WS. P
0 commit comments