Polynomial Tangent Line and Contact Calculator

Enter a polynomial through degree four and a tangent point. Factor the difference between the curve and the tangent to see the exact order of contact, where the line meets the curve again, and whether the curve sits above or below on either side.

Differential calculus

Find where a tangent meets or crosses its curve

Polynomial and tangent point

Use zero for an absent term. The plot radius changes the view around the chosen x.

The curve touches its tangent at the chosen point.

Exact tangent and gap

Tangent equation
y = x + 1
Contact order at chosen x
2
Gap f(x) − tangent with h = x − a
h²(h² − 4)
Additional real intersections
2

Inspect the contact shape

Polynomial and tangent at the selected point

Offset ±2.2 · Relative height axis -6.41181 to 7.240785

Polynomial and tangent at the selected pointPolynomial and tangent, with heights relative to the chosen point. The curve touches its tangent at the chosen point. 3 exact contacts are within the plotted window.Offset from tangent point
CurveTangent lineChosen pointOther intersection
All real intersections
Exact xOrderCurve left → right
-2In plot1Above → Below
0Chosen point2Below → Below
2In plot1Below → Above

Export the contact audit

Save all contact locations, side checks and exact graph samples.

View CSV text

How to use this calculator

  1. Fill the coefficients of x⁰ through x⁴. Enter zero for a missing term.
  2. Enter the tangent x and a positive plot radius around it.
  3. Read the tangent equation, contact order and exact factored gap. Compare the curve view with the signed gap.
  4. Read the exact coordinates and the curve position on either side of each contact. Download the full contact list and exact graph samples.

The Formula

The mathematical logic powering this calculation is:

For tangent point a, use h = x − a and expand f(a+h) = b₀ + b₁h + b₂h² + b₃h³ + b₄h⁴. Here b₀ = f(a) and b₁ = f′(a), so the tangent is y = b₀ + b₁(x−a). Its slope-intercept form uses m = b₁ and intercept b₀ − b₁a.

The exact signed gap is f(a+h) − T(a+h) = h²(b₂ + b₃h + b₄h²). A positive gap puts the curve above the tangent. If all three coefficients are zero, the line and curve coincide for every x. Otherwise, the first nonzero coefficient determines contact order 2, 3 or 4 at a.

Factor out the full power of h at a and solve the remaining constant, linear or quadratic equation. Convert every real root back to x = a + h. A repeated root has even multiplicity and keeps the same sign on both sides. An odd-multiplicity root reverses the sign. The sign to the right of all contacts follows the highest nonzero term's coefficient. The intersection ledger includes points outside the plotting window.

Enter coefficients and a through ±1,000,000 with up to 12 decimal places. Use a positive plot radius from 0.000000000001 to 1,000,000. Rational arithmetic and exact quadratic radicals determine the contacts and window inclusion. Graphs sample 65 uniform offsets. The curve view measures height relative to f(a), and the signed-gap view subtracts the line before plotting. A very narrow gap or an intersection between samples may be easier to inspect in the exact ledger.

Worked Example

If you input:

  • Polynomial: x⁴ − 4x² + x + 1
  • Tangent x: 0
  • Plot radius: 2.2

Result:

The tangent is y = x + 1. The gap is h²(h² − 4), so the curve touches the line from below at x = 0 and crosses it again at x = −2 and x = 2.

Frequently Asked Questions

Can a tangent cross the curve at the point of tangency?

Yes. At contact order three the curve and tangent have equal slopes, yet the signed gap changes sign. Odd gap multiplicity indicates a crossing.

Can the same line be tangent to a quartic twice?

Yes. For f(x) = x²(x−2)², the line y = 0 touches at x = 0 and x = 2. Both zeros have multiplicity two.

Does the graph window change the number of intersections?

The graph window controls which exact contacts are drawn. The ledger always lists all real isolated intersections and marks those outside the view.

Why are there no isolated intersections for a linear function?

A line and its tangent coincide at every point, so the gap polynomial is identically zero.

Similar Calculators