# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : DESORK.FOR

C

C SUBROUTINE TO SOLVE SECOND-ORDER ORDINARY DIFFERENTIAL

C EQUATIONS Y'' = F(X,Y,Y') BY RUNGE-KUTTA METHOD.

C

DIMENSION X(1), Y(1), DY(1)

DO 1 I = 1,ITER-1

TKO = H*DY(I)

TMO = H*YDOPRI(X(I),Y(I),DY(I),IFLAG)

XN = X(I) + H/2.

YN = Y(I) + TKO/2.

DYN = DY(I) + TMO/2.

TK1 = H*(DY(I)+TMO/2.)

TM1 = H*YDOPRI(XN,YN,DYN,IFLAG)

YN = Y(I) + TK1/2.

DYN = DY(I) + TM1/2.

TK2 = H * (DY(I) + TM1/2.)

TM2 = H*YDOPRI(XN,YN,DYN,IFLAG)

XN = X(I) + H

YN = Y(I) + TK2

DYN = DY(I) + TM2

TK3 = H*(DY(I) + TM2)

TM3 = H*YDOPRI(XN,YN,DYN,IFLAG)

Y(I+1) = Y(I) + (TKO+2.*TK1+2.*TK2+TK3)/6.

DY(I+1) = DY(I) + (TMO+2.*TM1+2.*TM2+TM3)/6.

1 CONTINUE

RETURN

END

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/