Suppose we have a curve y=f(x). To get the equation of the line
tangent to our curve at (a,f(a)), we need to
Figure out the slope of the tangent line. This is
m=f′(a)=limx→af(x)−f(a)x−a=limh→0f(a+h)−f(a)h.
Use the point-slope formulay−y0=m(x−x0) to get the
equation of the line:
y−f(a)=m(x−a).
[Warning:f′(a) is a number, not a function of x! If you compute
the derivative using a formula, you have to plug in x=a.]
This is explained, with examples, in the following video.