Pari/GP Reference Documentation |
Contents - Index - Meta commands |

O deriv eval factorpadic intformal padicappr polcoeff polcyclo poldegree poldisc poldiscreduced polhensellift polinterpolate polisirreducible pollead pollegendre polrecip polresultant polroots polrootsmod polrootspadic polsturm polsubcyclo polsylvestermatrix polsym poltchebi polzagier serconvol serlaplace serreverse subst taylor thue thueinit | |

O(a | |

The library syntax is | |

deriv(x,{v}) | |

derivative of x with respect to the main variable if v is omitted, and with respect to v otherwise. x can be any type except polmod. The derivative of a scalar type is zero, and the derivative of a vector or matrix is done componentwise. One can use x' as a shortcut if the derivative is with respect to the main variable of x. The library syntax is | |

eval(x) | |

replaces in x the formal variables by the values that
have been assigned to them after the creation of x. This is mainly useful
in GP, and not in library mode. Do not confuse this with substitution (see
The library syntax is | |

factorpadic(pol,p,r,{flag = 0}) | |

p-adic factorization
of the polynomial If The library syntax is | |

intformal(x,{v}) | |

formal integration of x with respect to the main variable if v is omitted, with respect to the variable v otherwise. Since PARI does not know about "abstract" logarithms (they are immediately evaluated, if only to a power series), logarithmic terms in the result will yield an error. x can be of any type. When x is a rational function, it is assumed that the base ring is an integral domain of characteristic zero. The library syntax is | |

padicappr(pol,a) | |

vector of p-adic roots of the
polynomial
pol congruent to the p-adic number a modulo p (or modulo 4 if p = 2),
and with the same p-adic precision as a. The number a can be an
ordinary p-adic number (type The library syntax is | |

polcoeff(x,s,{v}) | |

coefficient of degree s of the polynomial x, with respect to the main variable if v is omitted, with respect to v otherwise. The library syntax is | |

poldegree(x,{v}) | |

degree of the polynomial x in the main variable if v is omitted, in the variable v otherwise. This is to be understood as follows. When x is a polynomial or a rational function, it gives the degree of x, the degree of 0 being -1 by convention. When x is a non-zero scalar, it gives 0, and when x is a zero scalar, it gives -1. Return an error otherwise. The library syntax is | |

polcyclo(n,{v = x}) | |

n-th cyclotomic polynomial, in variable v (x by default). The integer n must be positive. The library syntax is | |

poldisc(pol,{v}) | |

discriminant of the polynomial
The library syntax is | |

poldiscreduced(f) | |

reduced discriminant vector of the
(integral, monic) polynomial f. This is the vector of elementary divisors
of The library syntax is | |

polhensellift(x, y, p, e) | |

given a vector y of polynomials that are pairwise relatively prime modulo the prime p, and whose product is congruent to x modulo p, lift the elements of y to polynomials whose product is congruent to x modulo p^e. The library syntax is | |

polinterpolate(xa,{ya},{v = x},{&e}) | |

given the data vectors xa and ya of the same length n (xa containing the x-coordinates, and ya the corresponding y-coordinates), this function finds the interpolating polynomial passing through these points and evaluates it atv. If ya is omitted, return the polynomial interpolating the (i,xa[i]). If present, e will contain an error estimate on the returned value. The library syntax is | |

polisirreducible(pol) | |

The library syntax is | |

pollead(x,{v}) | |

leading coefficient of the polynomial or power series x. This is computed with respect to the main variable of x if v is omitted, with respect to the variable v otherwise. The library syntax is | |

pollegendre(n,{v = x}) | |

creates the n^{th} Legendre polynomial, in variable v. The library syntax is | |

polrecip(pol) | |

reciprocal polynomial of The library syntax is | |

polresultant(x,y,{v},{flag = 0}) | |

resultant of the two polynomials x and y with exact entries, with respect to the main variables of x and y if v is omitted, with respect to the variable v otherwise. The algorithm used is the subresultant algorithm by default. If If The library syntax is | |

polroots(pol,{flag = 0}) | |

complex roots of the polynomial
The algorithm used is a modification of A.Sch¨nhage's remarkable root-finding algorithm, due to and implemented by X.Gourdon. Barring bugs, it is guaranteed to converge and to give the roots to the required accuracy. If The library syntax is | |

polrootsmod(pol,p,{flag = 0}) | |

row vector of roots modulo
p of the polynomial If p < 100, you may try setting The library syntax is | |

polrootspadic(pol,p,r) | |

row vector of p-adic roots of the
polynomial The library syntax is | |

polsturm(pol,{a},{b}) | |

number of real roots of the real
polynomial The library syntax is sturmpart
(. The result is a pol,NULL,NULL)
long. | |

polsubcyclo(n,d,{v = x}) | |

gives a polynomial (in variable
v) defining the sub-Abelian extension of degree d of the cyclotomic
field The library syntax is | |

polsylvestermatrix(x,y) | |

forms the Sylvester matrix corresponding to the two polynomials x and y, where the coefficients of the polynomials are put in the columns of the matrix (which is the natural direction for solving equations afterwards). The use of this matrix can be essential when dealing with polynomials with inexact entries, since polynomial Euclidean division doesn't make much sense in this case. The library syntax is | |

polsym(x,n) | |

creates the vector of the symmetric powers of the roots of the polynomial x up to power n, using Newton's formula. The library syntax is | |

poltchebi(n,{v = x}) | |

creates the n^{th} Chebyshev polynomial, in variable v. The library syntax is | |

polzagier(n,m) | |

creates Zagier's polynomial P_{n,m} used in
the functions The library syntax is | |

serconvol(x,y) | |

convolution (or Hadamard product) of the
two power series x and y; in other words if x = sum a_k*X^k and y = sum
b_k*X^k then The library syntax is | |

serlaplace(x) | |

x must be a power series with only non-negative exponents. If x = sum (a_k/k!)*X^k then the result is sum a_k*X^k. The library syntax is | |

serreverse(x) | |

reverse power series (i.e.x^{-1}, not 1/x) of x. x must be a power series whose valuation is exactly equal to one. The library syntax is | |

subst(x,y,z) | |

replace the simple variable y by the argument z in the "polynomial" expression x. Every type is allowed for x, but if it is not a genuine polynomial (or power series, or rational function), the substitution will be done as if the scalar components were polynomials of degree one. In particular, beware that:
If x is a power series, z must be either a polynomial, a power series, or a rational function. y must be a simple variable name. The library syntax is | |

taylor(x,y) | |

Taylor expansion around 0 of x with respect to the simple variable y. x can be of any reasonable type, for example a rational function. The number of terms of the expansion is transparent to the user under GP, but must be given as a second argument in library mode. The library syntax is | |

thue(tnf,a,{sol}) | |

solves the equation
P(x,y) = a in integers x and y, where
Hence, assuming GRH, the only solution is x = 1, y = 1. The library syntax is | |

thueinit(P,{flag = 0}) | |

initializes the The library syntax is | |