# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : DEFORK.FOR

C

C SUBROUTINE TO SOLVE FIRST-ORDER ORDINARY DIFFERENTIAL

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

C

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

DY(1) = YPRIME(X(1),Y(1),IFLAG)

DO 10 I = 1,ITER-1

TK1 = H*YPRIME(X(I),Y(I),IFLAG)

XN = X(I) + H*.5

YN = Y(I) + TK1*.5

TK2 = H*YPRIME(XN,YN,IFLAG)

YN = Y(I) + TK2*.5

TK3 = H*YPRIME(XN,YN,IFLAG)

XN = X(I) + H

YN = Y(I) + TK3

TK4 = H*YPRIME(XN,YN,IFLAG)

Y(I+1) = Y(I) + (TK1+2.*TK2+2.*TK3+TK4)/6.0

XN = X(I+1)

YN = Y(I+1)

DY(I+1) = YPRIME(XN,YN,IFLAG)

10 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/