Tangent Lines
In your experience with mathematics thus far, you have most likely come across the task of calculating the slope between two points. Whether you know it as "rise over run" or "change in y over change in x", the formula
will give you the slope between points and . So if, for instance, we were to calculate the slope between two points on , say and , we would find that by the formula, gives us a slope of , as pictured on the following graph. For a purpose that will later be revealed, however, what if we were to find the slope of the function at a single point -- at ? Such is the nature of the tangent line problem that we are about to explore, and is one of the basic questions of calculus.
Rather than simply generating a static graph this time, we'll be doing a bit of manipulation. It is highly recommended that you follow along. In a new worksheet called 06-Tangent Lines, copy/paste the following code and evaluate it.
In the graph, the straight line that passes through the two points is called a secant line -- we can say that it is an approximation of the function's slope at the point , albeit not a very good one. What we want is a line tangent to the function at -- one that has a slope equal to that of the function at .
To attain a better approximation of the slope at that point, let's try decreasing the distance between the two points at either side of it. In the first cell of your worksheet, change to and to and evaluate. Your graph should now look something like the following:
As you can see, the secant line in this graph still does not pass through the desired point of , but at least we are getting closer. Now, try setting as and as and again evaluate the cell. Aside from looking cramped, what else can you observe about this graph? Ah ha! you surely say, it looks like the slope at is just about equal to . We could, of course, repeat this process in perpetuum, since when only a billionth of a unit separates the two points, there is little doubt that the calculated slope does, in fact, approximately equal the slope of at .
Let us skip that theoretical headache, however, and consider a much faster (and even more accurate!) method. Look again at the formula for calculating slopes, this time in a slightly altered form:
Rather than ignoring the relationship between the two points, as in the first form, this formula relies upon it. The symbol is now , and is . The major difference here, though, is that has been replaced by the first plus some change "". The slope formula's premise still stands, however, as the new form does in fact calculate change in over change in .
So what can we do with this new formula, you ask? Well, what we would like to do is to make the change in (designated by ) equal to zero in order to find the function's slope at a single point. Exchanging for does not work well, however, since that would make the formula simply , which is not of much help (). Let us consult SageMath, though, and see if there is a way to factor out before setting it equal to zero. In a new cell, copy or type the following code.
The result should be . With still in the denominator, though, replacing it with zero would not be a good idea. Luckily, SageMath has a way for us to pull all variables from the denominator to the numerator, which is just what we need. In another cell, type and evaluate the following:
The result should be . Now that is in the numerator, replacing it with zero will give us a formula for the function's slope at any value of . To realize this result, add ".subs(h=0)" without the quotes to the end of rational_simplify() in the last entry and again evaluate the cell. And there you have it! By describing the change in as a number '', we were able to simplify the formula for slope and replace with zero in order to find that the slope of the function's tangent line at any x-coordinate is equal to . This resulting expression is known as the derivative of . You'll learn more about derivatives in the next section, but for now you should know that a function's derivative measures rate of change at a point.
To complete what we had originally set out to do, plug in a value of for , now, and you will see that the slope of the line tangent to the point on is . This confirms our earlier experimentation with numerical analysis in addition to being an exact solution. If we were to write an equation for this tangent line in slope-intercept form, it would be
.
It's very important to remember that the equation for a tangent line can always be written in slope-intercept or point-slope form; if you find that the equation for a tangent line is or some such extreme, something has gone (horribly) wrong. The slope of a tangent line will always be a constant.
You probably wouldn't be surprised to learn that this symbolic process involved a limit, specifically "the limit of as approaches zero." The slope that we found is also known as the derivative of at . Look at how the tangent line lies against the graph of :
Now that we have an exact methodology for computing the slope of a tangent line, consider the function
What is the equation for the line tangent to ? The slope of the tangent line can be found using the function's derivative:
Plug in for , then write an equation for the tangent line:
, so
Here is another comparison:
Practice Problems
Use the limit process to find the equation of the line tangent to the indicated point.
at
at
at