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
integrate(exp(exp(I*x)), [x, 0, 2*pi]) incorrectly 0 #16046
Comments
This returns an unevaluated integral in 1.3. |
There are many examples of the same behaviour among older issues. When the integrand is periodic, its antiderivative will usually also turn out to be periodic. It follows that if the integral over a period is not zero, the antiderivative will be discontinuous. That should be checked before applying the fundamental theorem of calculus (that only works with continuous antiderivatives). |
Is it possible to solve these by detecting periodic functions with discontinuous antiderivatives and then using a patched up antiderivative like Related issue #15730 |
Something like that will do if the discontinuities are at |
As long as the discontinuities are periodic (which they will be if the antiderivative is periodic) then it should be possible to add a number of different terms like |
I think that would work. Only, one has to find all the |
Are there already methods for detecting if an expression is periodic or continuous or for finding discontinuities? |
There is |
In this particular case the antiderivative is In [5]: integrate(exp(exp(I*x)))
Out[5]:
⎛ ⅈ⋅x⎞
-ⅈ⋅Ei⎝ℯ ⎠ Periodicity doesn't work presumably because it doesn't understand In [14]: from sympy.calculus.util import periodicity
In [15]: print(periodicity(exp(I*x), x))
None |
Hey, can I work on this issue? But I 'm still not good enough to do this alone since I have only fixed a single issue that too partly. |
I don't know what can be done for solving this kind of integral. I described something above but it's not simple because other features for finding discontinuities etc. don't exist. |
well if you solve it by hand you use substitution e^ix = t but I don't know how does sympy use substitution |
In the current master the following result is returned but it isn't getting simplified it is returning same expression
|
Yes, this is the expected behavior: return the Integral if SymPy can solve it. |
The answer should be
2*pi
.The text was updated successfully, but these errors were encountered: