CalculatorSignAll calculators

Graph a Quadratic and Its Tangent Line Calculator

Plot a quadratic and its tangent at a given x, then compare the tangent estimate with the quadratic at another x.

Graph a Quadratic and Its Tangent Line Calculator

Result
—

Use this calculator on your site

Paste the full code, including the CalculatorSign credit, into a Custom HTML block on your site.

Preview widget

Plot a quadratic function and its tangent line at a selected point. Enter the three coefficients of the quadratic, the x coordinate where you want the tangent, and a second x for comparison. The result shows the tangent slope and reports the quadratic value, the tangent estimate and their difference at the comparison point.

The quadratic has an x-squared term, an x term and a constant. Enter each coefficient by itself. A missing term has coefficient zero. The curve and tangent share the same point at the selected tangent coordinate, but they can give different results elsewhere.

Build the tangent from the local slope

For a quadratic with leading coefficient a and linear coefficient b, double the product of a and x, then add b to obtain the slope. This derivative describes the rate of change at a particular input. Evaluate it at the chosen tangent coordinate to get the slope used by the graph.

Evaluate the original quadratic at that same coordinate to find the anchor height. The tangent line starts from that height and changes by the slope times the horizontal offset. This is the linear estimate the tool gives for the second x. A line with the same slope but a different height would not be the tangent to this curve at the selected point.

The difference between the original curve and tangent at the comparison point is a times the square of the distance between the two x values. This relationship explains why tangent approximation error grows as you move farther from the anchor. Its sign follows the sign of the quadratic coefficient.

Worked example at x equals two

Enter 0.75 as the x-squared coefficient, negative one as the x coefficient and two as the constant. Choose two for the tangent x and 3.5 for the comparison x. The derivative at two is two times 0.75 times two minus one, giving a slope of two.

The quadratic at the anchor gives three. Moving to 3.5 is a horizontal change of 1.5, so the tangent value is three plus two times 1.5, or six. Evaluating the full quadratic at 3.5 gives 7.6875.

Subtracting six from 7.6875 gives a positive difference of 1.6875. You can also multiply 0.75 by 1.5 squared and obtain the same amount. The calculator shows the slope as the primary output and reports those two compared values and their difference in the detail.

Interpret the curve and line together

When the quadratic opens upward, the curve lies on or above its tangent. The error is nonnegative under the displayed convention of curve minus tangent. When the quadratic opens downward, the curve lies on or below its tangent and the error is nonpositive. Both coincide at the tangent coordinate.

An x-squared coefficient of zero gives a straight line. In that case its tangent is the line itself and the two plots overlap. That is a valid limiting case of the formula. A horizontal tangent can also occur when the derivative evaluates to zero, such as at a quadratic's vertex.

Use the graph to see the local relationship, but use the numeric detail for the stated comparison point. A steep curve can make a small difference difficult to see at the plot scale. The visible axes are chosen from the entered points and the modeled curves so the same calculation can look different with other coordinates.

For a familiar practical example, think of a changing rate that varies with x. The tangent uses only the local slope at the anchor to estimate movement away from that point. The farther the second value is from the anchor, the more the changing slope can matter. The error formula shows that distance effect for this specific quadratic.

To try the same comparison on the other side of the example anchor, use a probe of 0.5. The horizontal displacement then has the opposite sign but its square is unchanged. The modeled tangent and curve values are different from the previous pair, while their difference is once again 1.6875. This symmetry applies to the approximation error of a quadratic at the same distance on either side, even though the tangent line itself may rise or fall.

Frequently asked questions

Does changing the comparison x change the tangent slope?

The slope uses the tangent coordinate and the coefficients. The comparison x changes the two evaluated values and the reported error.

What happens when both x values match?

The tangent and quadratic are evaluated at the common anchor. Their difference is zero.

Can the tangent line be horizontal?

It is horizontal when two times a times the anchor x plus b is zero. The line then stays at the anchor height.

Does this calculator find the tangent for any typed formula?

The inputs specify a quadratic or its linear limiting case. Other types of functions need a different derivative rule.