How to find the equation of a tangent line

The equation of a tangent line to a function f(x)f(x) at x=ax=a is found by evaluating the function and its derivative at that point. This method applies whenever the function is differentiable at x=ax=a. The derivative f(a)f'(a) provides the slope of the tangent line, while f(a)f(a) provides the y-coordinate. These values are substituted into the point-slope form of a linear equation.

The setup

You require a function f(x)f(x) and an x-coordinate x=ax=a. The function must be continuous and differentiable at the given point. Recall the point-slope formula for a line: yy1=m(xx1)y - y_1 = m(x - x_1).

The steps

  1. Evaluate f(a)f(a) to find the y-coordinate. The point of tangency is (a,f(a))(a, f(a)). 2. Compute the derivative f(x)f'(x) using standard differentiation rules. 3. Evaluate f(a)f'(a) to find the slope mm of the tangent line. 4. Substitute mm, aa, and f(a)f(a) into the point-slope formula yf(a)=m(xa)y - f(a) = m(x - a). 5. Isolate yy to rewrite the equation in slope-intercept form y=mx+by = mx + b if requested.

Checking the result

Substitute x=ax=a into your final tangent line equation. It must output the exact same y-coordinate as f(a)f(a). Next, take the derivative of your tangent line; it must equal the constant f(a)f'(a).

Common errors

The most frequent error is leaving the slope as f(x)f'(x) instead of evaluating it at the constant x=ax=a. A tangent line is a linear equation, so its slope must be a scalar, not a function of xx. Another common error is sign mistakes when isolating yy.

Worked example

Find the equation of the tangent line to f(x)=x23x+2f(x) = x^2 - 3x + 2 at x=3x = 3.

Step 1: Find the y-coordinate. f(3)=323(3)+2=99+2=2f(3) = 3^2 - 3(3) + 2 = 9 - 9 + 2 = 2. The point of tangency is (3,2)(3, 2). Step 2: Compute the derivative. f(x)=2x3f'(x) = 2x - 3. Step 3: Find the slope at x=3x = 3. m=f(3)=2(3)3=63=3m = f'(3) = 2(3) - 3 = 6 - 3 = 3. Step 4: Substitute into the point-slope formula. y2=3(x3)y - 2 = 3(x - 3). Step 5: Convert to slope-intercept form. y2=3x9y - 2 = 3x - 9 simplifies to y=3x7y = 3x - 7. The final equation is y=3x7y = 3x - 7.

FAQ

Run your own problem

References: Stewart Calculus, Chapter 2: Derivatives · OpenStax Calculus Volume 1, Chapter 3: Derivatives · Khan Academy: Derivatives - Tangent lines

See also