[VA] SRC #011 - April 1st, 2022 Bizarro Special
|
04-10-2022, 12:11 AM
Post: #18
|
|||
|
|||
RE: [VA] SRC #011 - April 1st, 2022 Bizarro Special
This version improve accuracy by removing square roots. Let x=u^2, v=1-u
∫(f(1-√x), x=0..1) = ∫(f(1-u)*(2u), u=0..1) = 2*∫(f(v)*(1-v), v=0..1) Transformed integral (with discontinuity at x=0, evaluate in 2 pieces) \(\displaystyle I = 4 \int_{-1}^{1} \int_0^1 \int_0^1 \frac{(d+x)\,(1-|x|)\,(1-y)\,(1-z)} {[(d+x)^2 + y^2 + z^2]^{3/2}}\;dz\;dy\;dx \) 10 P=.0001 @ D=1 @ T=TIME 20 DEF FNZ(X,Y)=INTEGRAL(0,1,P,X/(X*X+Y*Y+IVAR*IVAR)^1.5*(1-IVAR)) 30 DEF FNY(X)=INTEGRAL(0,1,P,FNZ(X,IVAR)*(1-IVAR)) 40 I1=INTEGRAL(0,1,P,FNY(D+IVAR)*(1-IVAR))*4 @ DISP I1,IBOUND*4,TIME-T 50 I2=INTEGRAL(0,1,P,FNY(D-IVAR)*(1-IVAR))*4 @ DISP I2,IBOUND*4,TIME-T 60 DISP I1+I2 >RUN .236198653356 2.35758565639E-5 128.35 .689787720788 6.90121464808E-5 763.87 .925986374144 1st integral is sum of force for mass separated by D or more. 2nd integral is sum of force for all mass separated by D or less. 2nd integral (for D=1) contributed about 3/4 of full force. Its singularity (where planets are touching) make it harder to calculate. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)