Let f:R→R be continuous and let S={x∈R:f(x)=0} be the set of all roots of f. Prove that S is a closed set.

How would you prove the above using the following: Let f : D→R be continuous at a point a∈D,and assume f(a)>0. Prove that there exists a δ > 0 such that f (x) > 0 for all x ∈ D ∩ (a − δ, a + δ).

I know I would need to use problem 2 to show that the compliment of S is open but Im not sure how.

Use the fact that for every . Then using the basic idea of how you must have proven your second statement you can prove that the preimage of an open set is open and thus using that set-theoretic identity I mentioned the preimage of a closed set is closed.

Use the fact that for every . Then using the basic idea of how you must have proven your second statement you can prove that the preimage of an open set is open and thus using that set-theoretic identity I mentioned the preimage of a closed set is closed.

So wait, I'm confused on how the second statement is used to prove the pre image of an open set is open.