# Huge difference after changing a fraction to decimal

I have a limit to calculate.

With[{p = 1/2, q = 0.1},
Limit[a^q Integrate[Sin[x]/x^p, {x, a, Infinity}], a -> Infinity]]


gives correct result 0. But change that $\frac{1}{2}$ to $0.5$,

With[{p = 0.5, q = 0.1},
Limit[a^q Integrate[Sin[x]/x^p, {x, a, Infinity}], a -> Infinity]]


gives ComplexInfinity which very far away from the correct answer. Why does machine precision and infinite precision have this huge difference without any warning?

FYI, for any decimal p, using decimal gives incorrect result, while the true value is 0.

• The difference seems to lie in the integration; when p == 1/2 the integral is expressed as a function of FresnelS; in the numerical case of p == 0.5, instead, the integral is expressed with HypergeometricPFQ. Unfortunately I don't know enough about special functions to go any further than that, but others on this site do, so hopefully they may be able to weigh in on this. – MarcoB Apr 28 '16 at 18:59
• Seems like a possible bug to me. This integral looks convergent to me for any p>q regardless, machine or infinite precision. – LLlAMnYP Apr 28 '16 at 19:32
• @LLlAMnYP Mathematica gives a result for the integral. Then claims the limit diverges for decimal input. No bug there. – Daniel Lichtblau Apr 28 '16 at 20:08
• @DanielLichtblau the integral should have a convergent, though not necessarily 0 result for all p>0. The limit as a whole, though I have not taken the time to rigorously prove this, should reduce to zero for a -> Infinity and p>q. If there was a case, that only exactly 1/2 works, while otherwise some important condition is not met, I would agree with you, but IMO here the result should be zero for a range of ps. – LLlAMnYP Apr 28 '16 at 20:36
• Possibly shows a bug in Series handling of HypergeometricPFQ at infinity, when input to PFQ is approximate. – Daniel Lichtblau Apr 28 '16 at 21:40