Professional Documents
Culture Documents
Most of the books mention up to double integration. I needed triple integration to solve some
electromagnetic problem in 1997. I took up challenge to write, compile, & execute source codes up
to ten dimensions definite integral to solve problems in various industries. It took me nearly 5000
hours to overcome constraints, and reach my target in 2017. Now, source codes are also converted
in MATLAB.
Key words:
I was stuck up, in 1997, to solve an electromagnetic problem having triple integral. I searched many
libraries but failed to get source code. Also, approached domain experts and they did not give
solution.
I was engaged in job (1997) when this idea struck to me. Since, I am passionate to solve
mathematical problems and I took up this challenge. I completed this task in four phases between
1997 to 2017.
Documenting the research process was given top priority. An exhaustive process was
documented in 17 steps.
Applied research for numerical integration 23-02-2022
Due to definite guidelines laid down, source code for 3-6 dimensions definite integral could
easily be written & executed. Since pre-defined functions were used, length of source code
was huge. Please see below (based on Simpson’s 1/3 rd formula for integration)
o 1– dimension integral: 1-variable – 3 coefficients – 3 terms in formula
o 2- dimension integral: 2-variables – 9 coefficients – 9 terms in formula
o 3 – dimension integral – 3-variables – 27 coefficients – 27 terms
o 4 - dimension integral – 4-variables – 81 coefficients – 81 terms
o 5 - dimension integral – 5-variables – 243 coefficients – 243 terms
Source code for 7 & 8 dimension were written. It again gave compilation error. I was
compelled to explore new method or new software to overcome the problem. How to
reduce code length?
I took time to evolve an iterative process to replace pr-defined functions. It was a right
decision. It drastically reduced code length and execution time also reduced.
Source code for 9 & 10 dimension were written with iteration. It was run successively.
Now, MATLAB was studied for some days to write the all above codes. I could succeed.
A new challenge surfaced, how to store the coefficients as “data file”? Excel sheet solved this
problem.
Now, pre-defined functions have been eliminates, iteration process is dsigned such a way to
call coefficients from data file. It helps in “protection of misuse” as well as reduces execution
time.
The source code for 10-dimension integral has been appended where “coefficients have to be called
from “data file”. For 10 dimension definite integral, 59049 coefficients have been stored in this data
file (264 kb).
If THIS ARTICLE IS ACCEPTED HERE, I WILL REVEAL RESEARCH PROCESS IN NEXT ARTICLE.
Nanak T. Dadlani
nanak.dadlani@gmail.com
INDIA
Applied research for numerical integration 23-02-2022
Applied research for numerical integration 23-02-2022
C INTEG10.FOR (03-09-2021)
DIMENSION CO(59049),FZ(59049),SUMM(4),X(3),Y(3),Z(3),
1 W(3),V(3),U(3),S(3),R(3),Q(3),P(3)
NI=50
NO=66
OPEN (UNIT=50,FILE='INTEG10.TXT')
DO 20 N=1,59049
READ(NI,*) CO(N)
20 CONTINUE
C WRITE(*,*)
C WRITE(*,*)
C Limits:
NUMX=1
NUMY=1
NUMZ=1
NUMW=1
NUMV=1
NUMU=1
NUMS=1
NUMR=1
NUMQ=1
NUMP=1
XA=0.
XB=1.
YA=0.
YB=1.
ZA=0.
ZB=1.
WA=0.
WB=1.
VA=0.
VB=1.
UA=0.
UB=1.
SA=0.
SB=1.
RA=0.
RB=1.
QA=0.
QB=1.
Applied research for numerical integration 23-02-2022
PA=0.
PB=1.
DO 200 K=1,2
NUMMX=NUMX*K
NUMMY=NUMY*K
NUMMZ=NUMZ*K
NUMMW=NUMW*K
NUMMV=NUMV*K
NUMMU=NUMU*K
NUMMS=NUMS*K
NUMMR=NUMR*K
NUMMQ=NUMQ*K
NUMMP=NUMP*K
XSTRIP=2.*NUMMX
YSTRIP=2.*NUMMY
ZSTRIP=2.*NUMMZ
WSTRIP=2.*NUMMW
VSTRIP=2.*NUMMV
USTRIP=2.*NUMMU
SSTRIP=2.*NUMMS
RSTRIP=2.*NUMMR
QSTRIP=2.*NUMMQ
PSTRIP=2.*NUMMP
XH=(XB-XA)/XSTRIP
YH=(YB-YA)/YSTRIP
ZH=(ZB-ZA)/ZSTRIP
Applied research for numerical integration 23-02-2022
WH=(WB-WA)/WSTRIP
VH=(VB-VA)/VSTRIP
UH=(UB-UA)/USTRIP
SH=(SB-SA)/SSTRIP
RH=(RB-RA)/RSTRIP
QH=(QB-QA)/QSTRIP
PH=(PB-PA)/PSTRIP
SUM=0.0
X(1)=XA
X(2)=X(1)+XH
X(3)=X(2)+XH
DO 100 I1=1,NUMMX
Y(1)=YA
Y(2)=Y(1)+YH
Y(3)=Y(2)+YH
DO 90 I2=1,NUMMY
Z(1)=ZA
Z(2)=Z(1)+ZH
Z(3)=Z(2)+ZH
DO 80 I3=1,NUMMZ
W(1)=WA
W(2)=W(1)+WH
W(3)=W(2)+WH
DO 70 I4=1,NUMMW
V(1)=VA
Applied research for numerical integration 23-02-2022
V(2)=V(1)+VH
V(3)=V(2)+VH
DO 60 I5=1,NUMMV
U(1)=UA
U(2)=U(1)+UH
U(3)=U(2)+UH
DO 50 I6=1,NUMMU
S(1)=SA
S(2)=S(1)+SH
S(3)=S(2)+SH
DO 40 I7=1,NUMMS
R(1)=RA
R(2)=R(1)+RH
R(3)=R(2)+RH
DO 30 I8=1,NUMMR
Q(1)=QA
Q(2)=Q(1)+QH
Q(3)=Q(2)+QH
DO 27 I9=1,NUMMQ
P(1)=PA
P(2)=P(1)+PH
P(3)=P(2)+PH
DO 25 I10=1,NUMMP
KOUNT=0
DO 112 J2=1,3
DO 113 J3=1,3
DO 114 J4=1,3
DO 115 J5=1,3
DO 116 J6=1,3
DO 117 J7=1,3
DO 118 J8=1,3
DO 119 J9=1,3
DO 120 J10=1,3
KOUNT=KOUNT+1
FN=F(X(J1),Y(J2),Z(J3),W(J4),V(J5),U(J6),S(J7),R(J8),
1 Q(J9),P(J10))
FZ(KOUNT)=FN
SUM=SUM+(XH*YH*ZH*WH*VH*UH*SH*RH*QH*PH/59049)*
1 FZ(KOUNT)*CO(KOUNT)
120 CONTINUE
119 CONTINUE
118 CONTINUE
117 CONTINUE
116 CONTINUE
115 CONTINUE
114 CONTINUE
113 CONTINUE
112 CONTINUE
111 CONTINUE
C DO 301 KOUNT=1,59049
C
Applied research for numerical integration 23-02-2022
P(1)=P(3)
P(2)=P(1)+PH
25 P(3)=P(2)+PH
Q(1)=Q(3)
Q(2)=Q(1)+QH
27 Q(3)=Q(2)+QH
R(1)=R(3)
R(2)=R(1)+RH
30 R(3)=R(2)+RH
S(1)=S(3)
S(2)=S(1)+SH
40 S(3)=S(2)+SH
U(1)=U(3)
U(2)=U(1)+UH
50 U(3)=U(2)+UH
V(1)=V(3)
V(2)=V(1)+VH
60 V(3)=V(2)+VH
W(1)=W(3)
W(2)=W(1)+WH
70 W(3)=W(2)+WH
Z(1)=Z(3)
Z(2)=Z(1)+ZH
Applied research for numerical integration 23-02-2022
80 Z(3)=Z(2)+ZH
Y(1)=Y(3)
Y(2)=Y(1)+YH
90 Y(3)=Y(2)+YH
X(1)=X(3)
X(2)=X(1)+XH
100 X(3)=X(2)+XH
PRINT 997,K,XH,YH,SUM
200 SUMM(K)=SUM
C GO TO 1
$ //25X,21HLIMITS OF INTEGRATION
$ 4X,4HYB = ,E14.7/
END
C Ex-1
FUNCTION F(X,Y,Z,W,V,U,S,R,Q,P)
F=(X+Y+Z+W+V+U+S+R+Q+P)**2
RETURN
END