First and second derivative

From: Paraduan Hutauruk <p.hutauruk_at_physics.gla.ac.uk>
Date: Thu, 15 Jan 2009 17:32:42 +0000


Dear all,

Does anyone know the command for first and second derivative of a function? I tried to wrote code for first derivative using ROOT::Math::Derivator(), but i got some error message. Could anyone let me know where is the mistake please? or guide me to right way?.

#include "Math/SpecFunc.h"
#include "TTree.h"
#include "TFile.h"
#include "TNtupleD.h"

#include"Math/Derivator.h"

const int LMAX=4;
double par[] ={1,1,1,1};
double x=1;
double cros_mul(double *par , double x ) {
  double func=0;
  for (int L=0; L<=LMAX ; L++)
    {

      int L2 =L+1;
      func += 

par[L]*ROOT::Math::Derivator::ROOT::Math::assoc_legendre(L2,0,x) ;

    }
  return func;
}

Many thanks for help
Regards,
Parada Received on Thu Jan 15 2009 - 18:32:47 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 15 2009 - 23:50:01 CET