-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Sympy returns some of the integral unevaluated #15749
Comments
I think the problem occurs only when we are using the trigonometric function which is raised to some rational power or exponents but if I use
this means that integrals do not evaluate if the power is not an integer though |
The problem here is that there are some integrals that cannot be evaluated yet by Sympy. |
Wolfram Alpha also integrates the first example as the elliptic integral of the second kind with parameter The third example is also elliptic integral of the first kind and for second example Wolfram Alpha not able to integrate it. I think maybe |
My approach for the integration of function |
I used scipy and numpy to integrate
I want to just ask that can we convert the answer that we get from above to symbolic form i.e. decimal number to rational number if we could it will be easy to evaluate these integrals. |
If There's no way to go from a numerical integral to a symbolic one. If you only care about a numerical answer, you may be better off just using scipy.quad from the start. The easiest way to add support for an integral that isn't supported is to find a general integration rule that applies to it and add that rule to |
If one is lucky,
(A remark from user's point of view, not developer's.) |
If you do that you should always be careful to verify the answer from nsimplify somehow, e.g., by computing more digits. By the way, |
Yes, Meijer G does not always get the right branch of polylog in the antiderivative, but I failed to improve on its present state. #13850 |
I think that using the |
This is true if there are no symbols besides the integration variable and it is a single integral (rather than a double/triple/etc integral). It should be better documented (#23025) and support for multiple integrals should be added (#21605). |
Sympy returns some of the integral unevaluated
Examples:
integrate(sqrt(sin(x)))
integrate(exp(sin(x)))
integrate(sin(x)**Rational(3,2))
for integral
integrate(sqrt(sin(x)))
andintegrate(exp(sin(x)))
it returnsAbove code is in python 3.7.1 Shell. In Sympy Live it returns in symbolic form but does not evaluate the integral.
for integral
integrate(sin(x)**Rational(3,2))
it returnsAbove code is in python 3.7.1 Shell. In Sympy Live it gives
Error: Operation timed out.
There are many more examples of integrals which either return in symbolic form without evaluated or it gives a timeout error. I have run these code in python 3.7.1 Shell, cmd and Sympy Live but none of it works. I think issues #7051 and #15730 is very much related to these issues. Do not know why this is happening but I will try to figure out this.
The text was updated successfully, but these errors were encountered: