Skip to content

Commit 82885f3

Browse files
authored
fix deriv display in docs (#802)
1 parent 1fc0486 commit 82885f3

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

β€Ždocs/src/usage/operators.mdβ€Ž

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using ApproxFun, LinearAlgebra
66

77
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)`.
88

9-
Note that the size of an operator is specified by the dimension of the domain and range space.
9+
Note that the size of an operator is specified by the dimension of the domain and range space.
1010

1111
## Calculus operators
1212

@@ -129,7 +129,7 @@ C = Conversion(Chebyshev(),Ultraspherical(1))
129129
D + C
130130
```
131131

132-
ApproxFun can automatically determine the spaces, so if one writes `D + I` it will translate it to `D + C`.
132+
ApproxFun can automatically determine the spaces, so if one writes `D + I` it will translate it to `D + C`.
133133

134134
Now consider the Fredholm integral operator of the second kind:
135135

@@ -172,13 +172,26 @@ f = Fun(cos,Chebyshev(0..1)); (π’Ÿ*f)(0.1)
172172
f = Fun(cos,Fourier()); (π’Ÿ*f)(0.1)
173173
```
174174

175-
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`.
175+
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`.
176176

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

179-
```@repl using-pkgs
180-
D = Derivative(Chebyshev());
181-
D^2
179+
```jldoctest
180+
julia> D = Derivative(Chebyshev());
181+
182+
julia> D^2
183+
ConcreteDerivative : Chebyshev() β†’ Ultraspherical(2)
184+
β‹… β‹… 4.0 β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹…
185+
β‹… β‹… β‹… 6.0 β‹… β‹… β‹… β‹… β‹… β‹… β‹…
186+
β‹… β‹… β‹… β‹… 8.0 β‹… β‹… β‹… β‹… β‹… β‹…
187+
β‹… β‹… β‹… β‹… β‹… 10.0 β‹… β‹… β‹… β‹… β‹…
188+
β‹… β‹… β‹… β‹… β‹… β‹… 12.0 β‹… β‹… β‹… β‹…
189+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… 14.0 β‹… β‹… β‹…
190+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… 16.0 β‹… β‹…
191+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… 18.0 β‹…
192+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹±
193+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹±
194+
β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹… β‹±
182195
```
183196

184197
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)