Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Roots of a Function Calculator

How to use
  1. Type the function in the f(x)f(x) box, for example x3−3xx^3 - 3x or sin⁡(x)−12\sin(x) - \dfrac{1}{2}. Learn more about entering the function
  2. Set the range to search in From a and To b. Only roots between aa and bb are listed.
  3. Read the roots under Roots. They are also marked on the graph, where the curve meets the xx-axis. Learn more about reading the answer
  4. Change the function or the range and the answer follows at once. Drag or zoom the graph to look around a root.

Roots
Roots
x=−1.7321,x=0,x=1.7321\displaystyle x = -1.7321,\quad x = 0,\quad x = 1.7321
How it was found

Look for the xx where f(x)=x3−3xf(x) = {x}^{3}-3 x is zero, between −5-5 and 55.

Each root is found where the sign of ff changes (or where the graph just touches the axis) and then narrowed down numerically.

3 found.

f(x)=x3−3xf\left(x\right)={x}^{3}-3 x


Finding the roots

DemoFind the roots
Step 0 of 4
Type the function in the f(x)f(x) box and the calculator lists every root it finds between From a and To b, and marks each one on the graph. The roots are worked out again as you type, so you can change one number in the formula and watch the roots move.

The range matters. A function such as sin⁡(x)\sin(x) has infinitely many roots; the calculator reports the ones inside the range you set. If a root you expect is missing, widen the range.

Reading the answer

DemoNo roots, touching roots
Step 0 of 4
    The Roots box lists the roots from left to right, each written as x=…x = \ldots with up to four decimals. Below it, How it was found says where the calculator looked and how many roots it found.

    Three cases are worth knowing:

  • No roots: the curve stays on one side of the xx-axis, as x2+1x^2 + 1 does. The answer says so.
  • A touching root: the curve comes down to the axis and goes back up, as (x−1)2(x - 1)^2 does at x=1x = 1. It is still a root, and it is found.
  • A break is not a root: 1x\dfrac{1}{x} is negative left of 00 and positive right of it, but it never equals 00; it jumps. The calculator does not list such a point.

What a root is

A root (or zero) of a function ff is a number xx with f(x)=0f(x) = 0. On the graph of y=f(x)y = f(x) the roots are the points where the curve meets the xx-axis, because that is where y=0y = 0. They are also called the xx-intercepts.

For f(x)=x2−x−2f(x) = x^2 - x - 2, the roots are x=−1x = -1 and x=2x = 2: indeed (−1)2−(−1)−2=0(-1)^2 - (-1) - 2 = 0 and 22−2−2=02^2 - 2 - 2 = 0. Factoring shows the same thing, since x2−x−2=(x+1)(x−2)x^2 - x - 2 = (x + 1)(x - 2), and a product is zero exactly when one of its factors is.

Solving any equation can be turned into finding roots: g(x)=h(x)g(x) = h(x) holds exactly where g(x)−h(x)=0g(x) - h(x) = 0.
The roots of x2−x−2x^2 - x - 2: where the curve meets the xx-axis.

How the roots are found

    The calculator works numerically. It samples the function many times across the range and looks for two kinds of places:

  • A change of sign: where ff goes from negative to positive or back, the curve must cross the axis in between, as long as it does not jump. The crossing is then narrowed down by halving the interval again and again until it is pinned to many decimals.
  • A lowest or highest point at zero: a curve such as (x−1)2(x - 1)^2 touches the axis without changing sign. The calculator also checks the turning points of ff and keeps those where the value is zero.

  • A change of sign across a jump or a vertical asymptote is thrown away, because the value never actually reaches zero there.
(x+2)(x−1)2(x + 2)(x - 1)^2 crosses the axis at −2-2 and touches it at 11.

Roots of polynomials

A polynomial of degree nn has at most nn real roots. A line has at most one, a parabola at most two, a cubic at most three.

An odd degree guarantees at least one real root, because the two ends of the graph go in opposite directions: x3+2x^3 + 2 falls to −∞-\infty on the left and rises to +∞+\infty on the right, so it must cross the axis once, at x=−23≈−1.26x = -\sqrt[3]{2} \approx -1.26. An even degree can have none at all.

A root found twice, as in (x−1)2(x - 1)^2, counts twice: it is a double root, and the graph touches the axis there instead of crossing it.
x3−4xx^3 - 4x has three roots; x3+2x^3 + 2 has one.

Functions with breaks and asymptotes

A rational function such as x−1x+1\dfrac{x - 1}{x + 1} has its roots where the numerator is zero and its denominator is not: here x=1x = 1. Where the denominator is zero, at x=−1x = -1, the function is not defined at all, and its graph has a vertical asymptote.

Near an asymptote the values jump from very negative to very positive. That change of sign is not a root, and the calculator does not report one. The same goes for tan⁡(x)\tan(x) at π2\dfrac{\pi}{2}, or for 1x\dfrac{1}{x} at 00.
1x\frac{1}{x} has no root; x−1x+1\frac{x - 1}{x + 1} has one, at x=1x = 1.

Exact and decimal answers

The calculator gives decimal answers, rounded to four places: the roots of x3−3xx^3 - 3x appear as −1.7321-1.7321, 00 and 1.73211.7321. The exact values are −3-\sqrt{3}, 00 and 3\sqrt{3}; the decimals agree with them to the places shown.

A root that is a whole number is shown as one, so the roots of x2−4x^2 - 4 come out as −2-2 and 22; the roots of sin⁡(x)\sin(x) come out as 00, 3.14163.1416, 6.28326.2832, which are 00, π\pi and 2π2\pi. To get an exact form for other roots, factor the function or use the quadratic formula, then compare with the decimals here.

Common mistakes

  • Reading the yy-intercept as a root. The yy-intercept is f(0)f(0), where the curve meets the yy-axis. A root is where it meets the xx-axis.
  • Counting an asymptote as a root. A sign change across a break is not a zero.
  • Missing roots outside the range. Only roots between aa and bb are listed; a cubic may hide a root just past the edge.
  • Forgetting touching roots. x2−2x+1=(x−1)2x^2 - 2x + 1 = (x - 1)^2 has a root at x=1x = 1 even though the curve never crosses the axis.
  • Dividing by xx when solving. Solving x3=xx^3 = x by dividing both sides by xx loses the root x=0x = 0; writing it as x3−x=0x^3 - x = 0 keeps all three.