IntegralCauchy GSL Error

I need to perform a Cauchy Integral. I have attached a simplified version of the macro I am using that reproduces the problem and the Mathematica notebook used for cross-check.
The function to be integrated contains the term x^(alpha). When alpha has a positive sign (alpha = 0.3) I get the integral equal to -1.7877, which agrees with the analogous Mathematica code.
On the other hand, when alpha is negative (alpha = -0.3) I get the following error:
Error in : Error 5 in qawc.c at 217 : could not integrate function
However, the Mathematica code computes the Cauchy Integral with the negative alpha without errors and the output is equal to -1.82904
My physics analysis requires alpha = -0.3 which does not work in my ROOT code.
I appreciate any help to get the same result achieved by the Mathematical numerical integration when alpha = -0.3.

Many Thanks (2.1 KB)

double value = ig.IntegralCauchy(1.e-307, 1., xi);

Highly appreciated. Many thanks for your help and your quick reply! There is no error now and it agrees with the value obtained in Mathematica.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.