lit
    JINRLIB

BULSTD -

D207

: G.Janin :

ppc cca pa pa
dyi/dx = fi(x,y1,y2 ,...,yn ), i=1,2,...,n o x1 o x2 x.

:

: - SUBROUTINE
: - BULSTD
: - EXTERN - /

:

CALL BULSTD(N,X1,X2,Y,H,ERROR,EXTERN), :

N - (INTEGER) co pa n;
X1 - (REAL*8) aao a x1 aco po x;
X2 - (REAL*8) a x2 aco po x;
Y - (REAL*8) oop acc papoc N:
a o Y(I) (I=1,2,...,N) yi(x1),
a o - yi(x2);
H - (REAL*8) oopo aao a aa .
a H popa BULSTD, ;
ERROR - (REAL*8) aaaa a o a a ppoa. a ppoa pac p popa BULSTD a, o acoa a o a ao a paa ERROR;
EXTERN - ooa, ocao EXTERNAL a popa.
EXTERN oa :
SUBROUTINE EXTERN(X,Y,F), :
  X - aca pa,
  Y,F - oop acc, Y(*), F(*).
c a pa ac p pa:
F(I) = fI(X,Y(1),...,Y(N)), I=1,2,...,N.

:

coc oa oa opa coo p pa pa. y'=f(x,y(x)) cpoc o x+h c cooa op ooco oo opa ppoa ( o ca coc popaoao pao cp o) c a ocoaoc pao ppoa { h(k) } . o a y(k)(x+h) popc a pa
{ h(k) }, cpc 0, po p oopo cpaop paoao oo c. oa o pocc coc pa aao ooc, apac o ppoa.

:

  1. N<=20, a a BULSTD .
  2. apap X1,X2 Y opaop CALL o a p,
    a ocaa apc pa.

:

  1. R.Bulirsch and J.Stoer, Numrical tratmnt of ordinar diffrntial equations b etrapolation mthods.
    Numer.Math.8(1966)1-13.
:
        IMPLICIT REAL*8 (A-H,O-Z)
        DIMENSION Y(3)
        EXTERNAL EXTERN
        DATA Y/3*0.D0/
        X=0.D0
        X2=2.D0
        H=0.1D0
        ERROR=1.D-05
        WRITE(*, 10)
        CALL BULSTD(3,X,X2,Y,H,ERROR,EXTERN)
        WRITE(*, 2) X,Y
        Y(1)=X**3*DSIN(X)
        Y(2)=X**2*(3*DSIN(X)+X*DCOS(X))
        Y(3)=X**2*(6*DCOS(X)-X*DSIN(X))+6*X*DSIN(X)
        WRITE(*, 3)
        WRITE(*, 2) X,Y
    2   FORMAT(' ',D14.3,3G20.10,/)
    3   FORMAT(25X,' ANALYTIC SOLUTION',//)
    10  FORMAT(8X,' X',14X,'Y(1)',15X,' Y(2)',15X,' Y(3)')
        END

        SUBROUTINE EXTERN (X,Y,F)
        IMPLICIT REAL*8 (A-H,O-Z)
        DIMENSION Y(3),F(3)
        F(1)=X**2*(3*DSIN(X)+X*DCOS(X))
        F(2)=X**2*(6*DCOS(X)-X*DSIN(X))+6*X*DSIN(X)
        F(3)=-X**2*(X*DCOS(X)+9*DSIN(X))+18*X*DCOS(X)+6*DSIN(X)
        RETURN
        END
:
         X              Y(1)                Y(2)                Y(3)
       .200D+01     7.274379415         7.582394430        -6.350334370
                          ANALYTIC SOLUTION
       .200D+01     7.274379415         7.582394430        -6.350334370



home up e-mail