Let $f : [a, b]\to R$ be a continuous function such that $[a,b] \subset [f(a), f(b)]$. Prove that there exists $x\in [a,b]$ such that $f(x) = x$.
My attempt: I said let there be a $\delta > 0 $and defined $c$ and $d$ to be $x + \delta$ and $x-\delta$ respectively. From here since $f$ is continuous $[f(c), f(d)]\subset [f(a), f(b)]$. Then I assumed by definition $[c,d]$ is also a subset of $[f(c), f(d)]$. Then I claimed $\delta$ can be arbitrarily small so that $f(c) = f(d) = f(x)$.
Is this correct or is there a better approach?