Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Meaning of the Derivative

Views: 173
Kernel: SageMath (stable)

Suppose that the height ss of a ball at time tt (in seconds) is described by s(t)=64−16(t−1)2s(t)=64-16(t-1)^2

import numpy as np %matplotlib inline import matplotlib.pyplot as plt t = np.arange(-3,10,0.1) s = 64-16*(t-1)**2 plt.xlabel("time") plt.ylabel("height") plt.title(r"Height as a function of time from $t=-3$ to $t=10$") plt.plot(t,s) plt.show()
Image in a Jupyter notebook

What is the average velocity of the ball between t=0t=0 and t=5t=5?

We can answer this question using the formula

rate=distancetimerate = \frac{distance}{time}

This formula actually gives the average rate over a time interval.

T = np.array([0,5]) S = 64-16*(T-1)**2 plt.scatter(T,S) plt.plot([T[0],T[0],T[1],T[0]],[S[0],S[1],S[1],S[0]]) t = np.arange(-3,10,0.1) s = 64-16*(t-1)**2 plt.xlabel("time") plt.ylabel("height") plt.title(r"Height as a function of time from $t=-3$ to $t=10$") plt.plot(t,s) plt.show()
Image in a Jupyter notebook

The average velocity between t=0t=0 and t=5t=5 is the slope of the hypotenuse of the blue triange.

We call this the secant line.

The slope of the secant line between (t1,s1)(t_1,s_1) and (t2,s2)(t_2,s_2) is given by the formula

s2−s1t2−t1\frac{s_2-s_1}{t_2-t_1}

In the case of this particular problem we can compute this value like so:

t1,s1 = 0,64-16*(0-1)**2 t2,s2 = 5,64-16*(5-1)**2 (s2-s1)/(t2-t1)
-48

This means that over this time interval the average velocity of the ball was 4848 ft per second downward.

import matplotlib.lines as mlines def newline(p1, p2,lab="",axis=plt): ax = axis.gca() xmin, xmax = ax.get_xbound() if(p2[0] == p1[0]): xmin = xmax = p1[0] ymin, ymax = ax.get_ybound() else: ymax = p1[1]+(p2[1]-p1[1])/(p2[0]-p1[0])*(xmax-p1[0]) ymin = p1[1]+(p2[1]-p1[1])/(p2[0]-p1[0])*(xmin-p1[0]) l = mlines.Line2D([xmin,xmax], [ymin,ymax],label=lab,color='purple') ax.add_line(l) return l t = np.arange(-3,10,0.1) s = 64-16*(t-1)**2 plt.xlabel("time") plt.ylabel("height") plt.title(r"Height as a function of time from $t=-3$ to $t=10$") plt.plot(t,s) newline([T[0],S[0]],[T[1],S[1]],"secant line") tangent = 32*t+48 plt.plot(t,tangent,label="tangent line") plt.legend() plt.show()
Image in a Jupyter notebook

It's interesting to compare the secant line to the tangent line.

Let's look at the secant that comes from computing the average velocity over the time period t=0t=0 to t=3t=3

import matplotlib.lines as mlines t = np.arange(-3,10,0.1) s = 64-16*(t-1)**2 plt.xlabel("time") plt.ylabel("height") plt.title(r"Height as a function of time from $t=-3$ to $t=10$") plt.plot(t,s) T=np.array([0,.1]) S= 64-16*(T-1)**2 newline([T[0],S[0]],[T[1],S[1]],"secant line") tangent = 32*t+48 plt.plot(t,tangent,label="tangent line") plt.legend() plt.show()
Image in a Jupyter notebook

It seems that on this shorter interval, the secant line is more like the tangent line.

Remember that the meaning of the slope of the secant line is average velocity.

What's the average velocity given by the new secant line?

You can see from the calculation below that it's -16 ft/s.

t1,s1 = 0,64-16*(0-1)**2 t2,s2 = 3,64-16*(3-1)**2 (s2-s1)/(t2-t1)
-16.0
plt.plot(t,s)
[<matplotlib.lines.Line2D object at 0x7fd965943790>]
Image in a Jupyter notebook

We can look at the average velocity on small intervals near each point.

np.diff([1,2,3,4])
array([1, 1, 1])
dt = np.diff(t) ds = np.diff(s)
dt
array([ 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
ds
array([ 12.64, 12.32, 12. , 11.68, 11.36, 11.04, 10.72, 10.4 , 10.08, 9.76, 9.44, 9.12, 8.8 , 8.48, 8.16, 7.84, 7.52, 7.2 , 6.88, 6.56, 6.24, 5.92, 5.6 , 5.28, 4.96, 4.64, 4.32, 4. , 3.68, 3.36, 3.04, 2.72, 2.4 , 2.08, 1.76, 1.44, 1.12, 0.8 , 0.48, 0.16, -0.16, -0.48, -0.8 , -1.12, -1.44, -1.76, -2.08, -2.4 , -2.72, -3.04, -3.36, -3.68, -4. , -4.32, -4.64, -4.96, -5.28, -5.6 , -5.92, -6.24, -6.56, -6.88, -7.2 , -7.52, -7.84, -8.16, -8.48, -8.8 , -9.12, -9.44, -9.76, -10.08, -10.4 , -10.72, -11.04, -11.36, -11.68, -12. , -12.32, -12.64, -12.96, -13.28, -13.6 , -13.92, -14.24, -14.56, -14.88, -15.2 , -15.52, -15.84, -16.16, -16.48, -16.8 , -17.12, -17.44, -17.76, -18.08, -18.4 , -18.72, -19.04, -19.36, -19.68, -20. , -20.32, -20.64, -20.96, -21.28, -21.6 , -21.92, -22.24, -22.56, -22.88, -23.2 , -23.52, -23.84, -24.16, -24.48, -24.8 , -25.12, -25.44, -25.76, -26.08, -26.4 , -26.72, -27.04, -27.36, -27.68, -28. , -28.32])
ds/dt
array([ 126.4, 123.2, 120. , 116.8, 113.6, 110.4, 107.2, 104. , 100.8, 97.6, 94.4, 91.2, 88. , 84.8, 81.6, 78.4, 75.2, 72. , 68.8, 65.6, 62.4, 59.2, 56. , 52.8, 49.6, 46.4, 43.2, 40. , 36.8, 33.6, 30.4, 27.2, 24. , 20.8, 17.6, 14.4, 11.2, 8. , 4.8, 1.6, -1.6, -4.8, -8. , -11.2, -14.4, -17.6, -20.8, -24. , -27.2, -30.4, -33.6, -36.8, -40. , -43.2, -46.4, -49.6, -52.8, -56. , -59.2, -62.4, -65.6, -68.8, -72. , -75.2, -78.4, -81.6, -84.8, -88. , -91.2, -94.4, -97.6, -100.8, -104. , -107.2, -110.4, -113.6, -116.8, -120. , -123.2, -126.4, -129.6, -132.8, -136. , -139.2, -142.4, -145.6, -148.8, -152. , -155.2, -158.4, -161.6, -164.8, -168. , -171.2, -174.4, -177.6, -180.8, -184. , -187.2, -190.4, -193.6, -196.8, -200. , -203.2, -206.4, -209.6, -212.8, -216. , -219.2, -222.4, -225.6, -228.8, -232. , -235.2, -238.4, -241.6, -244.8, -248. , -251.2, -254.4, -257.6, -260.8, -264. , -267.2, -270.4, -273.6, -276.8, -280. , -283.2])
plt.plot(t[1:],ds/dt) plt.title("The average velocity very near each point.") plt.xlabel("time") plt.ylabel("feet per second") plt.show()
Image in a Jupyter notebook

When the time intervals dtdt are extremely small, we can think of the above graph as giving the instantaneous velocity of the ball at each time.