1
$\begingroup$

Consider the following integral

z = 3*Exp[I*\[Theta]];
n = 20;
k = 1.25 \[Pi];
p = 1.5;

Integrate[BesselJ[(2 n + 1)*p, k*Abs[z]], {\[Theta], -\[Pi]/2, \[Pi]/2}]

However, when I replace Abs[z] with 3, it gives the correct answer:

Integrate[BesselJ[(2 n + 1)*p, k*3], {\[Theta], -\[Pi]/2, \[Pi]/2}]

enter image description here

$\endgroup$
0

1 Answer 1

5
$\begingroup$
$Version

(* "13.2.1 for Mac OS X ARM (64-bit) (January 27, 2023)" *)

Clear["Global`*"]

It is a precision issue . Use exact values for the constants and use arbitrary-precision rather than machine precision.

z = 3*Exp[I*θ];
n = 20;
k = 5/4 π;
p = 3/2;

Block[{$MaxExtraPrecision = 100}, 
 Integrate[BesselJ[(2 n + 1)*p, k*Abs[z]], {θ, -π/2, π/2}] // N[#, 15] &]

(* 1.04339529077324*10^-37 *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.