Approximating the Sum of Log Squared Terms for Large n?

  • Context: Graduate 
  • Thread starter Thread starter yogo
  • Start date Start date
  • Tags Tags
    Log Sum Terms
Click For Summary

Discussion Overview

The discussion revolves around approximating the summation series of the squares of logarithmic terms, specifically S = [log(1)]^2 + [log(2)]^2 + ... + [log(n)]^2, for large values of n. Participants explore various methods to estimate this sum without evaluating each term directly, considering both theoretical and practical approaches.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation

Main Points Raised

  • One participant suggests that since f(x) = (log(x))^2 is increasing for x > 1, integrals can provide upper and lower bounds for the sum.
  • Another participant proposes using the integral of log(x)^2 and mentions that it has a straightforward solution via integration by parts.
  • Some participants discuss the Euler-Maclaurin formula as a method for asymptotic expansions of sums, indicating its potential usefulness for this problem.
  • There is a query about the tightness of the bounds provided by the integrals, leading to a suggestion to calculate the difference between the integrals to assess accuracy.
  • One participant shares their experience using the Euler-Maclaurin formula, noting its effectiveness in achieving high accuracy with fewer correction terms.
  • Another participant describes a method to refine the bounds by combining direct sums of initial terms with integrals for the remaining terms.

Areas of Agreement / Disagreement

Participants generally agree on the utility of integral bounds and the Euler-Maclaurin formula for approximating the sum, but there is no consensus on the best method or the tightness of the bounds. Multiple approaches are discussed, and the effectiveness of each remains a point of exploration.

Contextual Notes

Some limitations include the dependence on the accuracy of the integrals and the potential need for more correction terms in the Euler-Maclaurin formula to achieve desired precision.

Who May Find This Useful

This discussion may be useful for those interested in numerical methods for approximating summations, particularly in mathematical analysis and computational applications involving logarithmic functions.

yogo
Messages
3
Reaction score
0
Hi all,

I have a summation series which goes like this,

S = [log(1)]^2 + [log(2)]^2 + [log(3)]^2 + ... + [log(n)]^2

Since each term is square of the logarithm of a value, I think there are no general tricks which can be used to solve this.

But is there any way to approximate the value of this summation?

The problem I am facing here is that n is very very large and it is not possible (time-wise and memory-wise) for my program to evaluate every term. So I was hoping for some approximate solution in terms of 'n'.

Thanks,
yogo
 
Physics news on Phys.org
Well, we know that since f(x)=(log(x))^2 is increasing (if x>1)

\int_2^{n+1} \log(x-1)^2dx \leq \sum_{n=1}^n \log(n)^2 \leq \int_1^{n+1} \log(x)^2 dx

So, if you calculate the integral, then you got a sweet upper and lower bound for the sum.
 
can't this be a manipulated into a product of n? log(2)+log(3) = log((2)(3)), I'm uncertain what to do with the squared.
 
coolul007 said:
can't this be a manipulated into a product of n? log(2)+log(3) = log((2)(3)), I'm uncertain what to do with the squared.

Not really. But the integral

\int \log(x)^2dx

has a nice elementary solution. Just integrate by parts twice.
 
micromass said:
Well, we know that since f(x)=(log(x))^2 is increasing (if x>1)

\int_2^{n+1} \log(x-1)^2dx \leq \sum_{n=1}^n \log(n)^2 \leq \int_1^{n+1} \log(x)^2 dx

So, if you calculate the integral, then you got a sweet upper and lower bound for the sum.

In a similar vein, there is also the Euler-Maclaurin formula for asymptotic expansions of sums.

\sum_{k=a}^{k=n} f(k) \sim \int_a^n dx~f(x) + \frac{f(a)+f(n)}{2} + \mbox{corrections}.

(The full form of the expansion is given on the wikipedia page I linked to). This looks like it would be useful in this case.
 
Thanks for your help guys. Appreciate it.

@micromass: I am not so good at Math. I was wondering how tight these bounds are?

Thanks,
yogo
 
You would have to calculate the integral to find out. Or you can let an online calculator do it. To find the tightness of the bonds, calculate the difference between the integrals, or in other words the integral from n to n+1.

http://www.wolframalpha.com/widgets/view.jsp?id=8ab70731b1553f17c11a3bbc87e0b605

Using Wolfram Alpha the integral from 10 to 11 for example is ~5.5, so if you take the average of them you get a maximal error of ~2.75, actual error would probably be much less, since the function doesn't jump too much, and is rather straight for intervals of width 1. Lower bound is ~25, and using Wolfram Alpha to calculate the sum directly gives ~27.65. If you want more accuracy, you could calculate a few terms of the sum directly, and then get the upper and lower bounds for the rest, for the upper bound it is the sum from 1 to m-1 plus the integral from m to n+1, and for the lower bound the sum from 1 to m-1 plus the integral from m-1 to n. The difference of the upper and lower bounds now turns out to be the integral from n to n+1 minus the integral from m-1 to m, which is better than just the integral from n to n+1.

So for example if you want the sum of the first 1000 terms and you know the first 100 terms exactly, you could do something like this. Sum of first 100 terms is 1408.33. Lower bound is 1408.33+34501.8=35910.13, higher bound is 1408.33+34528.3=35936.63, average is 35923.38. Letting Wolfram Alpha calculate the sum itself, it gets the answer 35923.4, I don't know how it calculates the sum itself and how much it rounded that answer, but at least it shows that taking the average of the bounds is not too bad. So now you have an approximation of the sum of the first 1000 terms, you can now use that to calculate the sum of the first 10000 terms etc.
 
I also tried the Euler-Maclaurin formula. Adding only first two terms from the sum with the Bernoulli numbers in it, it got the sum of the first 1000 terms of log(x)^2 accurate to within 0.0015, so it seems a lot better than just taking the average of integral bounds, especially if you would include more of the correction terms. You could probably get very accurate with more correction terms.
 
@chingel, @mute: Thanks for all the help. I am using Euler-Maclaurin formula now, seems to work really well for me. I actually have an upcoming deadline, and now I am good! :)

Thanks all.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
5K
  • · Replies 11 ·
Replies
11
Views
15K
  • · Replies 5 ·
Replies
5
Views
3K