3.5.1.3.46 Jn

Description

This function returns the Bessel function of order n (where n is an integer):

Jn(x, n)

The formula for the equation is:


J_n(x,n)=(x/2)^{n}\sum_{k=0}^{\infty} \frac{(-1)^{k}(x/2)^{2k}}{k!\Gamma(k+n+1)}

See the gammaln(x) function for the definition of \Gamma.

Syntax

double Jn(double x, int n)

Parameters

x

the input double at which you want to calculate the Bessel function.

n

the order of the Bessel function.

Return

Returns the value of n order Bessel function at x.

Example

b0 = j0(5);
b0 = ; //b0=-0.17759677131434
bn0 = jn(5,0);
bn0 = ; //bn0=-0.17759677131434
b5 = jn(5,5);
b5 = ; //b5=0.26114054612017

See Also

J0, J1, Y0, Y1, Yn