Post Reply 
[VA] SRC #008 - 2021 is here !
01-06-2021, 10:49 PM
Post: #27
RE: [VA] SRC #008 - 2021 is here !
Another way to calculate I, simpler and faster Smile

Code:






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)

10 INPUT "k? ";K @ C=2^(-1/K) @ P=.0000000001
20 DEF FNF(T)=LN((.5+(T+C)^K)/(.5+ABS(T-C)^K))
30 T=TIME
40 S1=INTEGRAL(0,C,P,FNF(IVAR)/IVAR)/K
50 S2=INTEGRAL(0,1/C,P,FNF(1/IVAR)/IVAR)/K
60 DISP S1;"+";S2;"=";S1+S2,TIME-T

>RUN
k? 2.021
 .936151026284 + 1.53125007398 = 2.46740110026                  .38
>RUN
k? 1
 1.0306547334 + 1.43674636689 = 2.46740110029                   .33
>RUN
k? 2
 .937458075505 + 1.52994302476 = 2.46740110026                  .38
>RUN
k? 3
 .89186293341 + 1.57553816687 = 2.46740110028                   .39
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-06-2021 10:49 PM
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: 2 Guest(s)