Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14270 > unrolled thread

Re: Mathematica integration Vs Sympy

Started byMurray Eisenberg <murray@math.umass.edu>
First post2013-04-22 07:13 +0000
Last post2013-04-22 07:13 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re:  Mathematica integration Vs Sympy Murray Eisenberg <murray@math.umass.edu> - 2013-04-22 07:13 +0000

#14270 — Re: Mathematica integration Vs Sympy

FromMurray Eisenberg <murray@math.umass.edu>
Date2013-04-22 07:13 +0000
SubjectRe: Mathematica integration Vs Sympy
Message-ID<kl2nv6$2dc$1@smc.vnet.net>
Mathematica certainly seems to be assuming a != 1, since of course the displayed output is undefined when a = 1.

However:

   1/(x*(1 - a*(1 - x))) /. a -> 1
1/x^2
   Integrate[%, x]
-1/x

which is correct. And:

   Limit[(Log[1 + a (-1 + x)] - Log[x])/(-1 + a), a -> 1]
(-1 + x)/x

which differs from -1/x by a constant.

The real question should be, I think: why does Mathematica generate conditions on parameters for some integrals but not others?


On Apr 21, 2013, at 5:16 AM, Brentt <brenttnewman@gmail.com> wrote:

> The result:
>
> In[0]: Integrate[1/(x*(1 - a*(1 - x))), x]
> Out[0]: (Log[1 + a (-1 + x)] - Log[x])/(-1 + a)
>
> Seems to be true for all complex a and x . Why do you think it assumes a>1?
>
>
> On Sat, Apr 20, 2013 at 2:42 AM, Sergio R <sergiorquestion@gmail.com> 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?

---
Murray Eisenberg                                    murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305





[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web