Next: , Previous: , Up: simplification   [Contents][Index]

87.4 Package functs

Categories: Share packages · Package functs ·
Function: rempart (expr, n)

Removes part n from the expression expr.

If n is a list of the form [l, m] then parts l thru m are removed.

To use this function write first load("functs").

Categories: Package functs · Expressions ·
Function: wronskian ([f_1, ..., f_n], x)

Returns the Wronskian matrix of the list of expressions [f_1, ..., f_n] in the variable x. The determinant of the Wronskian matrix is the Wronskian determinant of the list of expressions.

To use wronskian, first load("functs"). Example:

(%i1) load ("functs")$
(%i2) wronskian([f(x), g(x)],x);
                    [   f(x)       g(x)    ]
                    [                      ]
(%o2)               [ d          d         ]
                    [ -- (f(x))  -- (g(x)) ]
                    [ dx         dx        ]
Function: tracematrix (M)

Returns the trace (sum of the diagonal elements) of matrix M.

To use this function write first load("functs").

Categories: Package functs · Matrices ·
Function: rational (z)

Multiplies numerator and denominator of z by the complex conjugate of denominator, thus rationalizing the denominator. Returns canonical rational expression (CRE) form if given one, else returns general form.

To use this function write first load("functs").

Categories: Package functs · Expressions ·
Function: nonzeroandfreeof (x, expr)

Returns true if expr is nonzero and freeof (x, expr) returns true. Returns false otherwise.

To use this function write first load("functs").

Categories: Package functs · Expressions ·
Function: linear (expr, x)

When expr is an expression of the form a*x + b where a is nonzero, and a and b are free of x, linear returns a list of three equations, one for each of the three formal variables b, a, and x. Otherwise, linear returns false.

load("antid") loads this function.

Example:

(%i1) load ("antid");
(%o1)  /maxima/share/integration/antid.mac
(%i2) linear ((1 - w)*(1 - x)*z, z);
(%o2) [bargumentb = 0, aargumenta = (w - 1) x - w + 1, 
                                                  xargumentx = z]
(%i3) linear (cos(u - v) + cos(u + v), u);
(%o3)                         false
Categories: Package antid · Expressions ·
Function: gcdivide (p, q)

When the option variable takegcd is true which is the default, gcdivide divides the polynomials p and q by their greatest common divisor and returns the ratio of the results. gcdivde calls the function ezgcd to divide the polynomials by the greatest common divisor.

When takegcd is false, gcdivide returns the ratio p/q.

To use this function write first load("functs").

See also ezgcd, gcd, gcdex, and poly_gcd.

Example:

(%i1) load("functs")$

(%i2) p1:6*x^3+19*x^2+19*x+6; 
                        3       2
(%o2)                6 x  + 19 x  + 19 x + 6
(%i3) p2:6*x^5+13*x^4+12*x^3+13*x^2+6*x;
                  5       4       3       2
(%o3)          6 x  + 13 x  + 12 x  + 13 x  + 6 x
(%i4) gcdivide(p1, p2);
                             x + 1
(%o4)                        ------
                              3
                             x  + x
(%i5) takegcd:false;
(%o5)                         false
(%i6) gcdivide(p1, p2);
                       3       2
                    6 x  + 19 x  + 19 x + 6
(%o6)          ----------------------------------
                  5       4       3       2
               6 x  + 13 x  + 12 x  + 13 x  + 6 x
(%i7) ratsimp(%);
                             x + 1
(%o7)                        ------
                              3
                             x  + x
Categories: Package functs · Polynomials ·
Function: arithmetic (a, d, n)

Returns the n-th term of the arithmetic series a, a + d, a + 2*d, ..., a + (n - 1)*d.

To use this function write first load("functs").

Categories: Package functs · Sums and products ·
Function: geometric (a, r, n)

Returns the n-th term of the geometric series a, a*r, a*r^2, ..., a*r^(n - 1).

To use this function write first load("functs").

Categories: Package functs · Sums and products ·
Function: harmonic (a, b, c, n)

Returns the n-th term of the harmonic series a/b, a/(b + c), a/(b + 2*c), ..., a/(b + (n - 1)*c).

To use this function write first load("functs").

Categories: Package functs · Sums and products ·
Function: arithsum (a, d, n)

Returns the sum of the arithmetic series from 1 to n.

To use this function write first load("functs").

Categories: Package functs · Sums and products ·
Function: geosum (a, r, n)

Returns the sum of the geometric series from 1 to n. If n is infinity (inf) then a sum is finite only if the absolute value of r is less than 1.

To use this function write first load("functs").

Categories: Package functs · Sums and products ·
Function: gaussprob (x)

Returns the Gaussian probability function %e^(-x^2/2) / sqrt(2*%pi).

To use this function write first load("functs").

Function: gd (x)

Returns the Gudermannian function 2*atan(%e^x)-%pi/2.

To use this function write first load("functs").

Function: agd (x)

Returns the inverse Gudermannian function log (tan (%pi/4 + x/2)).

To use this function write first load("functs").

Function: vers (x)

Returns the versed sine 1 - cos (x).

To use this function write first load("functs").

Function: covers (x)

Returns the coversed sine 1 - sin (x).

To use this function write first load("functs").

Function: exsec (x)

Returns the exsecant sec (x) - 1.

To use this function write first load("functs").

Function: hav (x)

Returns the haversine (1 - cos(x))/2.

To use this function write first load("functs").

Function: combination (n, r)

Returns the number of combinations of n objects taken r at a time.

To use this function write first load("functs").

Function: permutation (n, r)

Returns the number of permutations of r objects selected from a set of n objects.

To use this function write first load("functs").


Next: , Previous: , Up: simplification   [Contents][Index]