Given a list of N integers, how to find out if the second derivative is positive or negative? Let's say I have a list where N=10, such as [45,34,56,22,33,44,34,34,43,35].
I would like to know if the second derivative is positive or negative, in other words, if the rate of change of these numbers is itself increasing or decreasing.
I took calculus in college 20 years ago. I would know how to do that if I had a function but I don't remember how that can be accomplished with just samples.
Can someone explain me the rationale behind the process?
 A: I will probably plot the points on an x-y axis, find a polynomial (or exponential regression) and take the second derivative of the function that approximate the data. Alternative:you could use numerical differentiation, but you will need to take more points.
you need to evaluate:
$$ f'(x) \approx \dfrac{f(x+h)-f(x)}{h} $$
for $h$ very small (if you are doing engineering or physics calculations $ h \approx 10^-3$ 
or much smaller.
A: I'll give an example of generating a polynomial to fit 3 points and you can generalize.
Say our points were $f(0) = 1, f(1) = 4, f(2) = 6$. 
Then we could say we have a polynomial $f(x) = a_0 + a_1x + a_2x^2$ and solve by subbing in values of $x$. In this case we would have, $f(0) = a_0 = 1$ and $f(1) = a_0 + a_1 + a_2 = 4$ and $f(2) = a_0 + 2a_1 + 4a_2 = 6$. You could solve these directly or use a matrix as so
$$\begin{equation} \begin{aligned}\pmatrix{1 & 0 & 0 & 1 \\ 1 & 1 & 1 & 4 \\ 1 & 2 & 4 & 6} = & \pmatrix{1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 3 \\ 0 & 2 & 4 & 5} \\ = & \pmatrix{1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 3 \\ 0 & 0 & 2 & -1} \\ = & \pmatrix{1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 3 \\ 0 & 0 & 1 & -\frac{1}{2}} \\ = & \pmatrix{1 & 0 & 0 & 1 \\ 0 & 1 & 0 & \frac{7}{2} \\ 0 & 0 & 1 & -\frac{1}{2}}\end{aligned} \end{equation}.$$
Thus our equation would be $f(x) = 1 + \frac{7}{2}x - \frac{1}{2}x^2$. This method can generalize to any set of data points. Also, notice that this function is differentiable.
EDIT
Here is wolframalpha's generation of your polynomial.
