Approximating the Sum of Log Squared Terms for Large n?

In summary, the conversation discussed methods for approximating the value of a summation series involving squares of logarithms. The use of integrals and the Euler-Maclaurin formula were suggested as possible solutions. The conversation also touched on finding the tightness of bounds and using online calculators for accuracy. Ultimately, the use of the Euler-Maclaurin formula was found to be effective in providing a solution.
  • #1
yogo
3
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
 
Mathematics news on Phys.org
  • #2
Well, we know that since [itex]f(x)=(log(x))^2[/itex] is increasing (if x>1)

[tex]\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[/tex]

So, if you calculate the integral, then you got a sweet upper and lower bound for the sum.
 
  • #3
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.
 
  • #4
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

[tex]\int \log(x)^2dx[/tex]

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

[tex]\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[/tex]

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.

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

(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.
 
  • #6
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
 
  • #7
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.
 
  • #8
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.
 
  • #9
@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.
 

What is the meaning of "Sum of log squared terms"?

The sum of log squared terms refers to the summation of the squares of logarithmic expressions. It is represented as Σ(logx2) where x is a variable and Σ represents summation.

When is the "Sum of log squared terms" used?

The sum of log squared terms is commonly used in mathematical and statistical analyses, particularly in linear regression models. It is also used in signal processing and in calculating the variance of a dataset.

How is the "Sum of log squared terms" calculated?

To calculate the sum of log squared terms, you need to first square each logarithmic term in the expression. Then, add all the squared terms together to get the final result. For example, if the expression is logx2 + logy2, the sum of log squared terms would be (logx)2 + (logy)2.

What is the importance of the "Sum of log squared terms" in statistical analyses?

The sum of log squared terms is used to measure the variation in a dataset. It is a key component in calculating the residual sum of squares (RSS) in linear regression models, which is used to determine the goodness of fit of the model.

Are there any other applications of the "Sum of log squared terms"?

Yes, the sum of log squared terms is also used in calculating the power spectral density in signal processing. It is also used in the calculation of the Fisher information, which is a measure of the amount of information that a statistical model contains about a parameter of interest.

Similar threads

Replies
13
Views
1K
  • General Math
Replies
9
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
584
  • General Math
Replies
12
Views
921
  • General Math
Replies
16
Views
3K
Replies
3
Views
2K
  • General Math
Replies
1
Views
2K
  • General Math
Replies
2
Views
1K
Replies
6
Views
945
  • Calculus and Beyond Homework Help
Replies
1
Views
633
Back
Top