Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: Re: Mathematica integration Vs Sympy
Posted: Apr 22, 2013 3:13 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In this case, the results are valid for a=1 in the sense of a limit, as
Limit[u, a -> 1] and limit(u, a, 1) demonstrate. This is not always the
case. Example:

In: f = Integrate[x^n, x]
Out: x^(1 + n)/(1 + n)

In: Limit[f, n -> -1, Direction -> 1]
Out: -Infinity

In: Limit[f, n -> -1, Direction -> -1]
Out: Infinity

Alex


On Sun, 21 Apr 2013, Brentt 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?
>>
>> Sergio
>>
>>

>
>





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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.