# besseli

besseli(nu, x)

Modified Bessel function of the first kind of order nu, $I_\nu(x)$.

## Examples

In the Julia programming language, the function besseli(nu, x) calculates the modified Bessel function of the first kind, denoted as $I_\nu(x)$.

julia> besseli(0, 1.5)
1.0634833707413236

This example computes the modified Bessel function of order 0 ($\nu = 0$) at $x = 1.5$.

julia> besseli(2, [0.5, 1.0, 1.5])
3-element Array{Float64,1}:
0.42758357615580704
0.5767248077568734
0.5118276717642293

Here, the function is applied to an array of values. It calculates the modified Bessel function of order 2 ($\nu = 2$) at each element in the input array [0.5, 1.0, 1.5].

julia> besseli([0, 1, 2], 0.5)
3-element Array{Float64,1}:
1.0634833707413236
0.565159103992485
0.11749896981635238

In this example, the besseli function is called with an array of orders [0, 1, 2] and a single value for x = 0.5. It returns an array of corresponding modified Bessel function values.

Common mistake example:

julia> besseli(-1, 2.5)
ERROR: DomainError with -1.0:
Order of Bessel function must be non-negative

This error occurs when a negative order is provided to the besseli function. The order parameter nu should always be a non-negative value.