File:Matbug01.jpg

Bug of the Mathematica routine Series at calculation of asymptotic expansion of the Bessel function.

Generator of image
A = Series[BesselJ[0, x] Sqrt[Pi/2] x^(5/2)/(1 + x^2), {x, Infinity, 4}]

TeXForm[A]

B = Series[BesselJ[0, Sqrt[x]] Sqrt[Pi x^(5/2)/2]/(1 + x), {x, Infinity, 2}]

TeXForm[B]

Output
$\left(-\frac{1}{8 x}+\frac{203}{1024  x^3}+O\left(\left(\frac{1}{x}\right)^4\right)\right) \sin \left(\frac{\pi  }{4}-x\right)+\left(1-\frac{137}{128   x^2}+O\left(\left(\frac{1}{x}\right)^3\right)\right) \cos \left(\frac{\pi }{4}-x\right)$

$\left(-\frac{\sqrt{\frac{1}{x}}}{8}+\frac{1}{8}  \left(\frac{1}{x}\right)^{3/2}+O\left(\left(\frac{1}{x   }\right)^2\right)\right) \sin \left(\frac{\pi   }{4}-\sqrt{x}\right)+\left(1-\frac{137}{128   x}+O\left(\left(\frac{1}{x}\right)^2\right)\right) \cos \left(\frac{\pi }{4}-\sqrt{x}\right)$