Consider the following setup:
Two functions $f,g:\mathbb{R}^2\to\mathbb{R}$ that are twice continuously differentiable such that:
- $f(0,0)=g(0,0)$
- $f_x(0,0)=g_x(0,0)$
- $f_y(0,0)\neq g_y(0,0)$
Can we say the following: There is a small neighbourhood $U$ of $(0,0)$ such that $f(x,y)\neq g(x,y)$ for all $(x,y)\in U\setminus\{y=0\}$
The intuitive idea is:
- Close to (0,0), we can aproximate $f(x,y)=ax+by+$higher order terms
- Close to (0,0), we can approximate $g(x,y)=ax+cy+$higher order terms
- Therefore, close to (0,0), we can aproximate $f-g=(b-c)y+$higher order terms
Geometrically speaking:
- The tangent plane to the graph of f and the tangent plane to the graph of g intersect in a line whose projection to the xy plane is $\{y=0\}$.
- Since we take $(x,y)\in U\setminus\{y=0\}$, we are not on that line, so the planes are different.
This is not rigorous of course. I'm wondering if I should do some remainder estimate using Taylor, but that seems like a bit of a big hammer for first derivative approximation...
Consider the functions $$ f \equiv 0, \qquad g(x,y) =y- x^2. $$ They satisfy all your assumptions, but $f=g$ on $y=x^2$.
In your setting, by the implicit function theorem you can deduce that there exists a neighborhood of the origin such that, in that neighborhood, the equality $f=g$ holds only along a regular curve.