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

integrate: Correctly handle manual, meijerg, risch flags #14475

Merged
merged 1 commit into from Mar 12, 2018
Merged

integrate: Correctly handle manual, meijerg, risch flags #14475

merged 1 commit into from Mar 12, 2018

Conversation

normalhuman
Copy link
Contributor

Only one of manual, meijerg, risch can be True, since True means "use only this method" (per the documentation ofintegrate). But this was not checked.

>>> integrate(1/x, x, risch=True, manual=True)
log(x)

Also, the option manual=True did not actually prevent other integration methods

>>> integrate(exp(x**2), x, manual=True)
sqrt(pi)*erfi(x)/2      # from meijerint

Both are corrected now: ValueError is raised if more than one True is given, and whenever one is True, the others are set to False.

Only one of manual, meijerg, risch can be True, since True means "use
only this method" (per [the documentation of
`integrate`](http://docs.sympy.org/latest/modules/integrals/integrals.html#api-reference)).
This was not checked.
```
>>> integrate(1/x, x, risch=True, manual=True)
log(x)
```
Also, the option manual=True did not actually prevent meijerg integration
```
>>> integrate(exp(x**2), x, manual=True)
sqrt(pi)*erfi(x)/2
```
Both are corrected now: ValueError is raised if more than one True is
given, and whenever one is True, the others are set to False.
@asmeurer
Copy link
Member

The tests might have to be changed at some point, but the comments should make it clear enough what they are testing.

@asmeurer asmeurer merged commit d018aca into sympy:master Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants