# Finding roots of a function in an interval

Does the equation $x^3-12x+2=0$ have three solutions in the interval $[-4,4]$?

We know that this is a continuous function because it's a polynomial, and so we can use the Intermediate Value Theorem to do this problem:

If $f(x)$ is continuous on $[a,b]$, let $M$ be any number between $f(a)$ and $f(b)$. Then there exists a number $c$ such that:

1) $a<c<b$
2) $f(c)=M$

If we define $M=0$, $a=-4$ and $b=4$, then $-4<c<4$ and $f(-4)<0<f(4)$.

Compute $f(-4)$ and $f(4)$ to show that $f(-4)<0<f(4)$
$\implies -14=f(-4)<0<f(4)<18$.

So I've shown that $M$ is between $f(-4)$ and $f(4)$, and thus there must be some number $c$ such that $f(c)=M=0$.

Is all of this correct?
How do I show that there are three solutions (roots) in this interval?
Thank you.

• Quadratic equations can have at most two solutions in any interval. Indeed, if we count roots according to multiplicity, a polynomial of degree $n$ will have exactly $n$ roots in the entire complex plane, which properly includes all real intervals. Nov 11, 2013 at 0:57
• I expect that the correct equation is $x^3-12x+2=0$, which does have three roots in $[-4,4]$.
– lhf
Nov 11, 2013 at 0:59
• @lhf thanks, that's what I meant, i fixed it to $x^3$. Nov 11, 2013 at 1:00
• @user436158 : hardmath's comment shows there are at most three such solutions (indeed, there are at most three distinct complex solutions). I would try plugging in the numbers -4, -3, ...,4 into the LHS of the equation and seeing if the function $f(x)=x^3-12x+2$ changes sign 3 times between $x=-4$ and $x=4$. Nov 11, 2013 at 1:03

I expect that the correct equation is $x^3-12x+2=0$, which does have three roots in $[-4,4]$ because $f(-4)<0$, $f(0)>0$, $f(1)<0$, $f(4)>0$. By the Intermediate Value Theorem, each sign variation gives you at least one root in that interval.
• thanks, but how did you get those values: $f(1)<0$, etc? Nov 11, 2013 at 1:05
• @user436158, I just evaluated $f(x)$ for $x=-4,-3,\dots,3,-4$ and chose nice ones.