We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4be86f3 commit 2a55e1aCopy full SHA for 2a55e1a
src/Operators/functionals/CalculusFunctional.jl
@@ -61,6 +61,20 @@ end
61
DefiniteIntegral(sp::UnsetSpace) = ConcreteDefiniteIntegral(sp)
62
DefiniteLineIntegral(sp::UnsetSpace) = ConcreteDefiniteLineIntegral(sp)
63
64
+"""
65
+ DefiniteIntegral([sp::Space])
66
+
67
+Return the operator that integrates a `Fun` over its domain. If `sp` is unspecified,
68
+it is inferred at runtime from the context.
69
70
+# Examples
71
+```jldoctest
72
+julia> f = Fun(x -> 3x^2, Chebyshev());
73
74
+julia> DefiniteIntegral() * f ≈ 2 # integral of 3x^2 over -1..1
75
+true
76
+```
77
78
function DefiniteIntegral(sp::Space)
79
if typeof(canonicaldomain(sp)) == typeof(domain(sp))
80
# try using `Integral`
0 commit comments