3
$\begingroup$

Consider the following expression:

With[{h = 21, z = 22}, 
    (Integrate[(ω^(h + 1) Sqrt[1 - ω^2]^(z - 1))/ Sqrt[2 + M ω^2] *
        Hypergeometric2F1[1/2, -((h + z)/2), 3/2, (M ω^2)/(2 + M ω^2)]
    , ω] /. 
    ArcSin[k_ ω]/ω :> k) /. ω -> 0]

I deliberately try to avoid using Limit, since it'll be too slow (I have lots of values for h and z and need the calculation to take reasonable time). The expression as it is now leads to a bunch of Power::infy messages. I'm trying to find the most common cases of 0/0 indeterminancies to eliminate manually (as I did for ArcSin[kx]/x above). But the expression is too large to be processed by a human mind.

So my question is: how can I find the exact place where division by zero occurs? I found the case with ArcSin by chance, having found a zero in denominator in stack trace for the Power::infy message. But is there a way to search for a zero in denominator of a held expression automatically?

$\endgroup$
  • $\begingroup$ If you want to look at w=0, I guess you can use Series[]. $\endgroup$ – Anjan Kumar Feb 8 '17 at 12:50
  • $\begingroup$ @AnjanKumar I'm not sure how Series is more helpful than Limit in this case... $\endgroup$ – Ruslan Feb 8 '17 at 13:45
  • $\begingroup$ Please provide an example that gives an error message. I get zero for an answer with no error messages, whether or not I include 'ArcSin[k_ ω]/ω :> k`. $\endgroup$ – bbgodfrey Feb 9 '17 at 10:49
  • $\begingroup$ @bbgodfrey well the example in the OP gives me errors and Indeterminate at the end with Mathematica 11.0. Sometimes it stops emitting errors and gives zero until you restart the Kernel. $\endgroup$ – Ruslan Feb 9 '17 at 11:23
  • 1
    $\begingroup$ Please share with the community the outcome of updating, especially if the problem does not go away. Best wishes. $\endgroup$ – bbgodfrey Feb 9 '17 at 22:35

Your Answer

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

Browse other questions tagged or ask your own question.