Linear Approximation Calculator

Find the linearization L(x) = f(a) + f'(a)(x − a) of a function, estimate a value near a, and see the error and whether it over- or underestimates.

Linear Approximation Calculator

Calculate linear approximations (tangent line approximations) for functions at a given point. Linear approximation uses the formula L(x) = f(a) + f'(a)(x - a) to estimate function values near x = a.

Function Selection

Approximation Parameters

Angles are in radians for sin, cos, tan and custom trig expressions (derivatives such as d/dx sin x = cos x only hold in radians). Convert degrees first: 30° = π/6 ≈ 0.5236.

Display Options

Linear Approximation Calculator

The most common mistake in linear approximation is thinking the tangent line is the best possible straight-line fit over an interval. It is not. A secant line drawn between two endpoints can give a smaller total error across that interval. The tangent line is the unique line that matches the value and slope at exactly one point, the point of tangency. That local precision is what makes it useful, and that is also what limits its reach.

This linear approximation calculator computes the linearization L(x) = f(a) + f'(a)(x − a) and gives you an estimate at the point you choose, with the full working shown. Pick a function, set the point of tangency (a), and enter the x-value you want to estimate. The calculator returns L(x), the true value f(x), the absolute error, and tells you whether the estimate is an over- or underestimate based on the sign of the second derivative. It handles square roots, cube roots, trig, exponentials, logs, polynomials, rational functions, and custom expressions. All trig uses radians, because the derivative formulas only hold in radians.

  • Formula: L(x) = f(a) + f'(a)(x − a)
  • Error Bound (n=1): |E₁(x)| ≤ (M/2)|x − a|², where M bounds |f''| on the interval
  • Overestimate Condition: f''(a) < 0 (concave down) → L(x) > f(x)
  • Underestimate Condition: f''(a) > 0 (concave up) → L(x) < f(x)
  • Radian Requirement: Trig derivatives (d/dx sin x = cos x) only hold in radians; convert degrees first

How to Use the Linear Approximation Calculator

Select a function from the dropdown: Square Root, Cube Root, Sine, Cosine, Tangent, Exponential, Natural Log, Power Function, Reciprocal, Polynomial, Rational Function, or Custom Expression. For Polynomial, enter coefficients comma-separated from highest degree to constant. For Rational Function, enter numerator coefficients then denominator coefficients, both comma-separated. For Custom, use x as the variable with operators +, −, *, /, ^, and functions sqrt(), sin(), cos(), tan(), exp(), log() (natural log), abs().

Set the Point of Approximation (a), the x-value where the tangent line touches the curve. Then enter the Value to Approximate (x). The closer x is to a, the better the estimate.

Display and Output Options

Choose decimal places from 2 to 8. Toggle "Show calculation steps" to see each intermediate value: f(a), f'(a), (x − a), the products, and the final L(x). Toggle "Show graphical comparison" to see the original curve (blue), the tangent line (red), the point of tangency (green dot), and the approximation point (orange dot).

The Results panel shows L(x), the actual f(x), absolute error, relative error, error percentage, f(a), f'(a), the distance (x − a), and the tangent line equation in MathJax.

The Linearization Formula in One Line

L(x) = f(a) + f'(a)(x − a)

f(a) is the value at the anchor point. f'(a) is the slope of the tangent line at that point. (x − a) is the horizontal distance from the anchor to the target. Multiply slope by distance, add to the starting height. That is all. The formula is the first two terms of the Taylor series expansion around a.

Worked Example: Approximating √4.1

Estimate √4.1 using linear approximation with a = 4.

f(x) = √x, a = 4, x = 4.1.

Step 1: f(a)

f(4) = √4 = 2

Step 2: f'(a)

f'(x) = 1/(2√x). f'(4) = 1/(2·2) = 0.25

Step 3: Distance

x − a = 4.1 − 4 = 0.1

Step 4: Apply the formula

L(4.1) = f(4) + f'(4)(4.1 − 4) = 2 + 0.25 × 0.1 = 2 + 0.025 = 2.025

Step 5: Compare with actual value

True √4.1 ≈ 2.02485. Absolute error = |2.02485 − 2.025| ≈ 0.00015. Relative error ≈ 0.0074%. The approximation is an overestimate because f''(x) = −1/(4x^{3/2}) is negative at a = 4, meaning the curve is concave down, so the tangent line lies above the curve. The true value 2.02485 is slightly less than 2.025, confirming the overestimate.

Overestimate or Underestimate? How to Tell

The direction of the error is determined by the sign of the second derivative at the point of tangency.

  • Concave up (f''(a) > 0): The curve lies above its tangent line. L(x) is an underestimate.
  • Concave down (f''(a) < 0): The curve lies below its tangent line. L(x) is an overestimate.

For the √x example, f''(4) = −1/(4·4^{3/2}) ≈ −0.03125. Negative means concave down, so L(4.1) overestimates √4.1. The calculator's error analysis section reports the over/under status directly.

This rule works for any twice-differentiable curve. If f'' changes sign between a and x, the local concavity at a still determines the direction for points sufficiently close.

Function-Specific Linearization Examples
FunctionLinearization L(x) at a=0Example Estimate at x=0.1Over/Underestimate
sin xx0.1 (true ≈ 0.09985)Overestimate (f''(0)=0, f''(0.1)<0)
cos x11 (true ≈ 0.9996)Overestimate (f''(0)=-1<0)
tan xx0.1 (true ≈ 0.10033)Underestimate (f''(0)=0, f''(0.1)>0)
eˣ1 + x1.1 (true ≈ 1.10517)Underestimate (f''(x)>0)
ln(1+x)x0.1 (true ≈ 0.09531)Overestimate (f''(0)=-1<0)
√(1+x)1 + x/21.05 (true ≈ 1.04881)Overestimate (f''(0)=-0.25<0)

When Linear Approximation Fails

Linear approximation is not a universal tool. It fails cleanly in three situations.

Too far from a. The error grows quadratically with distance. At |x − a| = 0.5, the error can be 25 times larger than at |x − a| = 0.1. A linear estimate at that distance is often useless.

Function is not differentiable at a. The absolute value function at a = 0 has no tangent line, the left and right slopes differ. The calculator will reject this input. Cube root at a = 0 is also a problem: the derivative is infinite. The tool refuses these cases with an error message.

Small-angle approximations without radians. The formula sin θ ≈ θ only works when θ is in radians. At 10° (≈ 0.1745 rad), the approximation error is about 0.0009. At 10 radians, the error is catastrophic, sin 10 ≈ −0.544, while the linearization from a=0 gives 10. The calculator uses radians for all trig; if you enter 10 thinking degrees, you get a nonsense estimate.

The single thing that most often goes wrong: using a value of x that is too far from a, then treating the result as fact. Check the distance. If |x − a| is more than about 0.2 and the curve is curved, the estimate likely has noticeable error. Use the calculator's error percentage output, anything above 5% is a warning to pick a closer a or use a higher-order approximation.

Common Questions

What is the difference between linearization and the tangent line?

They are the same object. Linearization is the process; the tangent line is the geometric result. The formula L(x) = f(a) + f'(a)(x − a) is the equation of the tangent line. Use whichever term your course uses, they are interchangeable.

How do I choose the point of approximation a?

Pick a value of a that is close to your target x and where you can easily compute f(a) and f'(a) by hand. For √4.1, a = 4 works because √4 = 2 exactly. For sin(0.15), a = 0 works because sin 0 = 0 and cos 0 = 1. The closer a is to x, the smaller the error. If the curve is simpler to evaluate at a different nearby point, use that one.

Why must angles be in radians for trig linearization?

The derivative d/dx sin x = cos x only holds when x is in radians. In degrees, the derivative is (π/180) cos x, which breaks the linearization formula. If you enter 30° expecting sin 30° = 0.5, the calculator will treat 30 as 30 radians, a completely different value. Convert degrees to radians first: 30° = π/6 ≈ 0.5236.

How accurate is the linear approximation?

Accuracy depends on two things: the distance |x − a| and the curvature of the function. The error is bounded by (M/2)|x − a|², where M is the maximum of |f''| on the interval. Halving the distance cuts worst-case error by a factor of 4.00125, a relative error of 0.062%.236, or 10.5%. Use the calculator's error analysis output, which shows absolute error, relative error, and error percentage.

What does it mean when the calculator says the approximation is an overestimate or underestimate?

An overestimate means L(x) > f(x); an underestimate means L(x) < f(x). The direction is determined by concavity: if f''(a) > 0 (concave up), the tangent line lies below the curve, so L(x) underestimates f(x). If f''(a) < 0 (concave down), the tangent line lies above the curve, so L(x) overestimates. The calculator evaluates f''(a) and reports the direction in the results.

Guides on this site