Kevin just started his first calculus class last week. His teacher has spent most of the first week of class talking about the basis of calculus, and what calculus is actually used for. Unfortunately, Kevin was still a little confused at the end of class on Friday, so he went to Mr. Banner and asked if he had any suggestions.
 Mr. Banner: "Kevin, do you remember finding the equation of a line by using two points in Algebra I?"
 Kevin: "Sure, that was easy. You just find the slope of the line by dividing the up/down difference in the points by the left/right difference. Then you use one of the points and the slope to find the yintercept, right?"
 Mr. Banner: "Was it harder if the points were closer together, or further apart?"
 Kevin: "No, not really, I guess. I mean, unless they were really far apart!"
 Mr. Banner: "Ok. Here is what I want you to do, Kevin. I'll even give you extra credit if you can complete it over the weekend. I want you to find the slope of three lines, just like you described. Are you ready to write down the points?"
 Kevin (grinning): "Easiest extra credit ever! Sure, go ahead."
 Mr. Banner: "The first pair of points is: (4, 7) and (5, 9), the second pair is (4, 6) and (4.5, 6.5). You got those?"
 Kevin: "Yeah, yeah, keep going, I got this!"
 Mr. Banner: "Ok, the last pair is (4, 5) and (4, 5)"
 Kevin (writing fast without looking): "Ok, got it! See you on Monday, be ready to give me that extra credit, Mr. Banner!"
Can you see what Mr. Banner did? What is Kevin going to find as he works those problems?
Watch This
Khan Academy: Equation of a Tangent Line
Guidance
Recall from algebra, if points P ( x _{ 0 } , y _{ 0 } ) and Q ( x _{ 1 } , y _{ 1 } ) are two different points on the curve y = f ( x ), then the slope of the secant line connecting the two points is given by
m_{sec}  @$= \frac {y_1y_0}{x_1x_0} = \frac {f(x_1)f(x_0)}{x_1x_0}@$  (1) 

Of course, if we let the point x _{ 1 } approach x _{ o } then Q will approach P along the graph f and thus the slope of the secant line will gradually approach the slope of the tangent line as x _{ 1 } approaches x _{ 0 } . Therefore, (1) becomes
@$m_{sec}@$  @$= \lim_{x_1 \to x_0} \frac {f(x_1)f(x_0)}{x_1x_0} @$  (2) 

To simplify our notation, if we let h = x _{ 1 } − x _{ 0 } , then x _{ 1 } = x _{ 0 } + h and x _{ 1 } → x _{ 0 } becomes equivalent to h → 0. This means that (2) becomes
@$m_{sec}@$  @$= \lim_{h \to 0} \frac {f(x_0+h)f(x_0)}{h} @$ 

The Slope of a Tangent Line
provided that the limit exist. 

Recall that the equation of the tangent line through point ( x _{ 0 } , y _{ 0 } ) with slope m is the pointslope form of a line: y − y _{ 0 } = m _{ tan } ( x − x _{ 0 } ).
Example A
Find line tangent to the curve f ( x ) = x ^{ 3 } that passes through point P (2,8).
Solution:
Since P ( x _{ 0 } , y _{ 0 } ) = (2, 8), using the slope of the tangent equation we have
@$m_{tan}@$  @$= \lim_{h \to 0} \frac {f(x_0+h)f(x_0)}{h} @$  

and we get  
@$m_{tan}@$  @$= \lim_{h \to 0} \frac {f(2+h)f(2)}{h} @$  
@$= \lim_{h \to 0} \frac {(h^3+6h^2+12h+8)8}{h} @$  
@$= \lim_{h \to 0} \frac {h^3+6h^2+12h}{h} @$  
@$= \lim_{h \to 0} (h^2+6h+12) @$  
@$= 12@$ 
Thus the slope of the tangent line is 12. Using the pointslope formula above, we find that the equation of the tangent line is y  8 = 12 ( x  2) or y = 12 x  16.
Example B
If f ( x ) = x ^{ 2 } − 3,find f' ( x ) and use the result to find the slope of the tangent line at x = 2 and x = −1.
Solution:
Since @$f'(x)= \lim_{h \to 0} \frac {f(x+h)f(x)}{h} @$ then
@$f'(x)@$  @$= \lim_{h \to 0} \frac {\left [ {(x+h)^23} \right ] \left [ {x^23} \right ]}{h} @$  

@$= \lim_{h \to 0}\frac {x^2+2xh+h^23x^2+3}{h}@$  
@$= \lim_{h \to 0} \frac {2xh+h^2}{h}@$  
@$= \lim_{h \to 0} (2x+h)@$  
@$= 2x@$ 
To find the slope, we simply substitute x = 2 into the result f' ( x ):
f '( x )  = 2 x  

f'(2)  =2(2)  
= 4  
and  
f'(x)  =2x  
f'(1)  =2(1)  
= 2 
Thus slope of the tangent line at x = 2 and x = −1 are 4 and −2 respectively.
Example C
Find the slope of the tangent line to the curve y = 1/ x that passes through the point (1, 1).
Solution:
Using the slope of the tangent formula,
@$f'(x)@$  @$= \lim_{h \to 0} \frac {f(x+h)f(x)}{h}@$  

and substituting @$y=\frac{1}{x}@$  
@$f'(x)@$  @$= \lim_{h \to 0} \frac {\left ( \frac{1}{x+h} \right )\frac {1}{x}}{h}@$  
@$= \lim_{h \to 0} \frac {\frac {xxh}{x \left ({x+h} \right)}}{h}@$  
@$= \lim_{h \to 0} \frac {xxh}{hx \left ({x+h} \right)}@$  
@$= \lim_{h \to 0} \frac {h}{hx \left ({x+h} \right)}@$  
@$= \lim_{h \to 0} \frac {1}{x \left ({x+h} \right)}@$  
@$= \frac {1}{x^2}@$  
For x = 1, the slope is  
@$f'(x)@$  @$= \frac {1}{1} = 1@$  
@$= 1@$ 
Thus the slope of the tangent line at x = 1 for the curve y = 1/ x is m = −1. To find the equation of the tangent line, we simply use the pointslope formula,
y  y _{ 0 }  = m ( x  x _{ 0 } )  

Where ( x _{ 0 } , y _{ 0 } ) = (1, 1).  
y  1  = 1( x  1)  
y  =  x + 1 + 1  
y  =  x + 2 
So the equation of the tangent line is y =  x + 2.
Concept question wrapup: Mr. Banner gave Kevin three sets of points, each defining a segment of a line, and each line shorter than the last. The first two were probably no sweat for Kevin to find equations for, since he seems to clearly remember the process of finding @$\frac{rise}{run}@$ from Algebra I. The third set of points, however, is completely different. Points (4, 5) and (4, 5) are the same, so the @$\frac{rise}{run}@$ would be @$\frac{0}{0}@$  Kevin was just introduced to the need for differential calculus! 

>
Guided Practice
1) Given the function @$y = \frac{1}{2} x^2@$ and the values of @$x_0 = 3@$ and @$x_1 = 4@$ , find:
 a) The average rate of change of y with respect to x over the interval [ x _{ 0 } , x _{ 1 } ].
 b) The slope of the secant line connecting x _{ 0 } and x _{ 1 }
 c) The instantaneous rate of change of y with respect to x at x _{ 0 } .
 d) The slope of the tangent line at x _{ 1 } .
2) Given the function @$f(x) = \frac{1}{x}@$ and the values @$x_{0} = 2@$ and @$x_1 = 3@$ , find:
 (a) The average rate of change of y with respect to x over the interval [ x _{ 0 } , x _{ 1 } ].
 b) The slope of the secant line connecting x _{ 0 } and x _{ 1 } .
 c) The instantaneous rate of change of y with respect to x at x _{ 0 } .
 d) The slope of the tangent line at x _{ 1 } .
Answers
1) Given @$y = \frac{1}{2} x^2@$ where @$x_0 = 3@$ and @$x_1 = 4@$

a) To find the
average
rate of change:
 Identify the two points by substituting 3 and 4 in for x in the function @$f(x) = \frac{1}{2}x^2@$
 Substitute the two points (3, 4.5) and (4, 8) into the average rate of change formula: @$m = \frac{y_1  y_0}{x_1  x_0}@$
 Average rate of change = @$\frac{7} {2}@$
 b) The slope of the secant line between @$x_0@$ and @$x_1@$ is the slope between @$(3, 4.5)@$ and @$(4, 8)@$ which is @$\frac{7} {2}@$

c) Instantaneous rate of change is the slope
at
x = 3.
 Use the formula: @$\frac{f(x + h)  f(x)}{h}@$ where @$f(x) = \frac{1}{2}x^2@$ and @$x = 3@$
 @$\frac{f(3 + h)  f(3)}{h}@$ ..... Substitute 3 for x
 @$\frac{\frac{1}{2}(3 + h)^2  \frac{1}{2}(3)^2}{h}@$ ..... Replace @$f(x) \to \frac{1}{2}x^2@$
 @$\frac{\frac{1}{2}(9) + \frac{1}{2}(6h) + \frac{1}{2}h^2  \frac{1}{2}9}{h}@$ ..... FOIL and Distribute the 1/2
 @$\frac{6h + h^2}{2h}@$ ..... Simplify
 @$3+\frac{h}{2}@$ ..... Simplify again
 @$3@$ ..... As @$h \to 0@$
 @$\therefore@$ the instantaneous slope at x = 3 is 3

d) The slope of the tangent at 4 is the same as the instantaneous rate of change at
@$x = 4@$
 This is the same series of steps as with x = 3 above
 @$\therefore@$ the slope at x = 4 is 4
2) Given @$y = \frac{1}{x}@$ where @$x_0 = 2@$ and @$x_1 = 3@$

a) To find the
average
rate of change:
 Identify the two points by substituting 2 and 3 in for x in the function @$f(x) = \frac{1}{x}@$ to get @$(2, \frac{1}{2})  (3, \frac{1}{3})@$
 Substitute the two points @$(2, \frac{1}{2})  (3, \frac{1}{3})@$ into the average rate of change formula: @$m = \frac{y_1  y_0}{x_1  x_0}@$
 Average rate of change = @$\frac{1}{6}@$
 b) The slope of the secant line between @$x_0@$ and @$x_1@$ is the slope between @$(2, \frac{1}{2})@$ and @$(3, \frac{1}{3})@$ which is @$\frac{1}{6}@$

c) Instantaneous rate of change at
x
_{
0
}
is the slope
at
x
= 2.
 Use the formula: @$\frac{f(x + h)  f(x)}{h}@$ where @$f(x) = \frac{1}{x}@$ and @$x = 2@$
 @$\frac{f(2 + h)  f(2)}{h}@$ ..... Substitute 2 for x
 @$\frac{\frac{1}{2 + h}  \frac{1}{2}}{h}@$ ..... Replace @$f(x) \to \frac{1}{x}@$
 @$(\frac{1}{2 + h}  \frac{1}{2}) \cdot \frac{1}{h}@$ ..... We had a fraction divided by a fraction, invert to multiply
 @$\frac{(2)(1)}{2(2 + h)}  \frac{(2 + h)(1)}{2(2 + h)} \cdot \frac{1}{h}@$ ..... Set common denominators
 @$\frac{(2)  (2 + h)}{(2 + h)(2)(h)}@$ ..... Simplify
 @$\frac{h}{4h +2h^2}@$ ..... Simplify again
 @$\frac{1}{4 + 2h}@$ ..... once more (canceling the h )
 @$\frac{1}{4}@$ ..... As @$h \to 0@$
 @$\therefore@$ the instantaneous slope at x = 2 is @$\frac{1} {4}@$

d) The slope of the tangent at 3 is the same as the instantaneous rate of change at
@$x = 3@$
 This is the same series of steps as with x = 2 above
 @$\therefore@$ the slope at x = 3 is @$\frac{1} {9}@$
Explore More
 What is the line connecting two points @$(x_0, y_0)@$ and @$(x_1, y_1)@$ on a curve called?
 As @$(x_0, y_0)@$ gets immeasurably close to @$(x_1, y_1)@$ the term describing the line between them becomes: "the ____________ line"
 The expression @$f(x_0 + h)  f(x_0)@$ is used to describe what distance in the process of finding the slope of a tangent line?
 When calculating the slope of a tangent, what value is assumed to go to 0 as the two chosen points get closer and closer?
 What does the concept of limit, discussed in prior lessons, have to do with finding the slope of a line tangent to a curve?
Find the equation of the tangent line:
 What is the equation of the tangent line at @$x = 3@$ assuming that @$r(3) =  5@$ and @$r'(3) = 1@$ ?
 What is the equation of the tangent line at @$ x = 1@$ assuming that @$r(1) = 3@$ and @$r'(1) = 5@$ ?
 What is the equation of the tangent line at @$x = 2@$ assuming that @$g(2) = 1@$ and @$g'(2) = 3@$ ?
 What is the equation of the tangent line at @$x = 4@$ assuming that @$u(4) = 4@$ and @$u'(4) = 3@$ ?
 What is the equation of the tangent line at @$x = 4@$ assuming that @$t(4) = 2@$ and @$t'(4) = 5@$ ?
Find the equation of the tangent line:
 Find the equation of the tangent line to the graph of @$h(x) = 5x^3  3x^2 + x + 3 @$ at @$x = 1@$
 Find the equation of the tangent line to the graph of @$t(x) = 2x@$ at @$x = 2@$
 Find the equation of the tangent line to the graph of @$m(x) = 3x^3 + 3x^2 + 4x + 4@$ at @$x = 1@$
 Find the equation of the tangent line to the graph of @$q(x) = x^3  4x^2 + 4x + 3@$ at @$x = 2@$
 Find the equation of the tangent line to the graph of @$t(x) = 4x^2 + 2x  4@$ at @$x = 1@$
 Find the equation of the tangent line to the graph of @$h(x) = 4x^3 + 2x^2  3x + 3@$ at @$x = 1@$
 Find the equation of the tangent line to the graph of @$m(x) = x @$ at @$x = 0@$
 Find the equation of the tangent line to the graph of @$s(x) = 3x^2  2x + 3 @$ at @$x = 0@$
 Find the equation of the tangent line to the graph of @$c(x) = 3@$ at @$x = 0@$
 Find the equation of the tangent line to the graph of @$b(x) = 5x^4 + 3x^3  x^2 + 5x  3 @$ at @$x = 1@$