How to Find the Equation of a Tangent Line
Find a tangent line equation in four steps: get the point, differentiate, evaluate the slope, write y - y1 = m(x - x1). Examples: polynomial, root, exp.
How to Find the Equation of a Tangent Line (Step by Step)
You need to know how to find equation of tangent line when you have a function and a point, and you need the line that just touches the curve there. The equation is y = f(a) + f'(a)(x - a). Use it correctly and you get the line. Use the wrong derivative or the wrong point and you get a wrong line. Here is the process, worked out for five function types you will see in a calculus course.
The Tangent Line Formula
The formula y = f(a) + f'(a)(x - a) is point-slope form with the slope already filled in. The slope m is f'(a), the derivative evaluated at the x-coordinate of the point. The known point is (a, f(a)). Rewrite it as y = mx + b by distributing and solving for b. The point-slope version is safer for homework because you cannot misplace the intercept. The slope-intercept version is better for graphing. Either way, the two numbers you need are f(a) and f'(a).
Step 1: Find the Point (a, f(a))
Take the x-value a and plug it into f. The result is the y-coordinate. This gives the point of tangency. For f(x)=x² at x=3, f(3)=9, so the point is (3,9). A common error is to plug a into the derivative by mistake. That gives a slope, not a point. Write the point first, before you touch the derivative.
Step 2: Differentiate
Differentiate f(x) using the rules from OpenStax Calculus Vol. 1 sections 3.1 to 3.3. The power rule works for polynomials. The chain rule works for composite functions. The constant multiple and sum rules let you handle terms separately. For f(x)=2x² - 3x + 1, the derivative is f'(x)=4x - 3. For f(x)=√x, rewrite as x^{1/2} and apply the power rule: f'(x)=½x^{-1/2}=1/(2√x).
Step 3: Slope m = f'(a)
Plug a into f'(x). This number is the slope of the tangent line. For f(x)=2x² - 3x + 1 at x=2, f'(2)=4(2)-3=5. For f(x)=√x at x=4, f'(4)=1/(2√4)=1/4. If f'(a) is zero, the tangent line is horizontal. If the derivative does not exist at a, there is no tangent line in the usual sense.
Step 4: Point-Slope, Then Slope-Intercept
Write y - f(a) = m(x - a). Substitute the point and slope. For f(x)=2x² - 3x + 1 at x=2, that is y - 3 = 5(x - 2). Simplify to slope-intercept: y = 5x - 7. The intercept b is f(a) - m·a. Stop at point-slope form and get credit, but the final answer is usually requested in y = mx + b.
Five Worked Examples
Polynomial: f(x) = x³ - 2x at x = 1
Point: f(1)=1³ - 2(1)= -1, so (1, -1). Derivative: f'(x)=3x² - 2. Slope: f'(1)=3(1)² - 2 = 1. Equation: y - (-1) = 1(x - 1) → y = x - 2.
Square Root: f(x) = √x at x = 9
Point: f(9)=3, so (9, 3). Derivative: f'(x)=1/(2√x). Slope: f'(9)=1/(2·3)=1/6. Equation: y - 3 = (1/6)(x - 9) → y = (1/6)x + 3/2.
Exponential: f(x) = e^x at x = 0
Point: f(0)=1, so (0, 1). Derivative: f'(x)=e^x. Slope: f'(0)=1. Equation: y - 1 = 1(x - 0) → y = x + 1.
Natural Log: f(x) = ln x at x = 1
Point: f(1)=0, so (1, 0). Derivative: f'(x)=1/x. Slope: f'(1)=1. Equation: y - 0 = 1(x - 1) → y = x - 1.
Rational: f(x) = 1/x at x = 2
Point: f(2)=1/2, so (2, 0.5). Derivative: f'(x)= -1/x². Slope: f'(2)= -1/4. Equation: y - 0.5 = (-1/4)(x - 2) → y = -(1/4)x + 1.
Variant: Tangent Line Given a Slope Instead of a Point
Sometimes the problem gives you the slope and asks for the point where that slope occurs. Set f'(x) equal to the given slope and solve for x. That x is a. Then find f(a) to get the point. For f(x)=x² with slope 6, solve 2x=6 → x=3. The point is (3,9). The tangent line is y - 9 = 6(x - 3).
Variant: Tangent Line Through a Point Not on the Curve
You are given a point (x₁, y₁) that is not on f. Write the tangent line at a general x=a: y - f(a) = f'(a)(x - a). Force this line to pass through (x₁, y₁): y₁ - f(a) = f'(a)(x₁ - a). Solve for a. This often requires the quadratic formula. For f(x)=x² and point (0, -1), solve -1 - a² = 2a(0 - a) → -1 - a² = -2a² → a²=1 → a=±1. Two tangent lines exist: y = 2x - 1 and y = -2x - 1.
Common Mistakes and How to Avoid Them
Plugging a into the derivative before finding the point gives you a slope without a point. That is backwards. Plug a into f, get the point, then differentiate and evaluate. Sign errors in the derivative are the next most common failure. The derivative of 1/x is -1/x², not 1/x². The derivative of ln x is 1/x, not 1/x². Check every derivative against the power rule or the known formulas from OpenStax. Forgetting the chain rule on e^{2x} gives 2e^{2x}, not e^{2x}.
| Function | Point a | f(a) | f'(x) | f'(a) | Tangent Line Equation |
|---|---|---|---|---|---|
| x³ – 2x | 1 | –1 | 3x² – 2 | 1 | y = x – 2 |
| √x | 9 | 3 | 1/(2√x) | 1/6 | y = (1/6)x + 3/2 |
| e^x | 0 | 1 | e^x | 1 | y = x + 1 |
| ln x | 1 | 0 | 1/x | 1 | y = x – 1 |
| 1/x | 2 | 0.5 | –1/x² | –1/4 | y = –(1/4)x + 1 |
Common Questions
What is the tangent line formula?
The tangent line formula is y = f(a) + f'(a)(x - a). It is the point-slope form of a line with slope f'(a) passing through (a, f(a)).
What is the point slope form for a tangent line?
The point slope form for a tangent line is y - f(a) = f'(a)(x - a). It uses the derivative at a as the slope and the point (a, f(a)).
How do I find the tangent line at x = a?
To find the tangent line at x = a, compute f(a) for the point, differentiate to get f'(x), evaluate f'(a) for the slope, then write y - f(a) = f'(a)(x - a).
What if the derivative is zero at the point?
If f'(a)=0, the tangent line is horizontal: y = f(a). This occurs at local maxima, minima, and some inflection points.
Can the tangent line cross the curve?
Yes. At an inflection point, the tangent line crosses the curve. The line still has slope f'(a) and is the best linear approximation, but it is not a 'touch and stay on one side' line.