# How do you use the intermediate value theorem to explain why f(x)=x^2-x-cosx has a zero in the interval [0,pi]?

Jan 8, 2017

See explanation...

#### Explanation:

The intermediate value theorem tells us that if $f \left(x\right)$ is a function continuous on an interval $\left[a , b\right]$ and $y \in \left[f \left(a\right) , f \left(b\right)\right]$ (or $y \in \left[f \left(b\right) , f \left(a\right)\right]$ if $f \left(b\right) < f \left(a\right)$), then there is some $x \in \left[a , b\right]$ such that $f \left(x\right) = y$.

In our example:

$f \left(x\right) = {x}^{2} - x - \cos x$

$f \left(x\right)$ is continuous on $\left[0 , \pi\right]$ (in fact on the whole of $\mathbb{R}$)

$f \left(0\right) = 0 - 0 - \cos \left(0\right) = - 1 < 0$

$f \left(\pi\right) = {\pi}^{2} - \pi - \cos \left(\pi\right) = \pi \left(\pi - 1\right) + 1 > 3 \left(3 - 1\right) + 1 = 7 > 0$

So $0 \in \left[f \left(0\right) , f \left(\pi\right)\right]$ and by the intermediate value theorem, there is some $x \in \left[0 , \pi\right]$ such that $f \left(x\right) = 0$