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


class fm4 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 -0.27*.245*x[1]-0.27*x[1]*x[1];
   //if(x_ref==1) return 10-10.0*x[1]-11*x[2];
   else return 0;
 }
}

class diferansiyel3A
{

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

  fm4 b1=new fm4();
  //fm2 b2=new fm2();
  double y[];
  y=new double[1];
  y[0]=0.00816;
  //y[1]=0;
  double a[][]=diferansiyel3.RK6(b1,0.0,40.0,y,2000);
  Text.print(Text.T(a));
  Plot pp=new Plot(a);
  //pp.addFunction(b2,0.0,0.2,20);
  //pp.addSpline(2,100);
  //pp.setPlotType(2,33);
  pp.plot();
 }
}
