TITLE: Counterintuitive PDE
QUESTION [7 upvotes]: After thinking about it for a while and consulting other students, no one seems to be able to find an example of the following:
Given the PDE 
$\dfrac{\partial f}{\partial x} = 0 \quad $      on $U = { (x,y) \in \mathbb R^2 ; y>0, 1 < x^2 + y^2 < 4}$
I am looking for a solution $f$ that does not only depend on $y$.
How can this be?!
The exercise is taken form Lee's "Introduction to smooth manifolds", p. 517 at the end of the chapter on the Frobenius theorem.
(Note: According to the errata, the condition on $U$ is $y > 0$, not $x > 0$ as your copy of the book might state).
Thanks in advance!
S. L.

REPLY [5 votes]: I will use the corrected version mentioned by Douglas, i.e.  $U$ will be the domain defined by $y>0$ and $1< x^2 +y^2< 4$. Consider a $C^\infty$ function $\phi (y)$ which is equal to $1$ for negative $y$, $0$ for $y\geq 1/2$ and strictly decreasing for $0 < y < 1/2$. 
The required function $f$ is then defined by:
$f(x,y) =-\phi (y)$ if $(x,y)\in U$ and $x\leq 0$
$f(x,y) =+\phi (y)$ if $(x,y)\in U$ and $x\geq 0$.
It does not only depend on $y$ since $f(-3/2,1/4)<0$ and $f(+3/2,1/4)>0$. Nevertheless we do have $\dfrac {\partial f}{\partial x}=0$
PS The Mean Value Theorem doesn't apply because the segment joining the two points $(-3/2,1/4)$ and $(+3/2,1/4)$ (for example) is not entirely included in $U$.