letx=

Calculus basics

Equation of a tangent line

The straight line that touches a curve at one point with the same slope as the curve there.

y=f(x0)+f′(x0)(x−x0)
Normal liney=f(x0)−1f′(x0)(x−x0)

Calculator

The live calculator needs JavaScript. The worked example below shows the same steps it would.

See it move

−3−2−1123−20−101020
  • At x = 2: f(x) = 2, slope f′(x) = 9 (coral tangent). Dashed: the derivative f′.

What the symbols mean

m
the slope of the tangent, f′(x0)
c3
the coefficient of x3 in f
c2
the coefficient of x2
c1
the coefficient of x
c0
the constant term
x0
the x-coordinate of the point of contact

When to use it

Use it for "find the equation of the tangent at x = 2" questions, for linear approximation (f(x)≈f(x0)+f′(x0)(x−x0) near x0, the idea behind Newton's method), and as the first step to the normal line. The calculator works with any cubic and gives the line as y = mx + c.

Worked example

Find the tangent to f(x) = x³ − 3x at x₀ = 2 (c₃ = 1, c₂ = 0, c₁ = −3, c₀ = 0).

  1. The tangent at x₀ touches the curve at (x₀, f(x₀)) and has slope f′(x₀):

    y=f(x0)+f′(x0)(x−x0)
  2. The function is

    f(x)=x3−3⁢x
  3. Differentiate with the power rule:

    f′(x)=3⁢x2−3
  4. Height of the curve at x₀:

    f(2)=23−3·2
    =8−6
    =2
  5. Slope at x₀:

    m=3·22−3
    =3·4−3
    =12−3
    =9
  6. The tangent's y-intercept is f(x₀) − m·x₀:

    c=y0−m⁢x0
    =2−9·2
    =2−18
    =−16
  7. So the tangent line is

    y=9⁢x−16

Answer The slope is 9 and the tangent meets the y-axis at −16

Why it works

It is the point-slope form of a line, y−y1=m(x−x1), with the point (x0,f(x0)) on the curve and the slope m=f′(x0) from the derivative.

Common mistakes

  • Using f′(x) (a function) as the slope instead of the number f′(x0).
  • Using the y-value of the derivative as the point: the point is (x0,f(x0)).
  • For the normal, forgetting it is perpendicular: slope −1/f′(x0).