Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
Function: intformal
Section: polynomials
C-Name: integ
Prototype: GDn
Help: intformal(x,{v}): formal integration of x with respect to v, or to the
main variable of x if v is omitted.
Doc: \idx{formal integration} of $x$ with respect to the variable $v$ (wrt.
the main variable if $v$ is omitted). Since PARI cannot represent
logarithmic or arctangent terms, any such term in the result will yield an
error:
\bprog
? intformal(x^2)
%1 = 1/3*x^3
? intformal(x^2, y)
%2 = y*x^2
? intformal(1/x)
*** at top-level: intformal(1/x)
*** ^--------------
*** intformal: domain error in intformal: residue(series, pole) != 0
@eprog
The argument $x$ can be of any type. When $x$ is a rational function, we
assume that the base ring is an integral domain of characteristic zero.
By definition, the main variable of a \typ{POLMOD} is the main variable
among the coefficients from its two polynomial components
(representative and modulus); in other words, assuming a polmod represents an
element of $R[X]/(T(X))$, the variable $X$ is a mute variable and the
integral is taken with respect to the main variable used in the base ring $R$.
In particular, it is meaningless to integrate with respect to the main
variable of \kbd{x.mod}:
\bprog
? intformal(Mod(1,x^2+1), 'x)
*** intformal: incorrect priority in intformal: variable x = x
@eprog