title: Interpolation and derivative on Java
body: <p>I am trying to make a project witch involves calculating an interpolation from raw data and its derivative.
  I have two arrays looking like this:</p>
  
  <pre><code>A = { 1, 2, 3, 4, ... , n }
  B = { 0.23, 0.43, 0.24, 0.19, ... , n }
  </code></pre>
  
  <p>I want a function to describe the following arrays, so I am using apache-common-math library in order to interpolate the polynom that will describe a function where: F(A[i]) = B[i].
  Afterwards, I wish to calculate the derivative of this function in order to be able to find extremum(max/min).</p>
  
  <p>For some reason, I am having trouble with the derivative part.</p>
  
  <p>Currently using:</p>
  
  <pre><code>        DividedDifferenceInterpolator devider = new DividedDifferenceInterpolator();
          PolynomialFunctionNewtonForm polynom = devider.interpolate(xArray,  
          yArray);
  </code></pre>
  
  <p>Now i have polynom, which is the function representing my previous arrays.
  How should I calculate its derivative..?</p>
  
  <p>Thanks.</p>