Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tangent line and rate of change

A tangent line touches a curve exactly once.

Graph of tangent line as slope of curve

How can we estimate the slope of the line at x0x_0? First, evaluate f(x0)f(x_0). Then, evaluate f(x1)f(x_1) at another point nearby. The slope is:

f(x1)f(x0)x1x0\frac{f(x_1)-f(x_0)}{x_1-x_0}

If we make x1x_1 very close to x0x_0, we will get the slope of the tangent line. This suggests uses of a limit! We call the slope of the tangent to f at xx the derivative of f.

The derivative represents how fast the function is changing (rate of change). This is especially useful in physics when the function represents a coordinate, and the independent variable is time.

Example: Ball moving with constant velocity

A ball has position coordinate x and is moving with constant velocity v, so

x(t)=x0+vtx(t) = x_0 + vt

where x0x_0 is the initial position that it starts from.

Ball with constant velocity example

Show that the first derivative of the position x is the velocity v.


x(t)=limh0x(t+h)x(t)h=limh0[x0+v(t+h)][x0+vt]h=limh0vhh=v\begin{align} x'(t) &= \lim_{h\to 0} \frac{x(t+h)-x(t)}{h} \\ &= \lim_{h\to 0} \frac{[x_0+v(t+h)]-[x_0+vt]}{h} \\ &=\lim_{h\to 0} \frac{vh}{h} \\ &= v \end{align}

Formal definition

The derivative is also a function!

Function and derivative

For example, if f(x)=x2f(x) = x^2,

f(x)=limh0(x+h)2x2h=limh0x2+2xh+h2x2h=limh02xh+h2h=limh0(2x+h)=2x\begin{align} f'(x) &= \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{x^2 + 2xh + h^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{2xh + h^2}{h} \\ &= \lim_{h \to 0} (2x + h) \\ &= 2x \end{align}

This function represents how the slope of the line tangent to f is changing with x. For this function, the slope continually increases! Some additional examples:

f(x)=(x1)2+1f(x) = (x - 1)^2 + 1

f(x)=limh0[(x+h1)2+1][(x1)2+1]h=limh0(x1)2+2(x1)h+h2+1(x1)21h=limh02(x1)h+h2h=limh02(x1)+h=2(x1)\begin{align} f'(x) &= \lim_{h \to 0} \frac{[(x + h - 1)^2 + 1] - [(x - 1)^2 + 1]}{h} \\ &= \lim_{h \to 0} \frac{(x - 1)^2 + 2(x - 1)h + h^2 + 1 - (x - 1)^2 - 1}{h} \\ &= \lim_{h \to 0} \frac{2(x - 1)h + h^2}{h} \\ &= \lim_{h \to 0} 2(x - 1) + h \\ &= 2(x - 1) \end{align}

f(x)=1/xf(x) = 1/x

f(x)=limh01x+h1xh=limh0x(x+h)x(x+h)h=limh0hx(x+h)h=limh01(x+h)x=1x2\begin{align} f'(x) &= \lim_{h \to 0} \frac{\dfrac{1}{x+h} - \dfrac{1}{x}}{h} \\ &= \lim_{h \to 0} \frac{\dfrac{x - (x + h)}{x(x+h)}}{h} \\ &= \lim_{h \to 0} \frac{\dfrac{- h}{x(x+h)}}{h} \\ &= \lim_{h \to 0} \frac{-1}{(x+h)x} \\ &= \frac{-1}{x^2} \end{align}

Differentiability

To be differentiable, this limit must exist. A function would not be differentiable at a jump, cusp, coner, or vertical tangent

Function and derivative

Higher-order derivatives

We can try to take the derivative of any function, including the derivative itself! For example, consider f(x)=x2f(x) = x^2, which has f(x)=2xf'(x) = 2x. We can evaluate the derivative of ff', which we will denote ff'' using the same formal definition:

f(x)=limh0f(x+h)f(x)h=limh02(x+h)2xh=limh02h2=2\begin{align} f''(x) &= \lim_{h \to 0}{\frac{f'(x+h)-f'(x)}{h}} \\ &= \lim_{h \to 0}{\frac{2(x+h)-2x}{h}} \\ &= \lim_{h \to 0}{\frac{2h}{2}} \\ &= 2 \end{align}

We call ff'' the second derivative of f. Repeating the process we can obtain even higher-order derivatives. These may be denoted by additional primes (e.g., ff'''), but often by a superscript (e.g., f(3)f^{(3)}) since it gets clunky to count too many primes.

Higher-order derivatives tell us about how lower-order derivatives are changing. For example, the second derivative tells us how the first derivative changes.

In a physical setting, we may have names for these different derivatives. For example, if we have the position x, the velocity v is the first derivative of x, while the acceleration a is the first derivative of v and second derivative of x.

PositionVelocityAcceleration
xx’x’’
vv’
a

Example: Ballistic motion

Consider the two-dimensional ballistic motion:

Ballistic motion

The equations of motion for the horizontal position x and vertical position y are:

x(t)=u0ty(t)=v0t12gt2\begin{align} x(t) &= u_0 t & \\ y(t) &= v_0 t - \frac{1}{2} g t^2 \end{align}

where u0u_0 and v0v_0 are the initial x and y components of the velocity, and g is the acceleration due to gravity. Find the velocity and acceleration in x and y.


In the x direction, call the velocity u. Then,

u=x=u0u = x' = u_0

Since u is a constant, the first derivative of u (second derivative of x) must be zero, and there is no acceleration in the x direction.

In the y direction, call the velocity v. Then,

v=y=v0gta=v=y=g\begin{align} v &= y' = v_0 - gt \\ a &= v' = y'' = -g \end{align}

The velocity in y is constantly increasing from the constant acceleration a due to gravity. This makes sense from what we know from physics!