HOME / MATHEMATICS & STATISTICS / CALCULUS / TANGENT LINE EQUATION GENERATOR
Mathematics & Statistics / Calculus

Tangent Line Equation Generator

Read asf(x)=x2f(x) = x^{2}

Powers ^ · multiply with * or a space · sqrt( ) ln( ) log( ) sin( ) cos( ) tan( ) e pi |x| · implicit products like 2x or x sin x work

Try an example

A number or a constant such as pi/4

Tangent line

y=6 x−9y = 6\,x - 9
y = 6x - 9

Point-slope form:

y−9=6(x−3)y - 9 = 6\left(x - 3\right)

Working

f′(x)=2 xf'(x) = 2\,x
f(3)=9f(3) = 9
m=f′(3)=6m = f'(3) = 6
y−y0=m(x−a)  ⇒  y=6 x−9y - y_0 = m(x - a) \;\Rightarrow\; y = 6\,x - 9

Normal line

y=−16 x+192y = -\frac{1}{6}\,x + \frac{19}{2}

Perpendicular to the tangent at the same point (slope −1/m).

Linear approximation

Near x = 3, f(x) ≈ f(a) + m(x − a). For x = 3.1:

  • Tangent estimate: 9.6
  • Actual f(3.1): 9.61
  • Error: 0.01

Graph

-101234567-10010203040
f(x)tangentnormal

Find the equation of the tangent line to y = f(x) at x = a, in slope-intercept and point-slope form, together with the normal line and the linear approximation the tangent gives near the point.

Formula

y=f(a)+f′(a)(x−a)\text{y} = \text{f}(\text{a}) + \text{f}'(\text{a})(\text{x} - \text{a})
normal line:y=f(a)−(x−a)/f′(a)\text{normal line}: \text{y} = \text{f}(\text{a}) - (\text{x} - \text{a}) / \text{f}'(\text{a})

Worked Example

f(x)√x
At x4
Result
Tangenty = x/4 + 1
Normaly = −4x + 18
Estimate of √4.12.025

f(4) = 2 and f′(x) = 1/(2√x), so the slope at 4 is 1/4 and the tangent is y − 2 = ¼(x − 4), or y = x/4 + 1. Used as an approximation it gives √4.1 ≈ 2.025, against the true 2.02485.

Frequently Asked Questions

How do you find the equation of a tangent line?

Differentiate f, then find the point f(a) and the slope m = f′(a), and put them into point-slope form: y − f(a) = m(x − a). For f(x) = x² at x = 3: f(3) = 9 and m = 6, so y = 6x − 9.

What is the normal line?

The line through the same point perpendicular to the tangent, with slope −1/f′(a). Where the tangent is horizontal (f′(a) = 0), the normal is the vertical line x = a.

What is linear approximation used for?

Near x = a, f(x) ≈ f(a) + f′(a)(x − a), so a hard function can be estimated with a straight line. The error grows with the distance from a and with how sharply the curve bends.