I have struggled in vain to evaluate this for any integer 'a' , but I am particularly interested in the case a=1
Any sort of method for evaluting this function at positive integers would be appreciated. Thanks!
Moderators: gmalivuk, Moderators General, Prelates
I am particularly interested in the case a=1
Heptadecagon wrote:I really would enjoy a closed form, for a=1 wolfram alpha give -((ln(2))^2)/2 , and also gives closed forms with logarithms for other positive integers, but does not prove its reasoning, although having the right answer helps for a start to work back to the proof...
pizzazz wrote:Heptadecagon wrote:I really would enjoy a closed form, for a=1 wolfram alpha give -((ln(2))^2)/2 , and also gives closed forms with logarithms for other positive integers, but does not prove its reasoning, although having the right answer helps for a start to work back to the proof...
Shouldn't that be equal to -ln(2)? (Shift the 2 in the exponent down to get -2ln(2)/2 and cancel).
nadando wrote:...Actually these are equivalent, so all you need is (-ln(2) * ln(2a^2)) / (2a).
Dopefish wrote:pizzazz wrote:Heptadecagon wrote:I really would enjoy a closed form, for a=1 wolfram alpha give -((ln(2))^2)/2 , and also gives closed forms with logarithms for other positive integers, but does not prove its reasoning, although having the right answer helps for a start to work back to the proof...
Shouldn't that be equal to -ln(2)? (Shift the 2 in the exponent down to get -2ln(2)/2 and cancel).
Nope, you can't shift the exponent down like that here, since the exponent is outside the ln, rather than inside.
ln(a^b)=b*ln(a)=/=(ln(a))^b
Citan Uzuki wrote:-snipped math-
Solving this differential equation for f(a) yields that f(a) = -log a log 2 + f(1), which is equivalent to the posted formula. Unfortunately I haven't yet found a way to prove that f(1) = -1/2 log² 2, but this will at least give you the value at every other point in terms of the value at a=1.
Heptadecagon wrote:But don't you mean f(a)=(-log a log 2 + f(1))/a , I think you just made a minor mistake.
#! /usr/bin/env python
'''
Integrate [0..infinity] log(x)/(1 + exp(ax)) for a>0
From http://forums.xkcd.com/viewtopic.php?f=17&t=87908
'''
import sys
from mpmath import mp
def calc(arange):
f = lambda x: mp.ln(x)/(1+mp.exp(a*x))
fa = lambda a: (-mp.ln(2) * mp.ln(2*a*a)) / (2*a)
print "a: integral, formula"
for a in arange:
print "%s: %s, %s" % (a, mp.quad(f, [0, mp.inf]), fa(a))
def main():
workdigits = len(sys.argv) <= 1 and 30 or int(sys.argv[1])
mp.dps = workdigits
print "Precision is %d digits = %d bits" % (workdigits, mp.prec)
#Create a list of values for a. Should get these from command line...
astep = mp.mpf('0.5')
alo = astep
ahi = mp.mpf('10.0')
alen = int(1.5 + (ahi - alo) / astep)
arange = [alo + i*astep for i in xrange(alen)]
calc(arange)
if __name__ == '__main__':
main()
Precision is 30 digits = 103 bits
a: integral, formula
0.5: 0.480453013918201424667102526327, 0.480453013918201424667102526327
1.0: -0.240226506959100712333551263163, -0.240226506959100712333551263163
1.5: -0.347515668973138849397047635782, -0.347515668973138849397047635782
2.0: -0.360339760438651068500326894745, -0.360339760438651068500326894745
2.5: -0.35014033773235204320945806619, -0.35014033773235204320945806619
3.0: -0.333908839125969899587557993333, -0.333908839125969899587557993333
3.5: -0.316735893280449322750746651496, -0.316735893280449322750746651496
4.0: -0.300283133698875890416939078954, -0.300283133698875890416939078954
4.5: -0.285060780861892724561043149002, -0.285060780861892724561043149002
5.0: -0.27116077164981630653814953836, -0.27116077164981630653814953836
5.5: -0.258521425574383772610045907985, -0.258521425574383772610045907985
6.0: -0.247029921882685187238296084388, -0.247029921882685187238296084388
6.5: -0.236563216683754891743332121731, -0.236563216683754891743332121731
7.0: -0.227004091485682007756387972366, -0.227004091485682007756387972366
7.5: -0.218246780633291879260369050975, -0.218246780633291879260369050975
8.0: -0.210198193589213123291857355268, -0.210198193589213123291857355268
8.5: -0.202777333458621146793488964004, -0.202777333458621146793488964004
9.0: -0.195914058644079853910199632982, -0.195914058644079853910199632982
9.5: -0.189547691555886425095696890883, -0.189547691555886425095696890883
10.0: -0.183625687216728295735785021813, -0.183625687216728295735785021813
PM 2Ring wrote:PS. I'm curious as to which infinite sum led to this integral...
Citan Uzuki wrote:I have it! After much mucking about with the Gamma function, I have a proof that our integral is indeed equal to -1/2 (log 2)^2. I've attached the proof as a pdf.
Users browsing this forum: Slageammalymn and 14 guests