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


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

Re: Re: Mathematica integration Vs Sympy

Started byAlex Krasnov <akrasnov@eecs.berkeley.edu>
First post2013-04-22 07:13 +0000
Last post2013-04-24 01:38 +0000
Articles 3 — 2 participants

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:  Re: Mathematica integration Vs Sympy Alex Krasnov <akrasnov@eecs.berkeley.edu> - 2013-04-22 07:13 +0000
    integral of x^n Richard Fateman <fateman@cs.berkeley.edu> - 2013-04-23 04:02 +0000
    integral of x^n Richard Fateman <fateman@cs.berkeley.edu> - 2013-04-24 01:38 +0000

#14273 — Re: Re: Mathematica integration Vs Sympy

FromAlex Krasnov <akrasnov@eecs.berkeley.edu>
Date2013-04-22 07:13 +0000
SubjectRe: Re: Mathematica integration Vs Sympy
Message-ID<kl2nvm$2di$1@smc.vnet.net>
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
>>
>>
>
>

[toc] | [next] | [standalone]


#14276 — integral of x^n

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-04-23 04:02 +0000
Subjectintegral of x^n
Message-ID<kl514t$bhr$1@smc.vnet.net>
In reply to#14273
On 4/22/2013 12:13 AM, Alex Krasnov wrote:
> 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
>
>

Yes, but an equally valid antiderivative for x^n  is


s = (x^(n+1)-1)/(n+1).

note

Limit[s,n->-1]  is Log[x].

This alternative formula was, I think, pointed out more than once
to Wolfram Inc. probably circa version 2.

There are other issues that come up when using antiderivatives +
the fundamental theorem of integral calculus. Some of these become
apparent by reading FTIC carefully.

RJF


[toc] | [prev] | [next] | [standalone]


#14277 — integral of x^n

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2013-04-24 01:38 +0000
Subjectintegral of x^n
Message-ID<kl7d38$kd6$1@smc.vnet.net>
In reply to#14273
On 4/22/2013 12:13 AM, Alex Krasnov wrote:
> 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
>
>

Yes, but an equally valid antiderivative for x^n  is


s = (x^(n+1)-1)/(n+1).

note

Limit[s,n->-1]  is Log[x].

This alternative formula was, I think, pointed out more than once
to Wolfram Inc. probably circa version 2.

There are other issues that come up when using antiderivatives +
the fundamental theorem of integral calculus. Some of these become
apparent by reading FTIC carefully.

RJF


[toc] | [prev] | [standalone]


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


csiph-web