How to use ApproxFun to multiply differential operators without running into incompatible space issues?

Create the operator with no spaces and then set the space at the end:

julia> D = Derivative();

julia> x = Fun();

julia> D^2 + 2x*D + x^2 + 1 : Chebyshev()
PlusOperator : Chebyshev() → Ultraspherical(2)
 1.1666666666666667   0.0      4.625  …    ⋅                    ⋅
 0.0                  0.84375  0.0         ⋅                    ⋅
 0.08333333333333333  0.0      0.85        ⋅                    ⋅
  ⋅                   0.03125  0.0        0.020833333333333332  ⋅
  ⋅                    ⋅       0.025      0.0                   ⋱
  ⋅                    ⋅        ⋅     …  -1.0677083333333333    ⋱
  ⋅                    ⋅        ⋅         0.0                   ⋱
  ⋅                    ⋅        ⋅        18.084375              ⋱
  ⋅                    ⋅        ⋅         0.0                   ⋱
  ⋅                    ⋅        ⋅         0.9520833333333334    ⋱
  ⋅                    ⋅        ⋅     …    ⋱                    ⋱


2 Likes