Documentation

# `besselJ`

Bessel functions of the first kind

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```besselJ(`v`, `z`)
```

## Description

`besselJ(v, z)` represents the Bessel functions of the first kind:

.

The Bessel functions are defined for complex arguments v and z.

A floating-point value is returned if either of the arguments is a floating-point number and the other argument is numerical. For most exact arguments the Bessel functions return an unevaluated function call. Special values at index v = 0 and/or argument z = 0 are implemented. Explicit symbolic expressions are returned, when the index v is a half integer. See Example 2.

For nonnegative integer indices v some of the Bessel functions have a branch cut along the negative real axis. A jump occurs when crossing this cut. See Example 3.

If floating-point approximations are desired for arguments that are exact numerical expressions, then we recommend to use ```besselJ(v, float(x))``` rather than `float(besselJ(v, x))`. In particular, for half integer indices the symbolic result `besselJ(v,x)` is costly to compute. Further, floating-point evaluation of the resulting symbolic expression may be numerically unstable. See Example 4.

## Environment Interactions

When called with floating-point arguments, these functions are sensitive to the environment variable `DIGITS` which determines the numerical working precision.

## Examples

### Example 1

Unevaluated calls are returned for exact or symbolic arguments:

`besselJ(2, 1 + I), besselJ(0, x), besselJ(v, x)`

Floating point values are returned for floating-point arguments:

`besselJ(2, 5.0), besselJ(3.2 + I, 10000.0)`

### Example 2

Bessel functions can be expressed in terms of elementary functions if the index is an odd integer multiple of :

`besselJ(1/2, x), besselJ(3/2, x)`

`besselJ(5/2, x), besselJ(-5/2, x)`

### Example 3

The negative real axis is a branch cut of the Bessel functions for non-integer indices v. A jump occurs when crossing this cut:

```besselJ(-3/4, -1.2), besselJ(-3/4, -1.2 + I/10^10), besselJ(-3/4, -1.2 - I/10^10)```

### Example 4

The symbolic expressions returned by Bessel functions with half integer indices can be unsuitable for floating-point evaluation:

`y := besselJ(51/2, PI)`

Floating point evaluation of this exact result is subject to numerical cancellation. The following result is dominated by round-off:

`float(y)`

The numerical working precision has to be increased to obtain a more accurate result:

`DIGITS:= 39: float(y)`

Direct floating-point evaluation via the Bessel function yields a correct result within working precision:

`DIGITS := 5: besselJ(51/2, float(PI))`

`delete y, DIGITS:`

### Example 5

The functions `diff`, `float`, `limit`, and `series` handle expressions involving the Bessel functions:

`diff(besselJ(0, x), x, x), float(ln(3 + besselJ(17, sqrt(PI))))`

`limit(besselJ(2, x^2 + 1)*sqrt(x), x = infinity)`

`series(besselJ(1, x), x = infinity, 3)`

## Parameters

 `v`, `z` arithmetical expressions

## Return Values

Arithmetical expression.

`z`

## Algorithms

The Bessel functions are regular (holomorphic) functions of z throughout the z-plane cut along the negative real axis, and for fixed z ≠ 0, each is an entire (integral) function of v.

Jv (z) and Yv (z) satisfy Bessel's equation in w(v, z):

.

When the index v is an integer, the Bessel functions of the first kind are governed by reflection formulas:

.

## See Also

### MuPAD Functions

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos