//======================================================
// Numerical Analysis package in java
// example to show differential equation solution
// and differentiation (derivative) functions
// Dr. Turhan Coban
// =====================================================
import java.io.*;



class fm1 extends f_xi
{
//multivariable function
 double func(double Y[],int x_ref)
 {
   int N=2;	 
   if(x_ref==0) return (Y[1]*Y[1]-1.0)/(N-1)-Y[0]*Y[0]*Y[2];
   if(x_ref==1) return Y[0];
   if(x_ref==1) return Y[1];
   else return 0;
 }
}


class dif6
{
  public static void main(String args[]) throws IOException
  {
  fm1 b3=new fm1();
  double Y[];
  Y=new double[3];
  Y[0]=1.232588;
  Y[1]=0.0;
  Y[2]=0.0;
  System.out.println(Matrix.toString(Matrix.T(Numeric.RK6(b3,0.0,4.0,Y,40))));
 }
}
