utils_mathfunc

Module

Description

Contains utility routines for mathematical functions

References:

None

Owner:

Daniel Price

Runtime parameters:

None

Dependencies:

None

Quick access

Routines:

bessi0_s(), bessi1_s(), bessk0_s(), bessk1_s(), gegenbauer_poly(), ik01a(), legendre_associated(), poly()

Variables

Subroutines and functions

subroutine  mathfunc/gegenbauer_poly(n, alpha, x, cx)

Taken from the Polpak http://people.sc.fsu.edu/~jburkardt/

*****************************************************************************80

! GEGENBAUER_POLY computes the Gegenbauer polynomials C(I,ALPHA,X).

Discussion:

The Gegenbauer polynomial can be evaluated in Mathematica with the command

GegenbauerC[n,m,x]

ALPHA must be greater than -0.5.

If ALPHA = 1, the Gegenbauer polynomials reduce to the Chebyshev polynomials of the second kind.

Differential equation:

(1-X*X) Y’’ - (2 ALPHA + 1) X Y’ + N (N + 2 ALPHA) Y = 0

Recursion:

C(0,ALPHA,X) = 1, C(1,ALPHA,X) = 2*ALPHA*X C(N,ALPHA,X) = ( (2*N-2+2*ALPHA) * X * C(N-1,ALPHA,X)

  • ( -N+2-2*ALPHA) * C(N-2,ALPHA,X) ) / N

Norm:

Integral ( -1 <= X <= 1 )

( 1 - X^2 )^( ALPHA - 0.5 ) * C(N,ALPHA,X)^2 dX

= PI * 2^( 1 - 2 * ALPHA ) * Gamma ( N + 2 * ALPHA )

/ ( N! * ( N + ALPHA ) * ( Gamma ( ALPHA ) )^2 )

Licensing:

This code is distributed under the GNU LGPL license.

Modified:

06 August 2004

Author:

John Burkardt

Reference:

Stephen Wolfram, The Mathematica Book, Fourth Edition, Cambridge University Press, 1999, ISBN: 0-521-64314-7, LC: QA76.95.W65.

Parameters:

Input, integer ( kind = 4 ) N, the highest order polynomial to compute. Note that polynomials 0 through N will be computed.

Input, real ( kind = 8 ) ALPHA, a parameter which is part of the definition of the Gegenbauer polynomials. It must be greater than -0.5.

Input, real ( kind = 8 ) X, the point at which the polynomials are to be evaluated.

Output, real ( kind = 8 ) CX(0:N), the values of the first N+1 Gegenbauer polynomials at the point X.

Parameters:
  • n [integer,in]

  • alpha [real,in]

  • x [real,in]

  • cx (1 + n) [real,out]

Called from:

wang_bar()

subroutine  mathfunc/legendre_associated(n, m, x, cx)
Parameters:
  • n [integer,in]

  • m [integer,in]

  • x [real,in]

  • cx (1 + n) [real,out]

Called from:

wang_bar()

function  mathfunc/bessi0_s(x)
Parameters:

x [real,in]

Return:

bessi0_s [real]

Called from:

bessk0_s()

Call to:

poly()

function  mathfunc/bessi1_s(x)
Parameters:

x [real,in]

Return:

bessi1_s [real]

Called from:

bessk1_s()

Call to:

poly()

function  mathfunc/bessk0_s(x)
Parameters:

x [real,in]

Return:

bessk0_s [real]

Call to:

bessi0_s(), poly()

function  mathfunc/bessk1_s(x)
Parameters:

x [real,in]

Return:

bessk1_s [real]

Call to:

bessi1_s(), poly()

subroutine  mathfunc/ik01a(x, bi0, di0, bi1, di1, bk0, dk0, bk1, dk1)

implicit double precision (a-h,o-z)

Parameters:
  • x [real,in]

  • bi0 [real,out]

  • di0 [real,out]

  • bi1 [real,out]

  • di1 [real,out]

  • bk0 [real,out] :: added by DJP, fixes compiler warning

  • dk0 [real,out]

  • bk1 [real,out]

  • dk1 [real,out]

Called from:

kfdiscsp()

function  mathfunc/poly(x, coeffs)
Parameters:
  • x [real]

  • coeffs (5) [real]

Return:

poly [real]

Called from:

bessi0_s(), bessi1_s(), bessk0_s(), bessk1_s()