I have a question on an application of the implicit function theorem.
Let $f:\mathbb{R}^2 \to \mathbb{R}$ be a $C^1$ function such that $\frac{\partial f}{\partial y}(x,y) \neq 0$ for every $(x,y) \in \mathbb{R}^2$.
Assume that there exists a function $h:\mathbb{R} \to \mathbb{R}$ such that $f(x,h(x))=0$ for every $x \in \mathbb{R}$.Is $h$ necessarily continuous on $\mathbb{R}$ ?
My attempt: Fix $x_0$ and consider the point $(x_0,h(x_0))$.Applying the implicit function theorem, there exist an open set $U \ni x_0$, an open set $V \ni h(x_0)$ and a function $g \in C^1(U,V)$ such that: 1) $f(x,g(x))=0$ for every $x \in U$ and 2) For every $(x,y) \in U\times V$, we have $f(x,y)=0$ equivalent to $y=g(x)$.
Take $x$ close to $x_0$ and let's see if $h(x) \to h(x_0)$. We have $x \in U$. If $h(x) \in V$, then this is ok: $(x,h(x)) \in U\times V$ and $f(x,h(x))=0$ imply that $h(x)=g(x)$, thus $h(x)=g(x) \to g(x_0)=h(x_0)$.However, I see absolutely nothing that guarantees that $h(x) \in V$ ??
Some help or a counterexample would be appreciated.