Computing the derivatives of function in Excel

calculusderivatives

Suppose displacement is a function of time as follow:
$$s = 3 t^2 + 4$$
Then velocity (first derivative) is
$$\frac{\delta s}{\delta t} = 6 t$$

And acceleration (second derivative) is
$$\frac{\delta^2 s}{\delta t^2} = 6$$

Now, I am trying to illustrate this in excel and this is when things become confusing to me.
For the first derivative – velocity, i took the first difference of displacement column ds,and divide this by the first difference of time column dt. Yet, none of the velocity I computed is equal to $6 t$. Why is that ?

For the second derivative – acceleration, I took the difference of ds column and divide this by differencing the dt column. Things become even more confusing here. Thought acceleration should be constant and equal to $6$ at all times. Yet my numbers are wild and off the chart. Why is this happening ? What did I misunderstand? How can i obtain a constant acceleration here ?

For the second derivative, should I be doing (1) or (2) below ?

(1) taking first difference of ds and divide this by taking first difference of dt

OR

(2) taking first difference of ds and divide this by squaring dt, which is (dt)^2 ?

enter image description here

Best Answer

As I said in comments, the derivative $\dfrac{ds}{dt}$ is the limit of the ratio $\dfrac{\Delta s}{\Delta t}$ as $\Delta t$ approaches $0$.

In the spreadsheet below, I did the calculations with relatively small values of $\Delta t$,

and $ds/dt$ is close to $6t$.

Also, for $\dfrac {d^2s}{dt^2}$, you want the limit of $\dfrac{v(t+\Delta t)-v(t)}{\Delta t}$, which is different from what you did,

and you can see it is $6$ as expected.

enter image description here

Related Question