Skip to content

Commit fe4a3ed

Browse files
authored
Docs: display operators in repl blocks (JuliaApproximation#890)
1 parent e5f517b commit fe4a3ed

File tree

1 file changed

+43
-172
lines changed

1 file changed

+43
-172
lines changed

docs/src/usage/operators.md

Lines changed: 43 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ DocTestSetup = quote
33
using ApproxFun, LinearAlgebra
44
end
55
```
6+
```@setup packages
7+
using ApproxFun
8+
```
69

710
# Operators
811

9-
Linear operators between two spaces in ApproxFun are represented by subtypes of `Operator`. Every operator has a `domainspace` and `rangespace`. That is, if a `Fun` `f` has the space `domainspace(op)`, then`op*f` is a `Fun` with space `rangespace(op)`.
12+
Linear operators between two spaces in ApproxFun are represented by subtypes of `Operator`. Every operator has a `domainspace` and `rangespace`. That is, if a `Fun` `f` has the space `domainspace(op)`, then`op * f` is a `Fun` with space `rangespace(op)`.
1013

1114
Note that the size of an operator is specified by the dimension of the domain and range space.
1215

@@ -15,23 +18,11 @@ Note that the size of an operator is specified by the dimension of the domain an
1518
Differential and integral operators are perhaps the most useful type of operators in mathematics. Consider the derivative operator on `CosSpace`:
1619

1720
```jldoctest def-D
18-
julia> D = Derivative(CosSpace())
19-
ConcreteDerivative : CosSpace(【0.0,6.283185307179586❫) → SinSpace(【0.0,6.283185307179586❫)
20-
⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
21-
⋅ ⋅ -2.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
22-
⋅ ⋅ ⋅ -3.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
23-
⋅ ⋅ ⋅ ⋅ -4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
24-
⋅ ⋅ ⋅ ⋅ ⋅ -5.0 ⋅ ⋅ ⋅ ⋅ ⋅
25-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -6.0 ⋅ ⋅ ⋅ ⋅
26-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -7.0 ⋅ ⋅ ⋅
27-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -8.0 ⋅ ⋅
28-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -9.0 ⋅
29-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
30-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
21+
julia> D = Derivative(CosSpace());
3122
3223
julia> f = Fun(θ->cos(cos(θ)), CosSpace());
3324
34-
julia> fp = D*f;
25+
julia> fp = D * f;
3526
3627
julia> fp(0.1) ≈ f'(0.1) ≈ sin(cos(0.1))*sin(0.1)
3728
true
@@ -58,26 +49,14 @@ julia> k,j = 5,6;
5849
5950
julia> ej = Fun(domainspace(D), [zeros(j-1);1]);
6051
61-
julia> D[k,j] ≈ coefficient(D*ej, k) ≈ -k
52+
julia> D[k,j] ≈ coefficient(D * ej, k) ≈ -k
6253
true
6354
```
6455

6556
The `Chebyshev` space has the property that its derivatives are given by ultraspherical spaces:
6657

67-
```jldoctest
68-
julia> Derivative(Chebyshev())
69-
ConcreteDerivative : Chebyshev() → Ultraspherical(1)
70-
⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
71-
⋅ ⋅ 2.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
72-
⋅ ⋅ ⋅ 3.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
73-
⋅ ⋅ ⋅ ⋅ 4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
74-
⋅ ⋅ ⋅ ⋅ ⋅ 5.0 ⋅ ⋅ ⋅ ⋅ ⋅
75-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 6.0 ⋅ ⋅ ⋅ ⋅
76-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 7.0 ⋅ ⋅ ⋅
77-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 8.0 ⋅ ⋅
78-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 9.0 ⋅
79-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
80-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
58+
```@repl packages
59+
Derivative(Chebyshev())
8160
```
8261

8362
## Functionals
@@ -87,11 +66,9 @@ A particularly useful class of operators are _functionals_, which map from funct
8766
As an example, the evaluation functional `f(0)` on `CosSpace` has the form:
8867

8968
```jldoctest def-D
90-
julia> B = Evaluation(CosSpace(), 0)
91-
ConcreteEvaluation : CosSpace(【0.0,6.283185307179586❫) → ConstantSpace(Point(0))
92-
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 ⋯
69+
julia> B = Evaluation(CosSpace(), 0);
9370
94-
julia> B*f ≈ f(0)
71+
julia> B * f ≈ f(0)
9572
true
9673
```
9774

@@ -100,11 +77,7 @@ As can be seen from the output, `rangespace(B)` is a `ConstantSpace(Point(0))`,
10077
Closely related to functionals are operators with finite-dimensional range. For example, the `Dirichlet` operator represents the restriction of a space to its boundary. In the case, of `Chebyshev()`, this amounts to evaluation at the endpoints `±1`:
10178

10279
```jldocetst
103-
julia> B = Dirichlet(Chebyshev())
104-
ConcreteDirichlet : Chebyshev() → 2-element ArraySpace:
105-
ConstantSpace{Point{Float64}, Float64}[ConstantSpace(Point(-1.0)), ConstantSpace(Point(1.0))]
106-
1.0 -1.0 1.0 -1.0 1.0 -1.0 1.0 -1.0 1.0 -1.0 ⋯
107-
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 ⋯
80+
julia> B = Dirichlet(Chebyshev());
10881
10982
julia> size(B)
11083
(2, ℵ₀)
@@ -120,19 +93,7 @@ A `Multiplication` operator sends a `Fun` to a `Fun` in the corresponding space
12093
```jldoctest
12194
julia> x = Fun();
12295
123-
julia> M = Multiplication(1 + 2x + x^2, Chebyshev())
124-
ConcreteMultiplication : Chebyshev() → Chebyshev()
125-
1.5 1.0 0.25 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
126-
2.0 1.75 1.0 0.25 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
127-
0.5 1.0 1.5 1.0 0.25 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
128-
⋅ 0.25 1.0 1.5 1.0 0.25 ⋅ ⋅ ⋅ ⋅ ⋅
129-
⋅ ⋅ 0.25 1.0 1.5 1.0 0.25 ⋅ ⋅ ⋅ ⋅
130-
⋅ ⋅ ⋅ 0.25 1.0 1.5 1.0 0.25 ⋅ ⋅ ⋅
131-
⋅ ⋅ ⋅ ⋅ 0.25 1.0 1.5 1.0 0.25 ⋅ ⋅
132-
⋅ ⋅ ⋅ ⋅ ⋅ 0.25 1.0 1.5 1.0 0.25 ⋅
133-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.25 1.0 1.5 1.0 ⋱
134-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.25 1.0 1.5 ⋱
135-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱ ⋱ ⋱
96+
julia> M = Multiplication(1 + 2x + x^2, Chebyshev());
13697
13798
julia> coefficients(M * x) == coefficients((1 + 2x + x^2) * x) == M[1:4,1:2] * coefficients(x)
13899
true
@@ -178,81 +139,25 @@ Operators can be algebraically manipulated, provided that the domain and range s
178139
identity operator:
179140

180141
```jldoctest
181-
julia> D2 = Derivative(Fourier(),2)
182-
DerivativeWrapper : Fourier(【0.0,6.283185307179586❫) → Fourier(【0.0,6.283185307179586❫)
183-
0.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
184-
⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
185-
⋅ ⋅ -1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
186-
⋅ ⋅ ⋅ -4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
187-
⋅ ⋅ ⋅ ⋅ -4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
188-
⋅ ⋅ ⋅ ⋅ ⋅ -9.0 ⋅ ⋅ ⋅ ⋅ ⋅
189-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -9.0 ⋅ ⋅ ⋅ ⋅
190-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -16.0 ⋅ ⋅ ⋅
191-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -16.0 ⋅ ⋅
192-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -25.0 ⋅
193-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
194-
195-
julia> D2 + I
196-
PlusOperator : Fourier(【0.0,6.283185307179586❫) → Fourier(【0.0,6.283185307179586❫)
197-
1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
198-
⋅ 0.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
199-
⋅ ⋅ 0.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
200-
⋅ ⋅ ⋅ -3.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
201-
⋅ ⋅ ⋅ ⋅ -3.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
202-
⋅ ⋅ ⋅ ⋅ ⋅ -8.0 ⋅ ⋅ ⋅ ⋅ ⋅
203-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -8.0 ⋅ ⋅ ⋅ ⋅
204-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -15.0 ⋅ ⋅ ⋅
205-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -15.0 ⋅ ⋅
206-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ -24.0 ⋅
207-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
142+
julia> D2 = Derivative(Fourier(),2);
143+
144+
julia> (D2 + I) * Fun(x -> cos(2x), Fourier()) ≈ Fun(x -> -3cos(2x), Fourier())
145+
true
208146
```
209147

210148
When the domain and range space are not the same, the identity operator becomes a conversion operator. That is, to represent `D+I` acting on the Chebyshev space, we would do the following:
211149

212150
```jldoctest
213-
julia> D = Derivative(Chebyshev())
214-
ConcreteDerivative : Chebyshev() → Ultraspherical(1)
215-
⋅ 1.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
216-
⋅ ⋅ 2.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
217-
⋅ ⋅ ⋅ 3.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
218-
⋅ ⋅ ⋅ ⋅ 4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
219-
⋅ ⋅ ⋅ ⋅ ⋅ 5.0 ⋅ ⋅ ⋅ ⋅ ⋅
220-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 6.0 ⋅ ⋅ ⋅ ⋅
221-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 7.0 ⋅ ⋅ ⋅
222-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 8.0 ⋅ ⋅
223-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 9.0 ⋅
224-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
225-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
226-
227-
julia> C = Conversion(Chebyshev(), Ultraspherical(1))
228-
ConcreteConversion : Chebyshev() → Ultraspherical(1)
229-
1.0 0.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
230-
⋅ 0.5 0.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
231-
⋅ ⋅ 0.5 0.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
232-
⋅ ⋅ ⋅ 0.5 0.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅
233-
⋅ ⋅ ⋅ ⋅ 0.5 0.0 -0.5 ⋅ ⋅ ⋅ ⋅
234-
⋅ ⋅ ⋅ ⋅ ⋅ 0.5 0.0 -0.5 ⋅ ⋅ ⋅
235-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 0.0 -0.5 ⋅ ⋅
236-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 0.0 -0.5 ⋅
237-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 0.0 ⋱
238-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 ⋱
239-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
240-
241-
julia> D + I
242-
PlusOperator : Chebyshev() → Ultraspherical(1)
243-
1.0 1.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
244-
⋅ 0.5 2.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
245-
⋅ ⋅ 0.5 3.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
246-
⋅ ⋅ ⋅ 0.5 4.0 -0.5 ⋅ ⋅ ⋅ ⋅ ⋅
247-
⋅ ⋅ ⋅ ⋅ 0.5 5.0 -0.5 ⋅ ⋅ ⋅ ⋅
248-
⋅ ⋅ ⋅ ⋅ ⋅ 0.5 6.0 -0.5 ⋅ ⋅ ⋅
249-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 7.0 -0.5 ⋅ ⋅
250-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 8.0 -0.5 ⋅
251-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 9.0 ⋱
252-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.5 ⋱
253-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
254-
255-
julia> (D + I)[1:10, 1:10] == (D + C)[1:10, 1:10]
151+
julia> f = Fun(x->x^3, Chebyshev());
152+
153+
julia> D = Derivative(Chebyshev());
154+
155+
julia> (D + I) * f ≈ Fun(x->x^3 + 3x^2)
156+
true
157+
158+
julia> C = Conversion(Chebyshev(), Ultraspherical(1));
159+
160+
julia> (D + C) * f ≈ Fun(x->x^3 + 3x^2)
256161
true
257162
```
258163

@@ -275,52 +180,31 @@ julia> L = I + exp(x)*Σ;
275180
276181
julia> u = cos(10x^2);
277182
278-
julia> (L*u)(0.1) ≈ u(0.1) + exp(0.1)*sum(u)
183+
julia> (L * u)(0.1) ≈ u(0.1) + exp(0.1) * sum(u)
279184
true
280185
```
281186

282-
Note that `DefiniteIntegral` is a functional, i.e., a 1 × ∞ operator. when multiplied on the left by a function, it automatically constructs the operator ``\mathop{e}^x \int_{-1}^1 \mathop{f}(x) \mathop{dx}`` via
187+
Note that `DefiniteIntegral` is a functional, i.e., a 1 × ∞ operator. when multiplied on the left by a function, it automatically constructs the operator ``\mathrm{L}=\mathop{e}^x \int_{-1}^1 \mathop{f}(x) \mathop{dx}`` via
283188

284189
```jldoctest
285190
julia> x = Fun();
286191
287-
julia> Σ = DefiniteIntegral(Chebyshev());
192+
julia> Σ = DefiniteIntegral();
193+
194+
julia> M = Multiplication(exp(x));
288195
289-
julia> M = Multiplication(exp(x),ConstantSpace())
290-
ConcreteMultiplication : ConstantSpace → Chebyshev()
291-
1.26607
292-
1.13032
293-
0.271495
294-
0.0443368
295-
0.00547424
296-
0.000542926
297-
4.49773e-5
298-
3.19844e-6
299-
1.99212e-7
300-
1.10368e-8
301-
302-
303-
julia> M*Σ
304-
TimesOperator : Chebyshev() → Chebyshev()
305-
2.53213 0.0 -0.844044 0.0 … 0.0 -0.0401926 0.0 ⋯
306-
2.26064 0.0 -0.753545 0.0 0.0 -0.0358831 0.0 ⋱
307-
0.542991 0.0 -0.180997 0.0 0.0 -0.0086189 0.0 ⋱
308-
0.0886737 0.0 -0.0295579 0.0 0.0 -0.00140752 0.0 ⋱
309-
0.0109485 0.0 -0.00364949 0.0 0.0 -0.000173785 0.0 ⋱
310-
0.00108585 0.0 -0.000361951 0.0 … 0.0 -1.72358e-5 0.0 ⋱
311-
8.99546e-5 0.0 -2.99849e-5 0.0 0.0 -1.42785e-6 0.0 ⋱
312-
6.39687e-6 0.0 -2.13229e-6 0.0 0.0 -1.01538e-7 0.0 ⋱
313-
3.98425e-7 0.0 -1.32808e-7 0.0 0.0 -6.32421e-9 0.0 ⋱
314-
2.20735e-8 0.0 -7.35785e-9 0.0 0.0 -3.50374e-10 0.0 ⋱
315-
⋮ ⋱ ⋱ ⋱ … ⋱ ⋱ ⋱ ⋱
196+
julia> L = M * Σ;
197+
198+
julia> L * Fun(x->3x^2/2, Chebyshev()) ≈ Fun(exp, Chebyshev())
199+
true
316200
```
317201

318202
!!! note
319-
`Σ*exp(x)` applies the operator to a function. To construct the operator that first multiplies by `exp(x)`, use `Σ[exp(x)]`. This is equivalent to `Σ*Multiplication(exp(x),Chebyshev())`.
203+
`Σ * exp(x)` applies the operator to a function. To construct the operator that first multiplies by `exp(x)`, use `Σ[exp(x)]`. This is equivalent to `Σ * Multiplication(exp(x))`.
320204

321205
## Operators and space promotion
322206

323-
It is often more convenient to not specify a space explicitly, but rather infer it when the operator is used. For example, we can construct `Derivative()`, which has the alias `𝒟`, and represents the first derivative on any space:
207+
It is often more convenient to not specify a space explicitly, but rather infer it when the operator is used. For example, we can construct `Derivative()`, which has the alias `𝒟` (typed as `\scrD<tab>`), and represents the first derivative on any space:
324208

325209
```jldoctest
326210
julia> f = Fun(cos, Chebyshev(0..1));
@@ -330,30 +214,17 @@ true
330214
331215
julia> f = Fun(cos, Fourier());
332216
333-
julia> (𝒟*f)(0.1) ≈ -sin(0.1)
217+
julia> (𝒟 * f)(0.1) ≈ -sin(0.1)
334218
true
335219
```
336220

337-
Behind the scenes, `Derivative()` is equivalent to `Derivative(UnsetSpace(),1)`. When multiplying a function `f`, the domain space is promoted before multiplying, that is, `Derivative()*f` is equivalent to `Derivative(space(f))*f`.
221+
Behind the scenes, `Derivative()` is equivalent to `Derivative(UnsetSpace(),1)`. When multiplying a function `f`, the domain space is promoted before multiplying, that is, `Derivative() * f` is equivalent to `Derivative(space(f)) * f`.
338222

339223
This promotion of the domain space happens even when operators have spaces attached. This facilitates the following construction:
340224

341-
```jldoctest
342-
julia> D = Derivative(Chebyshev());
343-
344-
julia> D^2
345-
ConcreteDerivative : Chebyshev() → Ultraspherical(2)
346-
⋅ ⋅ 4.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
347-
⋅ ⋅ ⋅ 6.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
348-
⋅ ⋅ ⋅ ⋅ 8.0 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅
349-
⋅ ⋅ ⋅ ⋅ ⋅ 10.0 ⋅ ⋅ ⋅ ⋅ ⋅
350-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 12.0 ⋅ ⋅ ⋅ ⋅
351-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 14.0 ⋅ ⋅ ⋅
352-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 16.0 ⋅ ⋅
353-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 18.0 ⋅
354-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
355-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
356-
⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋱
225+
```@repl packages
226+
D = Derivative(Chebyshev());
227+
D^2
357228
```
358229

359230
Note that `rangespace(D) ≠ Chebyshev()`, hence the operators are not compatible. Therefore, it has thrown away its domain space, and thus this is equivalent to `Derivative(rangespace(D))*D`.

0 commit comments

Comments
 (0)