Previous: Parabolic Cylinder Functions, Up: Special Functions [Contents][Index]

### 15.10 Functions and Variables for Special 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. The parameter s maybe be named something else; it is determined automatically, as the examples below show where p is used in some places.

  The following special functions are handled by `specint`: incomplete gamma function, error functions (but not the error function `erfi`, it is easy to transform `erfi` e.g. to the error function `erf`), exponential integrals, bessel functions (including products of bessel functions), hankel functions, hermite and the laguerre polynomials.

  Furthermore, `specint` can handle the hypergeometric function `%f[p,q]([],[],z)`, the whittaker function of the first kind `%m[u,k](z)` and of the second kind `%w[u,k](z)`.

  The result may be in terms of special functions and can include unsimplified hypergeometric functions.

  When `laplace` fails to find a Laplace transform, `specint` is called. Because `laplace` knows more general rules for Laplace transforms, it is preferable to use `laplace` and not `specint`.

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

  Examples:

      (%i1) assume (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

  Examples for exponential integrals:

      (%i4) assume(s>0,a>0,s-a>0)$
      (%i5) ratsimp(specint(%e^(a*t)
                            *(log(a)+expintegral_e1(a*t))*%e^(-s*t),t));
                                   log(s)
      (%o5)                        ------
                                   s - a
      (%i6) logarc:true$

      (%i7) gamma_expand:true$

      radcan(specint((cos(t)*expintegral_si(t)
                           -sin(t)*expintegral_ci(t))*%e^(-s*t),t));
                                   log(s)
      (%o8)                        ------
                                    2
                                   s  + 1
      ratsimp(specint((2*t*log(a)+2/a*sin(a*t)
                            -2*t*expintegral_ci(a*t))*%e^(-s*t),t));
                                     2    2
                                log(s  + a )
      (%o9)                     ------------
                                      2
                                     s

  Results when using the expansion of `gamma_incomplete` and when changing the representation to `expintegral_e1`:

      (%i10) assume(s>0)$
      (%i11) specint(1/sqrt(%pi*t)*unit_step(t-k)*%e^(-s*t),t);
                                                  1
                                  gamma_incomplete(-, k s)
                                                  2
      (%o11)                      ------------------------
                                     sqrt(%pi) sqrt(s)

      (%i12) gamma_expand:true$
      (%i13) specint(1/sqrt(%pi*t)*unit_step(t-k)*%e^(-s*t),t);
                                    erfc(sqrt(k) sqrt(s))
      (%o13)                        ---------------------
                                           sqrt(s)

      (%i14) expintrep:expintegral_e1$
      (%i15) ratsimp(specint(1/(t+a)^2*%e^(-s*t),t));
                                    a s
                              a s %e    expintegral_e1(a s) - 1
      (%o15)                - ---------------------------------
                                              a

  Categories:Laplace transform ·

Function: hypergeometric_simp (e)

  `hypergeometric_simp` simplifies hypergeometric functions by applying `hgfred` to the arguments of any hypergeometric functions in the expression e.

  Only instances of `hypergeometric` are affected; any `%f`, `%w`, and `%m` in the expression e are not affected. Any unsimplified hypergeometric functions are returned unchanged (instead of changing to `%f` as `hgfred` would).

  `load("hypergeometric");` loads this function.

  See also `hgfred`.

  Examples:

      (%i1) load ("hypergeometric") $
      (%i2) foo : [hypergeometric([1,1], [2], z), hypergeometric([1/2], [1], z)];
      (%o2) [hypergeometric([1, 1], [2], z),
                                                           1
                                           hypergeometric([-], [1], z)]
                                                           2
      (%i3) hypergeometric_simp (foo);
                       log(1 - z)              z    z/2
      (%o3)         [- ----------, bessel_i(0, -) %e   ]
                           z                   2
      (%i4) bar : hypergeometric([n], [m], z + 1);
      (%o4)            hypergeometric([n], [m], z + 1)
      (%i5) hypergeometric_simp (bar);
      (%o5)            hypergeometric([n], [m], z + 1)

  Categories:Hypergeometric functions ·Simplification functions ·Special functions ·

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

Function: lambert_w (z)

  The principal branch of Lambert’s W function W(z), the solution of `z = W(z) * exp(W(z))`. (DLMF 4.13)

  Categories:Special functions ·

Function: generalized_lambert_w (k, z)

  The k-th branch of Lambert’s W function W(z), the solution of `z = W(z) * exp(W(z))`. (DLMF 4.13)

  The principal branch, denoted Wp(z) in DLMF, is `lambert_w(z) = generalized_lambert_w(0,z)`.

  The other branch with real values, denoted Wm(z) in DLMF, is `generalized_lambert_w(-1,z)`.

  Categories:Special functions ·

Function: nzeta (z)

  The Plasma Dispersion Function `nzeta(z) = %i*sqrt(%pi)*exp(-z^2)*(1-erf(-%i*z))`

  Categories:Special functions ·

Function: nzetar (z)

  Returns `realpart(nzeta(z))`.

  Categories:Special functions ·

Function: nzetai (z)

  Returns `imagpart(nzeta(z))`.

  Categories:Special functions ·

Previous: Parabolic Cylinder Functions, Up: Special Functions [Contents][Index]