Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14265
| From | Alex Krasnov <akrasnov@eecs.berkeley.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Mathematica integration Vs Sympy |
| Date | 2013-04-21 09:17 +0000 |
| Message-ID | <kl0as3$l49$1@smc.vnet.net> (permalink) |
| References | <20130420094229.B63996A64@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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})
demonstrates.
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.
Alex
On Sat, 20 Apr 2013, Sergio R wrote:
> Hello all,
>
> Just for fun a put an integral I was doing via mathematica
> WolframAlpha
> [ http://www.wolframalpha.com/input/?i=Integrate[1%2F%28x*%281-a*%281-x%29%29%29%2Cx]
> ]
> into the online sympy [ http://live.sympy.org/ ] 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
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Mathematica integration Vs Sympy Alex Krasnov <akrasnov@eecs.berkeley.edu> - 2013-04-21 09:17 +0000
csiph-web