lit
    JINRLIB

DFINT -

E104

: C.Letertre :

popaa co oop po c
f(1 ,2 ,...,n) o n p, oopa poapoaa a n-po pooo c.
a ap, cooc oopaa xi , o paooco.

:

: - REAL*8 FUNCTION
: - DFINT

:

Y=DFINT(NARG,X,NA,A,F), :

NARG - (INTEGER) co oopa n, p op f;
X - (REAL*8) op acc. X(j) (j=1,2,...,NARG) o copa oopa o, oopo c poc po;
NA - (INTEGER) op acc. j=1,2,...,NARG NA(j) o copa oco a po xj , oop ao acc A;
A - (REAL*8) op acc o NA(1),...,NA(NARG). p NA(1) o A o copa c a
a11, a12,... po po x1 cpoo opaca op;
c NA(2) o o copa a a21, a22,... opo po x2 cpoo opaca op. ..;
F - (REAL*8) op acc o po
NA(1),...,NA(NARG), cop a f a pooo c, opo A.
a o ao, a c F oppaoc acco c NARG ca papoc NA(1),NA(2),...,NA(NARG).
ao oopaao oppaoco acc
F(i,j,...,m) = f(a1i, a2j, ... , anm)
(i=1,2,...,NA(1),...; m=1,2,...,NA(NARG)).

a o DFINT pao po a f(X(1),X(2),...,X(NARG)).

c oopaa xi ao o X a pa , cooc a apo, o po o oopa ac cpao o a apa a, , coao, c op ooc.

:

coc oopa a po o p x1, x2,... p c, copa aa o X.
n=2, a coc (x1,x2) a (x,y), popa aa c:
c a1, a2,... - a a x;  b1, b2,... - a a y,
i j - c, oop ai<=x<ai+1, bj<=y<bj+1.
oa ac c:

t = (x - ai) / (ai+1 - ai),
gj = (1-t) * f(ai, bj) + t * f(ai+1, bj),
gj+1 = (1-t) * f(ai, bj+1) + t * f(ai+1, bj+1),
u = ( y - bj) / (bj+1 - bj),
fp. = (1-u) * gj + u * gj+1.

:

  1. 1<=NARG<=5.
    DFINT=0.D0, c NARG o oac.
  2. NA(j)>=1 (j=1,2,...,NARG).
  3. a ap ao po o pacoo
      c p o o   o p a c a   op.
    2 3 .

:

aa p g(x,y), oopa opa opopao - G. a a :
fkm = g(SQRT(k),LOG(m)) k=1,2,...,10; m=1,2,...,15,
po a g(1.7,2.9).

       . . .
       IMPLICIT REAL*8 (A-H,O-Z)
       DIMENSION X(2),NA(2),A(25),F(150)
       DATA NA/10,15/
    C STORE ARGUMENT ARRAY
       NA1=NA(1)
       NA2=NA(2)
       L=0
       DO 1 I1=1,NA1
       L=L+1
       A(L)=DSQRT(DFLOAT(I1))
    1  CONTINUE
       DO 2 I2=1,NA2
       L=L+1
       A(L)=DLOG(DFLOAT(I2))
    2  CONTINUE
    C STORE FUNCTION ARRAY
       K1=0
       K2=K1+NA1
       L=0
       DO 4 I2=1,NA2
       DO 3 I1=1,NA1
       L=L+1
       F(L)=G(A(I1+K1),A(I2+K2))
    3  CONTINUE
    4  CONTINUE
    C INTERPOLATE IN TABLE
       X(1)=1.7D0
       X(2)=2.9D0
       GINT=DFINT(2,X,NA,A,F)
       . . .
       REAL*8 FUNCTION G(A1,A2)
       IMPLICIT REAL*8 (A-H,O-Z)
       G=DSIN(A1)+DSIN(A2)
       RETURN
       END
:
       GINT=   1.235916811574820


home up e-mail