[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16. Special Functions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.1 Introduction to Special Functions

Special function notation follows:

bessel_j (index, expr)         Bessel function, 1st kind
bessel_y (index, expr)         Bessel function, 2nd kind
bessel_i (index, expr)         Modified Bessel function, 1st kind
bessel_k (index, expr)         Modified Bessel function, 2nd kind
%he[n] (z)                     Hermite polynomial (Nota bene: he,
                               not h. See A&S 22.5.18)
assoc_legendre_p[v,u] (z)      Legendre function of degree v and order u 
assoc_legendre_q[v,u] (z)      Legendre function, 2nd kind
hstruve[n] (z)                 Struve H function
lstruve[n] (z)                 Struve L function
%f[p,q] ([], [], expr)         Generalized Hypergeometric function
gamma()                        Gamma function
gammagreek(a,z)                Incomplete gamma function
gammaincomplete(a,z)           Tail of incomplete gamma function
slommel
%m[u,k] (z)                    Whittaker function, 1st kind
%w[u,k] (z)                    Whittaker function, 2nd kind
erfc (z)                       Complement of the erf function
ei (z)                         Exponential integral (?)
kelliptic (z)                  Complete elliptic integral of the first
                               kind (K)
%d [n] (z)                     Parabolic cylinder function
·

@ref{Category: Bessel functions} · @ref{Category: Airy functions} · @ref{Category: Special functions}


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.2 Functions and Variables for Special Functions

Function: airy_ai (x)

The Airy function Ai, as defined in Abramowitz and Stegun, Handbook of Mathematical Functions, Section 10.4.

The Airy equation diff (y(x), x, 2) - x y(x) = 0 has two linearly independent solutions, y = Ai(x) and y = Bi(x). The derivative diff (airy_ai(x), x) is airy_dai(x).

If the argument x is a real or complex floating point number, the numerical value of airy_ai is returned when possible.

See also airy_bi, airy_dai, airy_dbi.

·

@ref{Category: Airy functions}

Function: airy_dai (x)

The derivative of the Airy function Ai airy_ai(x).

See airy_ai.

·

@ref{Category: Airy functions}

Function: airy_bi (x)

The Airy function Bi, as defined in Abramowitz and Stegun, Handbook of Mathematical Functions, Section 10.4, is the second solution of the Airy equation diff (y(x), x, 2) - x y(x) = 0.

If the argument x is a real or complex floating point number, the numerical value of airy_bi is returned when possible. In other cases the unevaluated expression is returned.

The derivative diff (airy_bi(x), x) is airy_dbi(x).

See airy_ai, airy_dbi.

·

@ref{Category: Airy functions}

Function: airy_dbi (x)

The derivative of the Airy Bi function airy_bi(x).

See airy_ai and airy_bi.

·

@ref{Category: Airy functions}

Function: asympa

asympa is a package for asymptotic analysis. The package contains simplification functions for asymptotic analysis, including the "big O" and "little o" functions that are widely used in complexity analysis and numerical analysis.

load ("asympa") loads this package.

·

@ref{Category: Package asympa}

Function: bessel (z, order)

The Bessel function of the first kind.

This function has been removed. Use bessel_j (order, z) instead.

Function: bessel_j (v, z)

The Bessel function of the first kind of order v and argument z.

bessel_j is defined as

                inf
                ====       k  - v - 2 k  v + 2 k
                \     (- 1)  2          z
                 >    --------------------------
                /        k! gamma(v + k + 1)
                ====
                k = 0

although the infinite series is not used for computations.

·

@ref{Category: Bessel functions}

Function: bessel_y (v, z)

The Bessel function of the second kind of order v and argument z.

bessel_y is defined as

              cos(%pi v) bessel_j(v, z) - bessel_j(-v, z)
              -------------------------------------------
                             sin(%pi v)

when v is not an integer. When v is an integer n, the limit as v approaches n is taken.

·

@ref{Category: Bessel functions}

Function: bessel_i (v, z)

The modified Bessel function of the first kind of order v and argument z.

bessel_i is defined as

                    inf
                    ====   - v - 2 k  v + 2 k
                    \     2          z
                     >    -------------------
                    /     k! gamma(v + k + 1)
                    ====
                    k = 0

although the infinite series is not used for computations.

·

@ref{Category: Bessel functions}

Function: bessel_k (v, z)

The modified Bessel function of the second kind of order v and argument z.

bessel_k is defined as

           %pi csc(%pi v) (bessel_i(-v, z) - bessel_i(v, z))
           -------------------------------------------------
                                  2

when v is not an integer. If v is an integer n, then the limit as v approaches n is taken.

·

@ref{Category: Bessel functions}

Option variable: besselexpand

Default value: false

Controls expansion of the Bessel functions when the order is half of an odd integer. In this case, the Bessel functions can be expanded in terms of other elementary functions. When besselexpand is true, the Bessel function is expanded.

(%i1) besselexpand: false$
(%i2) bessel_j (3/2, z);
                                    3
(%o2)                      bessel_j(-, z)
                                    2
(%i3) besselexpand: true$
(%i4) bessel_j (3/2, z);
                          2 z   sin(z)   cos(z)
(%o4)                sqrt(---) (------ - ------)
                          %pi      2       z
                                  z
·

@ref{Category: Bessel functions} · @ref{Category: Simplification flags and variables}

Function: scaled_bessel_i (v, z)

The scaled modified Bessel function of the first kind of order v and argument z. That is, scaled_bessel_i(v,z) = exp(-abs(z))*bessel_i(v, z). This function is particularly useful for calculating bessel_i for large z, which is large. However, maxima does not otherwise know much about this function. For symbolic work, it is probably preferable to work with the expression exp(-abs(z))*bessel_i(v, z).

·

@ref{Category: Bessel functions}

Function: scaled_bessel_i0 (z)

Identical to scaled_bessel_i(0,z).

·

@ref{Category: Bessel functions}

Function: scaled_bessel_i1 (z)

Identical to scaled_bessel_i(1,z).

Function: beta (x, y)

The beta function, defined as gamma(x) gamma(y)/gamma(x + y).

·

@ref{Category: Gamma and factorial functions}

Function: gamma (x)

The gamma function.

See also makegamma.

The variable gammalim controls simplification of the gamma function.

The Euler-Mascheroni constant is %gamma.

·

@ref{Category: Gamma and factorial functions}

Option variable: gammalim

Default value: 1000000

gammalim controls simplification of the gamma function for integral and rational number arguments. If the absolute value of the argument is not greater than gammalim, then simplification will occur. Note that the factlim switch controls simplification of the result of gamma of an integer argument as well.

·

@ref{Category: Gamma and factorial functions} · @ref{Category: Simplification flags and variables}

Function: intopois (a)

Converts a into a Poisson encoding.

·

@ref{Category: Poisson series}

Function: makefact (expr)

Transforms instances of binomial, gamma, and beta functions in expr into factorials.

See also makegamma.

·

@ref{Category: Gamma and factorial functions}

Function: makegamma (expr)

Transforms instances of binomial, factorial, and beta functions in expr into gamma functions.

See also makefact.

·

@ref{Category: Gamma and factorial functions}

Function: numfactor (expr)

Returns the numerical factor multiplying the expression expr, which should be a single term.

content returns the greatest common divisor (gcd) of all terms in a sum.

(%i1) gamma (7/2);
                          15 sqrt(%pi)
(%o1)                     ------------
                               8
(%i2) numfactor (%);
                               15
(%o2)                          --
                               8
·

@ref{Category: Expressions}

Function: outofpois (a)

Converts a from Poisson encoding to general representation. If a is not in Poisson form, outofpois carries out the conversion, i.e., the return value is outofpois (intopois (a)). This function is thus a canonical simplifier for sums of powers of sine and cosine terms of a particular type.

·

@ref{Category: Poisson series}

Function: poisdiff (a, b)

Differentiates a with respect to b. b must occur only in the trig arguments or only in the coefficients.

·

@ref{Category: Poisson series}

Function: poisexpt (a, b)

Functionally identical to intopois (a^b). b must be a positive integer.

·

@ref{Category: Poisson series}

Function: poisint (a, b)

Integrates in a similarly restricted sense (to poisdiff). Non-periodic terms in b are dropped if b is in the trig arguments.

·

@ref{Category: Poisson series}

Option variable: poislim

Default value: 5

poislim determines the domain of the coefficients in the arguments of the trig functions. The initial value of 5 corresponds to the interval [-2^(5-1)+1,2^(5-1)], or [-15,16], but it can be set to [-2^(n-1)+1, 2^(n-1)].

·

@ref{Category: Poisson series}

Function: poismap (series, sinfn, cosfn)

will map the functions sinfn on the sine terms and cosfn on the cosine terms of the Poisson series given. sinfn and cosfn are functions of two arguments which are a coefficient and a trigonometric part of a term in series respectively.

·

@ref{Category: Poisson series}

Function: poisplus (a, b)

Is functionally identical to intopois (a + b).

·

@ref{Category: Poisson series}

Function: poissimp (a)

Converts a into a Poisson series for a in general representation.

·

@ref{Category: Poisson series}

Special symbol: poisson

The symbol /P/ follows the line label of Poisson series expressions.

·

@ref{Category: Poisson series}

Function: poissubst (a, b, c)

Substitutes a for b in c. c is a Poisson series.

(1) Where B is a variable u, v, w, x, y, or z, then a must be an expression linear in those variables (e.g., 6*u + 4*v).

(2) Where b is other than those variables, then a must also be free of those variables, and furthermore, free of sines or cosines.

poissubst (a, b, c, d, n) is a special type of substitution which operates on a and b as in type (1) above, but where d is a Poisson series, expands cos(d) and sin(d) to order n so as to provide the result of substituting a + d for b in c. The idea is that d is an expansion in terms of a small parameter. For example, poissubst (u, v, cos(v), %e, 3) yields cos(u)*(1 - %e^2/2) - sin(u)*(%e - %e^3/6).

·

@ref{Category: Poisson series}

Function: poistimes (a, b)

Is functionally identical to intopois (a*b).

·

@ref{Category: Poisson series}

Function: poistrim ()

is a reserved function name which (if the user has defined it) gets applied during Poisson multiplication. It is a predicate function of 6 arguments which are the coefficients of the u, v, ..., z in a term. Terms for which poistrim is true (for the coefficients of that term) are eliminated during multiplication.

·

@ref{Category: Poisson series}

Function: printpois (a)

Prints a Poisson series in a readable format. In common with outofpois, it will convert a into a Poisson encoding first, if necessary.

·

@ref{Category: Poisson series} · @ref{Category: Display functions}

Function: psi [n](x)

The derivative of log (gamma (x)) of order n+1. Thus, psi[0](x) is the first derivative, psi[1](x) is the second derivative, etc.

Maxima does not know how, in general, to compute a numerical value of psi, but it can compute some exact values for rational args. Several variables control what range of rational args psi will return an exact value, if possible. See maxpsiposint, maxpsinegint, maxpsifracnum, and maxpsifracdenom. That is, x must lie between maxpsinegint and maxpsiposint. If the absolute value of the fractional part of x is rational and has a numerator less than maxpsifracnum and has a denominator less than maxpsifracdenom, psi will return an exact value.

The function bfpsi in the bffac package can compute numerical values.

·

@ref{Category: Gamma and factorial functions}

Option variable: maxpsiposint

Default value: 20

maxpsiposint is the largest positive value for which psi[n](x) will try to compute an exact value.

·

@ref{Category: Gamma and factorial functions}

Option variable: maxpsinegint

Default value: -10

maxpsinegint is the most negative value for which psi[n](x) will try to compute an exact value. That is if x is less than maxnegint, psi[n](x) will not return simplified answer, even if it could.

·

@ref{Category: Gamma and factorial functions}

Option variable: maxpsifracnum

Default value: 6

Let x be a rational number less than one of the form p/q. If p is greater than maxpsifracnum, then psi[n](x) will not try to return a simplified value.

·

@ref{Category: Gamma and factorial functions}

Option variable: maxpsifracdenom

Default value: 6

Let x be a rational number less than one of the form p/q. If q is greater than maxpsifracdenom, then psi[n](x) will not try to return a simplified value.

·

@ref{Category: Gamma and factorial functions}

Function: specint (exp(- s*t) * expr, t)

Compute the Laplace transform of expr with respect to the variable t. The integrand expr may contain special functions.

If specint cannot compute the integral, the return value may contain various Lisp symbols, including other-defint-to-follow-negtest, other-lt-exponential-to-follow, product-of-y-with-nofract-indices, etc.; this is a bug.

demo(hypgeo) displays several examples of Laplace transforms computed by specint.

Examples:

(%i1) assume (p > 0, a > 0);
(%o1)                    [p > 0, a > 0]
(%i2) specint (t^(1/2) * exp(-a*t/4) * exp(-p*t), t);
                           sqrt(%pi)
(%o2)                     ------------
                                 a 3/2
                          2 (p + -)
                                 4
(%i3) specint (t^(1/2) * bessel_j(1, 2 * a^(1/2) * t^(1/2))
              * exp(-p*t), t);
                                   - a/p
                         sqrt(a) %e
(%o3)                    ---------------
                                2
                               p
·

@ref{Category: Laplace transform}

Function: hgfred (a, b, t)

Simplify the generalized hypergeometric function in terms of other, simpler, forms. a is a list of numerator parameters and b is a list of the denominator parameters.

If hgfred cannot simplify the hypergeometric function, it returns an expression of the form %f[p,q]([a], [b], x) where p is the number of elements in a, and q is the number of elements in b. This is the usual pFq generalized hypergeometric function.

(%i1) assume(not(equal(z,0)));
(%o1)                          [notequal(z, 0)]
(%i2) hgfred([v+1/2],[2*v+1],2*%i*z);

                     v/2                               %i z
                    4    bessel_j(v, z) gamma(v + 1) %e
(%o2)               ---------------------------------------
                                       v
                                      z
(%i3) hgfred([1,1],[2],z);

                                   log(1 - z)
(%o3)                            - ----------
                                       z
(%i4) hgfred([a,a+1/2],[3/2],z^2);

                               1 - 2 a          1 - 2 a
                        (z + 1)        - (1 - z)
(%o4)                   -------------------------------
                                 2 (1 - 2 a) z

It can be beneficial to load orthopoly too as the following example shows. Note that L is the generalized Laguerre polynomial.

(%i5) load(orthopoly)$
(%i6) hgfred([-2],[a],z);

                                    (a - 1)
                                 2 L       (z)
                                    2
(%o6)                            -------------
                                   a (a + 1)
(%i7) ev(%);

                                  2
                                 z        2 z
(%o7)                         --------- - --- + 1
                              a (a + 1)    a


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by root on July, 13 2009 using texi2html 1.76.