The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Mathematica integration Vs Sympy
Replies: 7   Last Post: Apr 23, 2013 9:38 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alex Krasnov

Posts: 15
Registered: 10/3/12
Re: Mathematica integration Vs Sympy
Posted: Apr 21, 2013 5:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Mathematica's Integrate implicitly assumes that parameters have generic
values. The result can be invalid for special values, in this case, a==1.
It appears that the same is true for SymPy's integrate, as u.subs({a:1})

For other values, the Mathematica and SymPy results appear to differ by
a constant of integration. Both results are valid. This is a consequence
of different integration procedures and can occur even for the same
integral in different forms in Mathematica and presumably SymPy.


On Sat, 20 Apr 2013, Sergio R wrote:

> Hello all,
> Just for fun a put an integral I was doing via mathematica
> WolframAlpha
> [[1%2F%28x*%281-a*%281-x%29%29%29%2Cx]
> ]
> into the online sympy [ ] console
> the following:
> a = Symbol('a'); g = 1/(x*(1-a*(1-x))) ; u=simplify(integrate(g,x))
> Then, to display the result, at the sympy ">>>" prompt, type u
> and hit return.
> To my surprise, sympy seems to give the right result without any
> assumption, while mathematica's result seems to assume a>1, which is
> not specified. Also for this case (a>1) sympy gives an extra constant
> which is not present in the mathematica result.
> Is there a way to make mathematica to output a general result like
> sympy
> in this case?
> Sergio

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.