Skip to content

Integrate ​

The symbolic integral of an expression, with optional bounds.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaIntegralMathWorldIntegralWikidataQ80091Britannicatopic/integral-mathematicsFungrim entrySageMathintegrate($*,)SymPyintegrate($*,)
Integrate(f, limits+)Adds a closed form for ∫sin⁡m(u)cos⁡n(u) dx\int \sin^m(u)\cos^n(u)\,dx with a linear argument u=ax+bu = ax+b and mm or nn odd, expanding the odd power through sin⁡2+cos⁡2=1\sin^2+\cos^2=1 into a polynomial antiderivative. Under N, over a semi-infinite interval, an oscillatory integrand that isn't finite at the finite end has its first lobe integrated without evaluating it there, where compute-engine drops the sliver next to the end; lobes that beat leave the integral unevaluated. Falls back to compute-engine's native integrator otherwise.
Typed signatures
TypePackageApplies
(function, limits+) -> list<tuple> | number | tensor | tupleanalyticreplaces evaluationalways
(function, limits+) -> list<tuple> | number | tensor | tuplecompute-enginealways
(function, limits+) -> list<tuple> | number | tensor | tupleevaluationreplaces compute-enginealways

Domain: Compute engine

Examples

Basic #

∫sin⁡3x dx\int \sin^3 x\,dx

live ↗
In∫ ⁣sin⁡(x)3 dx\int\!\sin(x)^3\, \mathrm{d}xOutcos⁡(x)33−cos⁡(x)\frac{\cos(x)^3}{3}-\cos(x)

∫sin⁡3xcos⁡x dx\int \sin^3 x \cos x\,dx

live ↗
In∫ ⁣sin⁡(x)3cos⁡(x) dx\int\!\sin(x)^3\cos(x)\, \mathrm{d}xOutcos⁡(x)44−cos⁡(x)22\frac{\cos(x)^4}{4}-\frac{\cos(x)^2}{2}
Scope #

∫0πsin⁡x dx=2\int_0^\pi \sin x\,dx = 2

live ↗
In∫0π ⁣sin⁡(x) dx\int_{0}^{π}\!\sin(x)\, \mathrm{d}xOut22
About
Examples3
Checked againstWolfram Language 3 agreeSageMath 3 agreeSymPy 3 agree
CrosswalkWikipediaMathWorldWikidataBritannicaFungrim entry ×15SageMathSymPy

Implementation

mappedsympypackages/oracle/src/mappings.ts

Any number of iterators. A bare variable, or Limits(x, Nothing, Nothing), is an indefinite integral, which the scan compares up to a constant. An iterator is SymPy's (x, a, b). The first limit is the outermost, as Wolfram's, so the iterators are emitted in reverse; SymPy integrates its first iterator innermost.

mappedsagepackages/oracle/src/mappings.ts