Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect definite integrals due to incorrect handling of branch-cuts #39

Open
galanakis opened this issue Oct 16, 2020 · 1 comment
Open

Comments

@galanakis
Copy link

galanakis commented Oct 16, 2020

The correct value of this integral is π,

However Rubi gives 2π when the integrand has exponentials and π (correctly) when it is trigonometric.

The antiderivative with exponentials has ExpIntegralEi[z] and ExpIntegralEi[-z], which have branch cuts running in opposite directions (here z = i x). The antiderivative of the trigonometric form is SinIntegral without branch-cuts.

The problem is that the two branch-cuts cover the entire real axis and always cross the contour. I suppose that the branch cuts need to be moved so that the contour does not cross any of them.

In definite integrals, Rubi needs to detect the branch-cuts along the integration contour and "skip" them (or subtract their height). More below.

@galanakis
Copy link
Author

galanakis commented Oct 16, 2020

Below is the argument (complex number angle) of the antiderivative of the above function over the complex plain.

Antiderivative from exponentials: there is a branch-cut splitting the imaginary axis (the contour of integration) in half).
image

Antiderivative from trigonometric: there is no branch cut
image

One resolution would be to detect when branch-cuts partition the complex plane such that there is no integration contour that can avoid them, and remove their "height" from the result.

In this particular case, the anti-derivative is
a[z] = -(1/2) ExpIntegralEi[-z] + ExpIntegralEi[z]/2
The contour is z=i t and the branch cut is at t=0.

Rubi returns the value a[i ∞] - a[-i ∞].
Instead it should return a[i ∞] - a[0+] + a[0-] - a[-i ∞]
where a[0+], a[0-] are the limiting values right above and below the branch-cut respectively.

@galanakis galanakis changed the title Incorrect integral with exponentials, probably due to incorrect handling of branch cuts Incorrect definite integrals due to incorrect handling of branch-cuts Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant