I was given this task by my professor:
Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be defined by $f(x)=x^3-3x+1$ Show that $f$ has at least two zeros in the interval $I := [0,2]$.
My answer is:
Since $f:\mathbb{R}\rightarrow\mathbb{R}$ and $f$ is an polynomial it follows that f is continuous
$$f(0) = 1; f(0,5)=-0,375$$
by the intermediate value theorem since f(0,5) < 0 < f(0) $\Rightarrow \exists x_1\in[0;0,5]: f(x_1) = 0$ and since $[0;0,5] \subset [0,2]$ it follows that $f$ has at least one zero in the intervall $I:= [0,2]$
$$f(1) = -1; f(2) = 3$$
by the intermediate value theorem since f(1) < 0 < f(2) $\Rightarrow \exists x_2\in[1,2]: f(x_2) = 0$ and since $[1,2] \subset [0,2]$ it follows that $f$ has at least tow zeros in the intervall $I:= [0,2]$
q.e.d
Is this formally and content correct?
Yes, your proof is correct, good work !