3
$\begingroup$

Bug introduced in 10.1.0 and fixed in 10.2.0


The following behavior was observed in Mathematica 10.1 (Windows 64 bit)

When attempting to evaluate the following integral, Mathematica outputs several messages which appear to be some sort of internal error leaking out.

Integrate[Cos[Sin[x]]^n,{x,0,Pi}]

I tried to resolve the issue by increasing $RecursionLimit, but regardless of what I set it to (including Infinity), the value appears to be ignored as the first error messages still appear and always reference a "Recursion depth of 1024".

If I increase the $IterationLimit to Infinity, Mathematica appears to honor the value and simply hangs after the first General::stop message is printed.

Evaluating the integral with no limits returns the integral unevaluated without messages. Using different limits has different results depending on the limits:

Integrate[Cos[Sin[x]]^n,{x,0,1}]

returns unevaluated with no messages, whereas

Integrate[Cos[Sin[x]]^n,{x,0,2Pi}]

Seems to run into some internal loop where similar messages are printed over and over (seemingly infinitely).

Does anybody know how to alleviate these errors?

Is there anyway to force Mathematica to honor my recursion limit?

$\endgroup$
  • 1
    $\begingroup$ Welcome to Mathematica.SE! Please never use the bugs tag with your own questions. See here for more info. The tag is meant to be added by someone else after it has been verified as an actual bug by the community. That said, this is clearly a bug IMO (I can reproduce it) so I'm leaving in the tag. Don't expect to be able to fix this yourself. Please report it to Wolfram Support. $\endgroup$ – Szabolcs Apr 13 '15 at 19:13
  • $\begingroup$ Note: I can reproduce it in 10.1.0 on OS X but not 10.0.2. 10.0.2 does not return a result. $\endgroup$ – Szabolcs Apr 13 '15 at 19:15
  • $\begingroup$ For odd n -> 1/2^n Pi Tr@ Table[Binomial[n, Floor[n/2] - j ] BesselJ[0, 2 j + 1], {j, 0, Ceiling[n/2]}] $\endgroup$ – Dr. belisarius Apr 13 '15 at 21:50
  • $\begingroup$ For Even n is very similar $\endgroup$ – Dr. belisarius Apr 13 '15 at 21:51
1
$\begingroup$

This bug has been fixed as of version 10.2.0. The example now returns unevaluated without any messages.

Integrate[Cos[Sin[x]]^n, {x, 0, Pi}] // InputForm

(* Integrate[Cos[Sin[x]]^n, {x, 0, Pi}] *)
$\endgroup$
  • $\begingroup$ Could you take a look at this question? In 10.1 and 10.2 NSolve does return a result, even with VerifySolutions -> True. But it appears that the system really does not have any solutions. Is this a bug in 10.1 and 10.2? In 10.0 and 9.0 NSolve correctly states that there are no solutions. $\endgroup$ – Szabolcs Jul 22 '15 at 6:31
  • $\begingroup$ @Szabolcs Will do, but by your description, I sense antennae even before seeing that question. $\endgroup$ – ilian Jul 22 '15 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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