In [ ]:
using BasisFunctions
using FrameFun
using Plots
using DomainSets
In [ ]:
B = ChebyshevBasis(10,-2.0,2.0)
D = Interval(-1.0,1.0)
f = x->x^2
F = Fun(f,B,D)
In 1D, derivatives and antiderivatives are designated by $'$ and $\int$ respectively
In [ ]:
plot(∫(F),layout=4)
plot!(F',subplot=2)
plot!(F,subplot=3)
plot!(∫(F'),subplot=4)
In [ ]:
B = FourierBasis(100,-1,1)⊗FourierBasis(100,-1,1)
D = Interval(-0.5,0.5)×Interval(-0.5,0.5)
f = (x,y)->x*y
F = Fun(f,B,D)
In 2D partial derivatives are designated by $\partial x(...)$ for the first dimension, $\partial y(...)$ for the second and so on. Integrals are designated by $\int\partial x(...)$ and so on.
In [ ]:
heatmap(F,layout=2)
heatmap!(∂x(F),subplot=2)
In [ ]:
plot(F,f,layout=2)
plot!(∂x(F),(x,y)->y,subplot=2)
In [ ]: