/* * Diffeq.java - numerical integration class * Copyright 1999-2003 David A. Joiner and the Shodor Edcuation * Foundation, Inc. */ import java.awt.*; import java.applet.Applet; class Diffeq { public static final int EULER=-100; public static final int IEULER=-101; public static final int RKUTTA4=-102; int neq=0; double [] x; double time; double [] der; double [] x_old; double [] der_old; double [] k1; double [] k2; double [] k3; double [] k4; double [] x1store; double [] x2store; double tstore; public void init(int j){ neq=j; x=new double[neq]; der=new double[neq]; x_old=new double[neq]; der_old=new double[neq]; k1=new double[neq]; k2=new double[neq]; k3=new double[neq]; k4=new double[neq]; x1store=new double[neq]; x2store=new double[neq]; for (int i=0;itolerance) {icon=1;} } if(hstep