New Reply

Sum of log squared terms?

 
Share Thread Thread Tools
Aug10-12, 06:41 PM   #1
 

Sum of log squared terms?


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
PhysOrg.com
PhysOrg
mathematics news on PhysOrg.com

>> Mathematicians analyze social divisions using cell phone data
>> Can math models of gaming strategies be used to detect terrorism networks?
>> Mathematician proves there are infinitely many pairs of prime numbers less than 70 million units apart
Aug10-12, 09:33 PM   #2
 
Blog Entries: 8
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
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.
Aug11-12, 07:49 AM   #3
 
Recognitions:
Gold Membership Gold Member
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.
Aug11-12, 07:56 AM   #4
 
Blog Entries: 8
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus

Sum of log squared terms?


Quote by coolul007 View Post
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.
Aug11-12, 11:15 AM   #5
 
Recognitions:
Homework Helper Homework Help
Quote by micromass View Post
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.
Aug11-12, 01:28 PM   #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
Aug15-12, 07:54 AM   #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/...1a3bbc87e0b605

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.
Aug16-12, 07:16 AM   #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.
Aug16-12, 02:54 PM   #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.
New Reply

Tags
logarithm series, summation series
Thread Tools


Similar Threads for: Sum of log squared terms?
Thread Forum Replies
Chi-squared and reduced Chi-squared Set Theory, Logic, Probability, Statistics 1
Are all quadratic terms in gauge fields necessarily mass terms? Quantum Physics 0
charge density in terms of (r,θ) but need it in terms of the vector r' Advanced Physics Homework 8
Question about Mean Squared Error::Why Squared? Set Theory, Logic, Probability, Statistics 10