Nächste: , Vorige: , Nach oben: simplification   [Inhalt][Index]

69.4 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").

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);
(%o2) matrix([f(x),g(x)],['diff(f(x),x,1),'diff(g(x),x,1)])
Function: tracematrix (M)

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

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

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").

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").

Function: linear (expr, x)

When expr is an expression linear in variable x, linear returns a*x + b where a is nonzero, and a and b are free of x. Otherwise, linear returns expr.

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

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
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").

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").

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").

Function: arithsum (a, d, n)

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

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

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").

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").


Nächste: , Vorige: , Nach oben: simplification   [Inhalt][Index]