ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 03 Nov 2014 20:29:44 +0100Sage doesn't show limit of ratio of sumshttps://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/ Hi everyone,
I'm new to Sage and I'm trying to obtain the following limit:
$$\lim_{N\to \infty}\frac{\sum_{i=1}^{N} x_i^{5/2}}{\sum_{i=1}^N x_i^2}$$
with $x_i=(N-i)/(N-1)$. What I tried was:
i = var('i')
assume(i>0,'integer')
N = var('N')
assume(N>0,'integer')
x_i = (N-i)/(N-1)
numerator = sum(x_i^(5./2.),i,1,N)
denominator = sum(x_i^(2.),i,1,N)
limit(numerator/denominator,N=oo)
However, this just gives me:
6*limit((N - 1)*sum(((N - i)/(N - 1))^2.5, i, 1, N)/(2*N^2 - N), N, +Infinity)
From what I can see, Sage has no problems with the denominator, the general formula of which was obtained easily. However, apparently it has problems obtaining the general formula for the numerator due to the fact that the exponent in the sum is not an integer. Is there a way to cope with this? How can I obtain the limit?
Thanks in advance for all the help!
Sun, 02 Nov 2014 23:23:58 +0100https://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/Answer by rws for <p>Hi everyone,</p>
<p>I'm new to Sage and I'm trying to obtain the following limit:
$$\lim_{N\to \infty}\frac{\sum_{i=1}^{N} x_i^{5/2}}{\sum_{i=1}^N x_i^2}$$
with $x_i=(N-i)/(N-1)$. What I tried was:</p>
<pre><code>i = var('i')
assume(i>0,'integer')
N = var('N')
assume(N>0,'integer')
x_i = (N-i)/(N-1)
numerator = sum(x_i^(5./2.),i,1,N)
denominator = sum(x_i^(2.),i,1,N)
limit(numerator/denominator,N=oo)
</code></pre>
<p>However, this just gives me:</p>
<pre><code>6*limit((N - 1)*sum(((N - i)/(N - 1))^2.5, i, 1, N)/(2*N^2 - N), N, +Infinity)
</code></pre>
<p>From what I can see, Sage has no problems with the denominator, the general formula of which was obtained easily. However, apparently it has problems obtaining the general formula for the numerator due to the fact that the exponent in the sum is not an integer. Is there a way to cope with this? How can I obtain the limit?</p>
<p>Thanks in advance for all the help!</p>
https://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/?answer=24763#post-id-24763Sage uses Maxima for formal sums and so depends on that package. Maxima can compute
sage: sum(1/i^3,i,1,N)
gen_harmonic_number(3, N)
but unfortunately Sage cannot use this result symbolically. A ticket for this is waiting for review:
http://trac.sagemath.org/ticket/16671
However, to compute your sum Maxima would need to know about generalized harmonic
numbers with rational index. So this functionality must first be implemented in Maxima.
Even then, this won't give you the limit which, I think, could be computable with some
holonomic package. Something like this is missing in Sage, at the moment, as well.
Finally, I could well be wrong in the above, and there may be a special shortcut for implementation.Mon, 03 Nov 2014 18:46:57 +0100https://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/?answer=24763#post-id-24763Comment by nespinoza for <p>Sage uses Maxima for formal sums and so depends on that package. Maxima can compute</p>
<pre><code>sage: sum(1/i^3,i,1,N)
gen_harmonic_number(3, N)
</code></pre>
<p>but unfortunately Sage cannot use this result symbolically. A ticket for this is waiting for review:
<a href="http://trac.sagemath.org/ticket/16671">http://trac.sagemath.org/ticket/16671</a></p>
<p>However, to compute your sum Maxima would need to know about generalized harmonic
numbers with rational index. So this functionality must first be implemented in Maxima.
Even then, this won't give you the limit which, I think, could be computable with some
holonomic package. Something like this is missing in Sage, at the moment, as well.</p>
<p>Finally, I could well be wrong in the above, and there may be a special shortcut for implementation.</p>
https://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/?comment=24764#post-id-24764I see...well, I'll have to wait then. Simulations are good enough anyways to actually see the limiting value!Mon, 03 Nov 2014 20:29:44 +0100https://ask.sagemath.org/question/24744/sage-doesnt-show-limit-of-ratio-of-sums/?comment=24764#post-id-24764