# What is the meaning of adding/subtracting a fraction in a summation limit inside a limit?

In Wolfram Alpha entry 1 the following is claimed to be true:

$$\lim_{n\to \infty } \left(\sum _{k=1}^n \log (2 k)-\sum _{k=1}^{n+\frac{1}{2}} \log (2 k-1)\right)=\frac{1}{2} \log \left(\frac{\pi }{2}\right)$$

What is the meaning of adding a fraction like $$\frac{1}{2}$$ in the upper summation limit in the second sum, inside the limit?

Is it a bug a or a feature?

Compare to Wolfram Alpha entry 2 where the fraction $$\frac{1}{2}$$ in the upper summation limit of the second sum has been left out:

$$\lim_{n\to \infty } \left(\sum _{k=1}^n \log (2 k)-\sum _{k=1}^{n} \log (2 k-1)\right)=\infty$$

I get the same results in Mathematica 8.0.1:

Limit[Sum[Log[2*k], {k, 1, n}] - Sum[Log[2*k - 1], {k, 1, n + 1/2}],
n -> Infinity]
Limit[Sum[Log[2*k], {k, 1, n}] - Sum[Log[2*k - 1], {k, 1, n}],
n -> Infinity]


and as well as:

Limit[Sum[Log[2*k], {k, 1, n - 1/4}] - Sum[Log[2*k - 1], {k, 1, n + 1/4}], n -> Infinity]
Limit[Sum[Log[2*k], {k, 1, n}] - Sum[Log[2*k - 1], {k, 1, n + 1/4}], n -> Infinity]


The only support I was able to find in the documentation for Sum is:

"The limits of summation need not be numbers. They can be Infinity or symbolic expressions."

• The series is absolutely divergent. A sum depends on the order of summation, here powitive and negative seperately. A numerical approximation tests convergence on the last summands. That is of course nonsense for the differenence of to diverging sums. Any plot for the expression shows an alternating, log-divergent step function. Just set n=2m and n=2m+1. Jun 4 at 15:02

Evaluate the sums without Limit, so that you understand what limit is being computed. The problem has nothing to do with Limit. It's a bug in Sum[].

Sum[Log[2*k - 1], {k, 1, a}]
% /. a -> n + 1/2
% == Sum[Log[2*k - 1], {k, 1, n + 1/2}]
(*
Log[2^a Pochhammer[1/2, a]]
Log[2^(1/2 + n) Pochhammer[1/2, 1/2 + n]]
True
*)


Arguably, it's a "bug" in the user input. A full specification at least has non-erroneous behavior (does not evaluate):

Sum[Log[2*k - 1], {k, 1, n + 1/2},
Assumptions -> n \[Element] Integers]
(*
Sum[Log[-1 + 2 k], {k, 1, 1/2 + n},
Assumptions -> n \[Element] Integers]
*)

• Note DiscreteLimit[ Sum[Log[2*k], {k, 1, n}] - Sum[Log[2*k - 1], {k, 1, n + 1/2}], n -> Infinity] returns 1/2 Log[\[Pi]/2] which can more forcefully be argued to be a bug. However DiscreteLimit[ Sum[Log[2*k], {k, 1, n}] - Sum[Log[2*k - 1], {k, 1, n + 1/2}], n -> Infinity, Assumptions -> n \[Element] Integers] does not evaluate, even though the sums evaluate as above. Jun 7 at 3:06
• It is a bug since n+1/2 is the same as n when you go to Infinity also it makes no sense unless it rounds so 1 + 1/2 = 1.5 = 2.0 or it sums from 1.5: 1.5, 2.5, 3.5, ... Jun 8 at 3:25
• @ВалерийЗаподовников Isn't the Sum[...] correct if n + 1/2 is an integer? There's is nothing in the input of the sum to n + 1/2 that says that n is an integer. Jun 8 at 5:19
• If n + 1/2 is an integer then the other sum that also has n will not be an integer. That is the same n. Jun 8 at 5:24
• @ВалерийЗаподовников Sum[Log[2*k - 1], {k, 1, n + 1/2}] is computed independently from Sum[Log[2*k], {k, 1, n}]. There is nothing that ties the two instances of n together. They are computed before Limit is called. To me, the point is that the computation does not reflect the standard interpretation of the mathematical statement in the OP's first TeX formula. Jun 8 at 14:19

Limit is assuming that n is continuous, and so the sums are simplified to give results for non-integers. You can see this with TracePrint, it eventually evaluates:

Log[2^n Pochhammer[1,n]]-Log[2^(1/2+n) Pochhammer[1/2,1/2+n]]


This function does converge. However, it doesn't equal the sums for any n (the first Log[...Pochhammer... agrees with the first sum on $$\mathbb Z$$, and the second agrees with the second sum on $$\mathbb Z+\frac12$$, but together they don't agree anywhere).

I don't know how to make the Limit evaluate if you explicitly write Floor[n+1/2] in the bound, but Roland's comment is correct.

The story is the same for your other functions (although the last pair diverges even after 'continuousization').