# Series

Series refers to the infinite sum, that is defined as limit of sum, is it converges, and as way to get the asymptotic approximations, if diverge.

Also, Series is function in the Mathematica language that calculate certain amount of terms of series in the first meaning.

## Contents

## Example 1

Sometimes, the results of application of the Series operator are difficult to interpret. One example squared result of function HankelH0 of square root of parameter of the expansion is copypasted below.

Series[HankelH1[0, Sqrt[x] ]^2 Pi I Sqrt[x]/2, {x, Infinity, 2}]

does \( ~ e^{2 i \sqrt{x}} \left(1-\frac{1}{4} i \sqrt{\frac{1}{x}}-\frac{5}{32 x}+\frac{21}{128} i \left(\frac{1}{x}\right)^{3/2}+\frac{381}{16384 x^2}-\frac{675 i \left(\frac{1}{x}\right)^{5/2}}{65536}+O\left(\left(\frac{1}{x}\right)^3\right)\right) \)

while

Series[HankelH1[0, Sqrt[x] ]^2 Pi I Sqrt[x]/2, {x, Infinity, 1}]

does \( ~ e^{2 i \sqrt{x}} \left(1-\frac{1}{4} i \sqrt{\frac{1}{x}}-\frac{5}{32 x}+\frac{9}{512} i \left(\frac{1}{x}\right)^{3/2}+O\left(\left(\frac{1}{x }\right)^2\right)\right) \)

In the last case, coefficient with \( ~ e^{2 i \sqrt{x}} \left(\frac{1}{x}\right)^{3/2}~\) is just wrong. (The same refers to coefficients at higher terms in the first series.)

In the examples above, in order to see the bug, both, square root of argument and second power of value of function seem to be important. Perhaps this bug refers only to the Bessel function; attempts to reproduce similar inconsistencies with other functions are not successful.

## Example 2

Kori[z_]=BesselJ[0,BesselJZero[0,1] Sqrt[z]]/(1-z)

naga[p_] = Assuming[{Im[p] == 0}, Integrate[Kori[z]^2 Exp[I p z], {z, 0, Infinity}]]

N[Assuming[p > 0, Series[naga[p], {p, 0, 2}]],20]]

gives

\(1.00000000000000000000000 +(0.\times 10^{-72}+1.00000000000000000000000 i)p -(0.50000000000000000000000 +0.\times 10^{-72}+i)p+O[p]^3\)

instead of expected

Integrate::idiv: "Integral of ((6+6\I\p\z-3\p^2\z^2)\BesselJ[0,Sqrt[z] <<1>>]^2)/(-1+z)^2 does not converge on {0,\[Infinity]}. "

## References