scipy.special.it2j0y0#

scipy.special.it2j0y0(x, out=None) = <ufunc 'it2j0y0'>#

Integrals related to Bessel functions of the first kind of order 0.

Computes the integrals

\[\begin{split}\int_0^x \frac{1 - J_0(t)}{t} dt \\ \int_x^\infty \frac{Y_0(t)}{t} dt.\end{split}\]

For more on \(J_0\) and \(Y_0\) see j0 and y0.

Parameters:
xarray_like

Values at which to evaluate the integrals.

outtuple of ndarrays, optional

Optional output arrays for the function results.

Returns:
ij0scalar or ndarray

The integral for j0

iy0scalar or ndarray

The integral for y0

References

[1]

S. Zhang and J.M. Jin, “Computation of Special Functions”, Wiley 1996

Examples

Evaluate the functions at one point.

>>> from scipy.special import it2j0y0
>>> int_j, int_y = it2j0y0(1.)
>>> int_j, int_y
(0.12116524699506871, 0.39527290169929336)

Evaluate the functions at several points.

>>> import numpy as np
>>> points = np.array([0.5, 1.5, 3.])
>>> int_j, int_y = it2j0y0(points)
>>> int_j, int_y
(array([0.03100699, 0.26227724, 0.85614669]),
 array([ 0.26968854,  0.29769696, -0.02987272]))

Plot the functions from 0 to 10.

>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots()
>>> x = np.linspace(0., 10., 1000)
>>> int_j, int_y = it2j0y0(x)
>>> ax.plot(x, int_j, label=r"$\int_0^x \frac{1-J_0(t)}{t}\,dt$")
>>> ax.plot(x, int_y, label=r"$\int_x^{\infty} \frac{Y_0(t)}{t}\,dt$")
>>> ax.legend()
>>> ax.set_ylim(-2.5, 2.5)
>>> plt.show()
../../_images/scipy-special-it2j0y0-1.png