//======================================================
// 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 x[],int x_ref)
 {
   //x[0] is x, x[1] is y
   if(x_ref==0) return x[0];
   else return 0;
 }
}


class dif5
{
  public static void main(String args[]) throws IOException
  {

  fm1 b3=new fm1();
  double x[];
  x=new double[1];
  x[0]=0;
  //RK5 differential equation to solve equation dy/dx=-2x-y
  //initial value is given as x=0 y=-1 at x=0.4 y will be determined
  System.out.println(Matrix.toString(Matrix.T(Numeric.RK4(b3,0.0,1.0,x,10))));
 }
}
