Post Reply 
[VA] SRC #008 - 2021 is here !
01-04-2021, 04:16 PM (This post was last modified: 01-04-2021 04:17 PM by Albert Chan.)
Post: #11
RE: [VA] SRC #008 - 2021 is here !
Code:


Post #10, we transform I by using substitution: y = pi/2-x, dy = -dx

We can continue substitutions: t = tan(y), dt = (1+t^2) dy
This shift integration limit from y = 0 .. pi/2, to t = 0 .. infinity

One more substitution, t = (1-u)/u, dt  = (-1/u^2) du
This shift back integration limit back to finite: u = 0 .. 1

This remove all use of trigonometric functions, or constant PI :)

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

>RUN
k? 2.021
 1.53125007397 + .936151026314 = 2.46740110028                  .66
>RUN
k? 1
 1.43674636688 + 1.03065473339 = 2.46740110027                  .66
>RUN
k? 2
 1.52994302476 + .937458075515 = 2.46740110028                  .65
>RUN
k? 3
 1.57553816687 + .891862933407 = 2.46740110028                  .66

reference: http://fmnt.info/blog/20180818_infinite-integrals.html
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-04-2021 04:16 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: 1 Guest(s)