# First principle of calculus

A *secant line* is a straight line that connects two points on a curve. A *tangent line* is a straight line that “just touches” the curve at a single point.

The slope of the secant line gives us the *average* rate of change of the function on the interval between the two points. The slope of the tangent line gives us the *instantaneous* rate of change.

Finding the slope of the secant line is easy:

$\displaystyle m_{\text{sec}} = \frac{\Delta{} y}{\Delta{} x} = \frac{y_{2} - y_{1}}{x_{2} - x_{1}} = \frac{3 - 4}{4 - 2} = - \frac{1}{2}$.

We can generalize this to give us the average rate on the interval [$\displaystyle x_{1}$, $\displaystyle x_{2}$] for any function $\displaystyle f$ with

$\displaystyle m_{\text{sec}} = \frac{f{\left ( x_{2} \right )} - f{\left ( x_{1} \right )}}{x_{2} - x_{1}}$,

but what about the tangent line? We could draw it with a ruler and pick two points that is passes through, but this method is tedious and inaccurate. No, instead we can use our newly-acquired limit skills.

The key thing to realize here is that the secant line and the tangent line are related. A tangent line is just a secant line whose interval happens to be very, very small—*infinitesimal*, to be exact (this means indefinitely small). In other words, the slope of the tangent line at $\displaystyle x = a$ is equal to
the slope of the secant line on the interval [$\displaystyle a$,
$\displaystyle a + h$] as
$\displaystyle h$ approaches zero:

$\displaystyle m_{\text{tan}} = \lim_{h \to 0} \frac{f{\left ( a + h \right )} - f{\left ( a \right )}}{h}$.

This is the first principle of calculus. As with most other things, graphing will help us understand it:

As we move the second point closer to the first point, thereby making $\displaystyle h$ approach zero, the slope of the secant line will converge on the slope of the tangent line at $\displaystyle a$.

Suppose we want to find the slope of the tangent line at 3 on $\displaystyle f{\left ( x \right )} = x^{2}$. We simply plug it into our first principle of calculus, giving us

$\displaystyle m_{\text{tan}} = \lim_{h \to 0} \frac{f{\left ( 3 + h \right )} - f{\left ( 3 \right )}}{h} = \lim_{h \to 0} \frac{\left ( 3 + h \right )^{2} - 3^{2}}{h}$,

which simplifies to

$\displaystyle \lim_{h \to 0} \frac{9 + 6 h + h^{2} - 9}{h} = \lim_{h \to 0} \frac{6 h + h^{2}}{h} = \lim_{h \to 0} 6 + h = 6 + 0 = 6$,

therefore the instantaneous rate of change at $\displaystyle x = 3$ is 6.