Real Analysis question second derivative = 0 Let $f: \mathbb{R}^2 \rightarrow  \mathbb{R}$ be twice differentiable such that $\frac{\partial ^2f}{\partial x\partial y} = 0$. Prove that
exists functions $ϕ: \mathbb{R} \rightarrow  \mathbb{R}$ and $ψ: \mathbb{R} \rightarrow  \mathbb{R}$, twice differentiable functions, such that $$f(x, y) =
ϕ(x) + ψ(y).$$
In this question i tried use the Schwarz Theorem, i know that in $\mathbb{R}^2$ (a open set) $\frac{\partial }{\partial y}\left(\frac{\partial f}{\partial x}\right)=\frac{\partial \:}{\partial \:x}\left(\frac{\partial \:f}{\partial \:y}\right)$ for all $x,y \in \mathbb{R}^2$ and the condition of the problem we have that $\frac{\partial \:f}{\partial \:y}$ = $g(y)$ + c and $\frac{\partial f}{\partial x} = h(x)+ d$, (c,d constants), how am i proceed with the information that $\frac{\partial f}{\partial x}$ only depends $x$ and $\frac{\partial \:f}{\partial \:y}$ only depends $y$? am i in the right way?
 A: As you say, we can conclude that
$$
\frac{\partial f}{\partial y} = g(y),
\qquad
\frac{\partial f}{\partial x} = h(x),
$$
for some functios $g, h$ (we can fold the constants $c$, $d$ into these functions, since $g(y) + c$ is a functino of $y$ only just the same as $g$).
Now, we can explicitly build $f$ from these functions using integration.
In particular, we have that
\begin{align*}
f(x, y) - f(0, 0)
&= [f(x, y) - f(x, 0)] + [f(x, 0) - f(0, 0)] \\
&= \int_0^y \frac{\partial f}{\partial y}(x, t) dt + \int_0^x \frac{\partial f}{\partial x}(s, 0) ds \\
&= \int_0^y g(t) dt + \int_0^x h(s) ds.
\end{align*}
Now we can finish by taking
$$
\psi(y) = \int_0^y g(t) dt,
\qquad
\phi(x) = \int_0^x h(t) dt + f(0, 0).
$$
Of course, the constant $f(0, 0)$ can be distributed betwen $\psi$ and $\phi$ however we want.
A: We have $\frac {\partial}{\partial y}(\frac {\partial f}{\partial x})(x,y)=0\implies \frac {\partial f}{\partial x}(x,y)=g(x)+c\implies f(x,y)=\int g(x)dx+cx+ψ(y)=φ(x)+ψ(y),$ where we set $φ(x):=\int g(x)dx+cx$.
