Added Dan's deriver function
cast the length to an int
plot the first derivative h^2