Post Reply 
[VA] SRC #008 - 2021 is here !
01-08-2021, 01:28 AM
Post: #30
RE: [VA] SRC #008 - 2021 is here !
(01-06-2021 10:49 PM)Albert Chan Wrote:  Let f(t) = ln((0.5+|t+c|^k)/(0.5+|t-c|^k)), where c = 2^(-1/k)

k*I = ∫(f(t)/t, t = 0 .. inf)
= (∫f(t)/t, t = 0 .. c) + (∫f(t)/t, t = c .. inf)
= (∫f(t)/t, t = 0 .. c) + (∫f(1/t)/t, t = 0 .. 1/c)

Code:



I should have gone further, and scale both limits, from 0 to 1:

k*I = (∫f(c*t)/t, t = 0 .. 1) + (∫f(c/t)/t, t = 0 .. 1) = (∫g(t), t = 0 .. 1)

What is nice is c = 2^(-1/k) is not needed in the code !
Another hint that value of k does not matter ...

Combined parts into 1 integral, the code also run faster.

10 INPUT "k? ";K @ P=.0000000001
20 DEF FNG(T,F)=LN((1+(1+T)^K)*(1+(F+1)^K)/((1+(1-T)^K)*(1+(F-1)^K)))/T
30 T=TIME
40 DISP INTEGRAL(0,1,P,FNG(IVAR,1/IVAR))/K;TIME-T

>RUN
k? 2.021
 2.46740110026  .28
>RUN
k? 1
 2.46740110027  .3
>RUN
k? 2
 2.46740110026  .27
>RUN
k? 3
 2.46740110026  .27

For k=1, g(t) is simple enough that Wolfram Alpha can proof it (after a few seconds) Smile

I = ∫(ln((2+t)/(2-t)*(2t+1))/t, t = 0 .. 1) = pi^2/4
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC #008 - 2021 is here ! - Gene - 01-02-2021, 01:49 AM
RE: [VA] SRC #008 - 2021 is here ! - robve - 01-03-2021, 06:33 PM
RE: [VA] SRC #008 - 2021 is here ! - robve - 01-05-2021, 03:39 AM
RE: [VA] SRC #008 - 2021 is here ! - Albert Chan - 01-08-2021 01:28 AM
RE: [VA] SRC #008 - 2021 is here ! - Gene - 01-04-2021, 05:56 PM
RE: [VA] SRC #008 - 2021 is here ! - Gene - 01-04-2021, 07:24 PM
RE: [VA] SRC #008 - 2021 is here ! - Gene - 01-06-2021, 02:54 PM
RE: [VA] SRC #008 - 2021 is here ! - EdS2 - 01-08-2021, 01:32 PM



User(s) browsing this thread: 1 Guest(s)