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:
A = { 1, 2, 3, 4, ... , n }
B = { 0.23, 0.43, 0.24, 0.19, ... , n }
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).
For some reason, I am having trouble with the derivative part.
Currently using:
DividedDifferenceInterpolator devider = new DividedDifferenceInterpolator();
PolynomialFunctionNewtonForm polynom = devider.interpolate(xArray,
yArray);
Now i have polynom, which is the function representing my previous arrays. How should I calculate its derivative..?
Thanks.