Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wrong Limit Answer

6 views
Skip to first unread message

miker...@yahoo.com

unread,
Feb 8, 2007, 7:35:18 PM2/8/07
to
Hi all,

This is another example of limit

> f:=(x,y)->x/(x^2+y^2):
> limit(Sum(f(x,y), y=0..infinity),x=infinity);

0

but the answer is pi/2, am I correct?


Best Regards,


Mike Rechard

Raqeeb Rasheed

unread,
Feb 8, 2007, 8:17:50 PM2/8/07
to

That is another example which shows that Maple uses `limit/series` to
expand the input and probably that is why you're seeing this
(incorrect) answer.

An easy workaround is to compute the Sum first and then take the limit
> f:=(x,y)->x/(x^2+y^2):
> ans:=sum(f(x,y), y=0..infinity): # Note "s" is lower case in sum
> limit(ans,x=infinity);

Pi

----

2
or you can use `value/Limit`:
> value(Limit(Sum(f(x,y), y=0..infinity),x=infinity));

Pi

----

2

Raqeeb Rasheed

isr...@math.myuniversitysinitials.ca

unread,
Feb 8, 2007, 10:02:37 PM2/8/07
to
miker...@yahoo.com writes:

> Hi all,
>
> This is another example of limit
>
> > f:=(x,y)->x/(x^2+y^2):
> > limit(Sum(f(x,y), y=0..infinity),x=infinity);
>
> 0
>
> but the answer is pi/2, am I correct?

Yes. "limit" isn't very sophisticated about sums,
I think it just assumes that the limit of the sum
is the sum of the limits.
--
Robert Israel isr...@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada

Walter Roberson

unread,
Feb 8, 2007, 10:07:39 PM2/8/07
to
In article <1170981318.2...@l53g2000cwa.googlegroups.com>,
<miker...@yahoo.com> wrote:

>This is another example of limit

>> f:=(x,y)->x/(x^2+y^2):
>> limit(Sum(f(x,y), y=0..infinity),x=infinity);

> 0

>but the answer is pi/2, am I correct?

Sum is the sum of integers, not the integral over real numbers.

Definite summation is done by probing g(t+1) - g(t).
If you hold x as constant because you are running the Sum() over y,
then g(infinity+1) = x/(x^2+(infinity+1)^2) = x/infinity^2 = 0
and similarily g(infinity) = 0, so Sum() deduces that the
difference of terms of the summation is 0 and hence that the
definite summation is 0 (because any residue term in common for both
is going to cancel out.) Thus you are asking for
limit(0,x=infinity) which is, of course, 0.

There are possibly better approaches to deducing the definite sum,
but I'm reporting here the approach actually taken by Sum().
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton

Walter Roberson

unread,
Feb 8, 2007, 10:35:12 PM2/8/07
to
In article <eqgohr$r91$1...@canopus.cc.umanitoba.ca>,

>>> limit(Sum(f(x,y), y=0..infinity),x=infinity);

>Sum is the sum of integers, not the integral over real numbers.

Correction: what I meant is that Sum is the sum over integer
indices; the value contributed at any particular integer index
can be real (or imaginary).
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes

Nasser Abbasi

unread,
Feb 8, 2007, 10:35:22 PM2/8/07
to

<miker...@yahoo.com> wrote in message
news:1170981318.2...@l53g2000cwa.googlegroups.com...

> Hi all,
>
> This is another example of limit
>
>> f:=(x,y)->x/(x^2+y^2):
>> limit(Sum(f(x,y), y=0..infinity),x=infinity);
>
> 0
>
> but the answer is pi/2, am I correct?
>

By introducing an intermediate step, Maple does give the correct answer:

>restart
>f:=(x,y)->x/(x^2+y^2):
> sum(f(x,y), y=0..L);
> limit(%,L=infinity);
> limit(%,x=infinity);
pi/2


btw, I tried this in the original form on Mathematica 5.2, here is the
result:

f[x_, y_] := x/(x^2 + y^2)
Limit[Sum[f[x, y], {y, 0, Infinity}], x -> Infinity]

pi/2

Nasser


Preben Alsholm

unread,
Feb 9, 2007, 3:44:47 AM2/9/07
to
Nasser Abbasi wrote:
> btw, I tried this in the original form on Mathematica 5.2, here is the
> result:
>
> f[x_, y_] := x/(x^2 + y^2)
> Limit[Sum[f[x, y], {y, 0, Infinity}], x -> Infinity]
>
> pi/2

This is not the Mathematica equivalent of the original, but is the
Mathematica equivalent of the version with sum (lower case s).
That version is handled perfectly by Maple too, as you noticed yourself.

Preben Alsholm

Nasser Abbasi

unread,
Feb 9, 2007, 4:42:07 AM2/9/07
to

"Preben Alsholm" <P.K.A...@mat.dtu.dk> wrote in message
news:eqhcf6$ll0$1...@news.net.uni-c.dk...

You are right. I did not notice that Maple was using the inert Sum, I guess
because in Mathematica there is only 'Sum' and there is no 'sum'.

btw, in Mathematica it is not as easy to 'hold' the expression unevaluated
as in Maple.

But this below is Mathematica code which does the same as the above Maple
code. i.e. it 'holds' the evaluation of the Sum and the limits, then it
releases the hold. And it gives pi/2 then. I think now may be I am
comparing apples to apples? I am not sure. Any way, this is how it look in
Mathematica, sort of equivelent to Maple use of the inert form of 'Sum'

It is hard to see in text, so I put a screen shot here for you to see

http://12000.org/tmp/020807/sum.PNG

Nasser


Preben Alsholm

unread,
Feb 9, 2007, 4:58:59 AM2/9/07
to
Nasser Abbasi wrote:

> But this below is Mathematica code which does the same as the above Maple
> code. i.e. it 'holds' the evaluation of the Sum and the limits, then it
> releases the hold. And it gives pi/2 then.

But only after releasing the hold, which in Maple terms means (I
suppose) after having replaced Sum with sum.

That there is no output from the Hold version is good, though.

Preben Alsholm

Dana

unread,
Feb 10, 2007, 12:10:42 PM2/10/07
to
> ...so I put a screen shot here for you to see

Just two cents. In Mathematica, using "HoldForm" instead of "Hold" can give
a nicer picture by hiding the "Hold" text in the output.
Just thought I'd mention it. Depends on what one needs of course.

--
Dana


"Nasser Abbasi" <n...@12000.org> wrote in message
news:RlXyh.141$_k...@newsfe07.phx...

0 new messages