Find all functions of class $C^2$, $f:\mathbb R^2\to\mathbb R$ such that $\frac{\partial^2f}{\partial x \partial y} = 0$ Please can you help me to find
all functions of class $C^2$, $f:\mathbb R^2\to\mathbb  R$ such that $\frac{\partial^2f}{\partial x\partial y} = 0$.
Thank you so much!
 A: We will show that a $f\in C^2(\mathbb R^2)$ satisfies $\partial_x\partial_y f = 0$ iff there are $g,h \in C^2(\mathbb R)$ with $f(x,y) = g(x) + h(y)$ for all $x,y \in \mathbb R$. 
If we have $\partial_x \partial_y f = 0$, it follows that for $x,y \in \mathbb R$:
\begin{align*}
  \partial_y f(x,y) &= \partial_y f(0,y) + \int_0^x \partial_x\partial_y f(\xi,y) \, d\xi\\
   &= \partial_y f(0,y)
\end{align*}
and hence
\begin{align*}
  f(x,y) &= f(x,0) + \int_0^y \partial_y f(x,\eta)\, d\eta\\
         &= f(x,0) + \int_0^y \partial_y f(0, \eta)\, d\eta\\
         &= f(x,0) + f(0,y) - f(0,0)
\end{align*}
So if we let $g(x) := f(x,0)$, $h(y) := f(0,y) - f(0,0)$ we have $g,h \in C^2(\mathbb R)$ and $f = g\pi_1 + h \pi_2$ ($\pi_i \colon \mathbb R^2\to \mathbb R$ denoting the coordinate projections).
On the otherside, if $g,h \in C^2(\mathbb R)$ are such that $f = g\pi_1 + h\pi_2$, we have for $x,y \in \mathbb R$:
\begin{align*}
  \partial_x\partial_y f(x,y) &= \partial_x\partial_y \bigl(g(x) + h(y)\bigr)\\
        &= \partial_x h'(y)\\
        &= 0.
\end{align*}
