Integral -package:aeson-optics -package:optics-core -package:lens-aeson -is:module package:poly

Compute an indefinite integral of the polynomial, setting the constant term to zero.
>>> integral (3 * X^2 + 3) :: UPoly Double
1.0 * X^3 + 0.0 * X^2 + 3.0 * X + 0.0
Compute an indefinite integral of the polynomial with respect to the i-th variable, setting the constant term to zero.
>>> :set -XDataKinds

>>> integral 0 (3 * X^2 + 2 * Y) :: UMultiPoly 2 Double
1.0 * X^3 + 2.0 * X * Y

>>> integral 1 (3 * X^2 + 2 * Y) :: UMultiPoly 2 Double
3.0 * X^2 * Y + 1.0 * Y^2
Compute an indefinite integral of the polynomial with respect to the i-th variable, setting the constant term to zero.
>>> :set -XDataKinds

>>> integral 0 (3 * X^2 + 2 * Y) :: UMultiPoly 2 Double
1.0 * X^3 + 2.0 * X * Y

>>> integral 1 (3 * X^2 + 2 * Y) :: UMultiPoly 2 Double
3.0 * X^2 * Y + 1.0 * Y^2
Compute an indefinite integral of the polynomial, setting the constant term to zero.
>>> integral (3 * X^2 + 3) :: UPoly Double
1.0 * X^3 + 0.0 * X^2 + 3.0 * X + 0.0
Compute an indefinite integral of the polynomial, setting the constant term to zero.
>>> integral (3 * X^2 + 3) :: UPoly Double
1.0 * X^3 + 3.0 * X
Compute an indefinite integral of the polynomial, setting the constant term to zero.
>>> integral (3 * X^2 + 3) :: UPoly Double
1.0 * X^3 + 3.0 * X