subst
Replaces a variable with an expression, everywhere it occurs free.
expr(symbolic) -- e.g. x^2 + xvar(string) -- the variable to replacereplacement(symbolic) -- e.g. a + 1
Replaces a variable with an expression, everywhere it occurs free.
expr (symbolic) -- e.g. x^2 + xvar (string) -- the variable to replacereplacement (symbolic) -- e.g. a + 1The free variables of an expression, sorted.
expr (symbolic) -- e.g. a*x + b*yPolynomial long division: the quotient and remainder.
dividend (symbolic) -- e.g. x^3 - 1divisor (symbolic) -- e.g. x - 1Synthetic division by x - c, its table as it is written: coefficients (the dividend's, highest power first, a 0 for each missing power), products (c times the number before, one under each coefficient after the first), results (the bottom row: each coefficient plus the product under it), and the quotient and remainder the bottom row gives.
dividend (symbolic) -- e.g. 2*x^3 - 3*x^2 - 11*x + 6c (number) -- the number in x - c, e.g. 3 for x - 3, -2 for x + 2The monic greatest common divisor of two polynomials. Works up to degree 7000; so does every function here that reads a polynomial written with a power.
a (symbolic) -- a polynomialb (symbolic) -- a polynomialThe resultant of two polynomials: zero exactly when they share a root. With one free parameter among the coefficients the answer is a polynomial in it: resultant(x^2 + p*x + 1, x^2 + x + p) is p^3 - 3*p + 2, and solve(resultant(x^2 + p*x + 1, x^2 + x + p) = 0, p) finds the p for which the two share a root. When the letters leave the variable unclear, name it third: resultant(f, g, x). Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
a (symbolic) -- a polynomialb (symbolic) -- a polynomialThe degree of a polynomial.
poly (symbolic) -- e.g. 3*x^4 + xThe coefficient of x^k in a polynomial.
poly (symbolic) -- e.g. 3*x^4 + 5*xk (number) -- the powerThe coefficient of x^k in a polynomial, as polyCoeff with the variable named: coeff(expand((1 + x)*(1 + x^2)*(1 + x^3)), x, 3) is 2.
f (expression) -- The polynomialx (name) -- The variablek (number) -- The powerThe exact sum of an expression over an integer range of an index (at most 10,000 terms); sum(term, k, a, b) is the same, and takes a letter as the upper bound too. A total that would run past 400 digits is refused and fsum(term, k, a, b) named, which adds in doubles.
body (symbolic) -- e.g. k^2index (string) -- e.g. kfrom (number) -- first indexto (number) -- last indexThe sum of an expression over an integer range of an index, worked in doubles: for the long sums whose exact value would run to hundreds of digits (sum() refuses one past 400 digits and names fsum). Each term is exact where it can be; the terms are added with compensation. Up to a million terms. fsum(1/k^2, k, 1, 100000) is 1.644924067.
body (symbolic) -- e.g. 1/k^2index (string) -- e.g. kfrom (number) -- first indexto (number) -- last indexThe exact product of an expression over an integer range of an index.
body (symbolic) -- e.g. kindex (string) -- e.g. kfrom (number) -- first indexto (number) -- last indexThe sum of an infinite geometric series a + a*r + a*r^2 + ..., only when |r| < 1.
first (symbolic) -- the first term aratio (number) -- the common ratio rThe exact value of sin at a whole number of degrees, when one exists; none otherwise. Exact values combine exactly in products, powers, quotients and sums (exactSin(60)^2 is 3/4), and float() or decimal() gives the decimal.
degrees (number) -- e.g. 30The exact value of cos at a whole number of degrees, when one exists; none otherwise.
degrees (number) -- e.g. 45The exact value of tan at a whole number of degrees; none where it is undefined or not exact.
degrees (number) -- e.g. 60The derivative of a polynomial in one variable.
poly (symbolic) -- Number of sign changes in the coefficients of a polynomial (zeros skipped), highest power first.
poly (symbolic) -- Descartes' rule: the most positive roots a polynomial can have (its sign changes); the true number is this or less by an even number. Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstDescartes' rule for negative roots: the sign changes of p(-x). Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstNumber of distinct real roots of a polynomial, by Sturm's theorem; with lo and hi, the number in the interval (lo, hi]. Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1). Degree 12 and beyond works (the arithmetic moves to big rationals): countRealRoots(x^12 - 1) is 2, countRealRoots(x^3 - 1.5*x + 0.2) is 3.
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstlo (number) -- optionalhi (number) -- optionalThe list [e1, e2, ..., en] of sums of products of the roots taken 1, 2, ... n at a time (signs included), from the coefficients. Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1). vieta([1, 0, -3, 1]) is [0, -3, -1].
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstThe sum of the k-th powers of the roots (Newton's identities), repeated roots counted; k = 0 gives the degree. Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstk (number) -- a whole number >= 0The monic polynomial with the given rational roots.
roots (list) -- e.g. [1, 2, 3]The monic polynomial whose roots are f(r) for each root r of p, with f a polynomial: f = 2*x + 3 gives roots 2r+3, f = x^2 gives r^2; transformRoots(x^2 - 3*x + 2, 2*x + 1) is x^2 - 8*x + 15 (roots 3 and 5). Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstf (symbolic) -- a polynomial in the same variableThe monic polynomial whose roots are 1/r for the roots r of p (no root may be 0). Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstThe discriminant of a polynomial (degree up to about 15): zero exactly when there is a repeated root; for the quadratic ax^2+bx+c it is b^2-4ac. (`discriminant` is for conics.) With one free parameter among the coefficients the answer is a polynomial in it: polyDiscriminant(x^3 - 3*x + p) is -27*p^2 + 108, and solve(polyDiscriminant(x^3 - 3*x + p) = 0, p) is [-2, 2], the p with a repeated root; the variable may be named second, polyDiscriminant(poly, x). Coefficients may be whole numbers, fractions, radicals (sqrt(2)) or decimals, and the polynomial may be given as its coefficient list, highest power first ([1, 0, -3, 1] is x^3 - 3x + 1).
poly (symbolic) -- a polynomial in one variable, or its coefficient list highest power firstTrue when Eisenstein's criterion holds for the prime p (fractions cleared first): p does not divide the leading coefficient, divides all the others, and p^2 does not divide the constant.
poly (symbolic) -- p (number) -- a primeTrue when a polynomial cannot be factored over the rationals. Decided by Eisenstein (also after x -> x + s) or Kronecker's search for a factor; a polynomial with huge values is refused rather than guessed.
poly (symbolic) -- The Lagrange basis polynomial l_i(x) for the points xs, counted from i = 0: 1 at xs[i], 0 at the other points.
xs (list) -- i (number) -- The polynomial of least degree through the points (xs[i], ys[i]), exact.
xs (list) -- ys (list) --