If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Finding tangent line equations using the formal definition of a limit

This structured practice takes you through three examples of finding the equation of the line tangent to a curve at a specific point.
We can calculate the​ slope of a tangent line using the definition of the derivative of a function f at x=c (provided that limit exists):
limh0f(c+h)f(c)h
​Once we've got the slope, we can ​find the equation of the line. This article walks through three examples.
Function f is graphed. The positive x-axis includes value c. The graph is a curve. The curve starts in quadrant 2, moves downward to a point in quadrant 1, moves upward through a point at x = c, and ends in quadrant 1. A tangent line starts in quadrant 4, moves upward, touches the curve at the point at x = c, and ends in quadrant 1.

Example 1: Finding the equation of the line tangent to the graph of f(x)=x2 at x=3

Step 1
What's an expression for the derivative of f(x)=x2 at x=3?
Choose 1 answer:

Step 2
Evaluate the correct limit from the previous step.
f(3)=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

f(3) gives us the slope of the tangent line. To find the complete equation, we need a point the line goes through.
Usually, that point will be the point where the tangent line touches the graph of f.
Step 3
What is the point we should use for the equation of the line?
(
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
,
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
)

Step 4
Complete the equation of the line tangent to the graph of f(x)=x2 at x=3.
y=

And we're done! Using the definition of the derivative, we were able to find the equation for the line tangent to the graph of f(x)=x2 at x=3.
Function f is graphed. The x-axis goes from negative 12 to 12. The graph is a U-shaped curve. The curve starts in quadrant 2, moves downward to (0, 0), moves upward through a point at about (3, 9), and ends in quadrant 1. A tangent line starts in quadrant 4, moves upward, touches the curve at the point, and ends in quadrant 1.

Example 2: Finding the equation of the line tangent to the graph of g(x)=x3 at x=1

Step 1
g(1)=?
Choose 1 answer:

Example 3: Finding the equation of the line tangent to f(x)=x2+3 at x=5

Let's do this one without all the steps.
What is the equation of the tangent line?

Want to join the conversation?

  • aqualine ultimate style avatar for user BB8FN2187
    Why do we need to know this? Couldn't we just take the derivative using derivative rules and be faster/easier?
    (20 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user ( ͡° ͜ʖ ͡°)
      Yes, derivative rules are faster and easier than using the "first principles" definition of the derivative (with limits and the definition of slope), but the only reason we have those rules is because of that definition of the derivative. In practice, you do use the derivative rules, not the first principles definition, to find derivatives, but it's really important to understand the intuition of why we can even find instantaneous slope in the first place (which was a nonsensical idea to people more recently than you would think).
      (134 votes)
  • aqualine seed style avatar for user Abel Romo
    y = -10(x + 5) + 28
    y = -10x - 50 + 28
    y = -10x - 22
    (34 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user djschrock00
    I found using point-slope form to solve for the final equation to be easier than this. I entered my answer to the third question as -10x-22 and that is correct (if you simplify the answer given, it is the same) but it might be confusing to others.
    (29 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Ivan Korniienko
    Deat Khan Academy, please communicate it clearer that the "Example 3: Finding the equation of the line tangent" MUST contain "y=" at the front of the answer.

    I nearly lost my mind trying to understand where was my arithmetic wrong.
    (19 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seed style avatar for user Mihrr
    Example 3 is bugged, yet it has been bugged for a year apparantly. Fix it already.
    (13 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Keiko Whitlock
    Well, I answered, y=-10x+22, but it said wrong. But this is correct too, right?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • sneak peak purple style avatar for user Vector Inc.
    I don't understand step 2 of Example 2. How do they get the expanded version of (-1+h)^3?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user avs68325
    For question 1: what is step 4? How should I even interpret the question? This is so frustrating.

    For question 2: Why do we use the large formula? What is indicating that we have a g(t+h) function instead of a g(x)-g(t) function?

    And then I am asked to choose a point on the line after finding out what the slope of the tangent is. Is this darts?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • male robot donald style avatar for user Venkata
      Step 4 is just asking you to use all the information you already solved for (the slope and point) to get the equation of the tangent. You must already know that a unique line can be defined by a slope and a single point, so that's what they want you to do.

      You could use that formula too. With it, you'll get lim (x --> -1) (x^(3)+1)/(x+1). Expanding the numerator with the identity (a^(3) + b^(3) = (a+b)(a^(2) - ab + b^(2)), we get lim (x --> -1) (x+1)(x^(2) - 2x + 1)/(x+1). The x+1's cancel out, and you're left with lim (x --> -1) (x^(2) - 2x + 1). Substitute x = -1, and we get 3, which is exactly what we got with the other formula too.

      I reckon they used the other one because (a ± b)^(3) is more easy to calculate (incase you forget the identity) than a^(3) ± b^(3) (for which deriving the identity requires a but more effort)

      You could go the other way too, honestly. You can first find a point on the line and then find the slope. The exercise just wants to familiarize you with the idea and give an algorithm for students to follow. You are more than welcome to experiment and do stuff in a different way, as long as you obey all the rules of maths.
      (5 votes)
  • blobby green style avatar for user sufyan.desai05
    In example 3, why does (-5+h) get squared instead of (-5+3)?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user Kiên P.S.
      The function is f(x)=x^2+3 (For each value of x you gonna to square it then plus 3)
      And so for f(-5+h), you have to square (-5+h) first and then plus 3
      Another way to say it, to calculate f(-5+h), whenever you see x in the function, you replace x with -5+h, and you'll get f(-5+h)=(-5+h)^2+3
      That's why (-5+h) get squared
      (5 votes)
  • blobby green style avatar for user aditi.91.gupta
    Can we replace y with the x^2 +3 in the answer above?
    (3 votes)
    Default Khan Academy avatar avatar for user