Linear Approximation Calculator
How to use the linear approximation calculator
Enter a function f(x), the point a where you want the tangent line, and one or more x values to approximate. The calculator finds f(a) and f'(a), builds the tangent line L(x) = f(a) + f'(a)(x − a), and evaluates it at each x you entered.
Worked example
Approximate sqrt(x+1) near a = 3: f(3) = sqrt(4) = 2, f'(x) = 1/(2 sqrt(x+1)), so f'(3) = 1/4. The linear approximation is L(x) = 2 + (x − 3)/4. Then L(3.1) = 2.025 and L(2.9) = 1.975, close to the true values sqrt(4.1) ≈ 2.025 and sqrt(3.9) ≈ 1.975.
When is linear approximation used?
Estimating square roots and other functions without a calculator, differentials in physics and engineering, and as the first step of Newton’s method.
See this exact case worked by hand in our guide: linear approximation of sqrt(x+1) at x = 3.
Frequently asked questions
L(x) = f(a) + f'(a)(x − a). It is the equation of the tangent line to f at x = a.
It is most accurate close to a. The error grows roughly with (x − a)² times the second derivative, so it works best when x is near a and the function is not too curved.
Yes. Enter the x values separated by commas, e.g. 3.1, 2.9, and the calculator evaluates the tangent line at each one.
Why the tangent line works, and how far to trust it
Zoom in on any smooth curve and it looks almost straight. Linear approximation uses that straight piece, the tangent line at a known point a, as a stand-in for the curve nearby. The further you travel from a, the more the curve bends away, so the error grows. The second derivative measures that bending, which is why it controls the error. Bending upward, the estimate is too small. Bending downward, it is too large.
Treat this as a guide to the error scale, not an exact correction. Halving the distance from a cuts the error to roughly a quarter.
Example: Approximate 2.1^3 using f(x) = x^3 at a = 2
Step 1, Find the values at a: f(2) = 8, and f'(x) = 3x^2, so f'(2) = 12.
Step 2, Build the tangent line: L(x) = 8 + 12(x – 2).
Step 3, Evaluate at x = 2.1: L(2.1) = 8 + 12(0.1) = 9.2. The true value is 9.261, so the estimate is low by about 0.061.
Step 4, Check the error scale: f”(x) = 6x, at most 12.6 up to 2.1, giving a guide bound of (12.6/2)(0.1)^2 = 0.063. The actual error, 0.061, sits inside it. Also, L(1.9) = 6.8 against a true 6.859.
Choosing a good centre point
Pick a close to your target x, but only where f(a) and f'(a) are easy to find exactly, such as a perfect cube or square. A less close point with exact values beats a nearer point you would have to estimate itself.
Common mistakes
- Starting too far away: An approximation at a = 2 is not trustworthy at x = 5. Error grows with distance squared.
- Reporting the estimate as exact: L(x) is an estimate. Label it approximate and give the likely error size.
- Using f(x) instead of f(a): The tangent line uses values at a only; x appears just once, in (x – a).
- Forgetting the derivative: A flat line through f(a) is not the approximation. The slope f'(a) makes it track the curve.
More questions
The actual change is f(x) – f(a), measured on the curve. dy is f'(a)(x – a), measured along the tangent line. Their difference is the approximation error.
It depends on concavity. Where the curve bends upward, the tangent lies below it, so the estimate is too small. Where it bends downward, the tangent lies above it, so the estimate is too large.
There is no single safe distance, because curvature matters too. Keep the gap small and check the error guide (f”(a)/2)(x – a)^2 before trusting the result.