Suppose $f$, $g:G \to \mathbb{C}$ are defined on a domain $G \subseteq \mathbb{C}$ and are differentiable on $G$. Then, if $f^{\prime} = g^{\prime}$, then $f = g + C$ for some constant $C$.
I attempted to prove this using the expression of $f^{\prime}$ as the sum of partial derivatives - namely, if $f(z) = u(x,y)+iv(x,y)$ and $g(z) = t(x,y) + iw(x,y)$, then $f^{\prime} = g^{\prime}$ implies that $u_{x}(x,y) + i v_{x}(x,y) = t_{x}(x,y) + iw_{x}(x,y)$ (where $u_{x}(x,y)$ is the partial derivative of $u$ with respect to $x$).
This in turn implies that $u_{x}(x,y)=t_{x}(x,y)=w_{y}(x,y)$ by the Cauchy-Riemann equations, so $\int w_{y}(x,y)dy = w(x,y) + h(x)$, where $h$ is a function solely of $x$.
Also, $v_{x}(x,y) = w_{x}(x,y) = -t_{y}(x,y)$ by the Cauchy-Riemann equations, so $\int -t_{y}(x,y) dy = -t(x,y) + j(x)$, where $j$ is a function solely of $x$.
But all this tells me is that I can express $g$ as $w(x,y) + h(x) + i(t(x,y)-j(x))$, it doesn't say anything about $f$ equaling it.
Needless to say, I'm stuck, and am not sure how to proceed with this proof. Please help.
Hint: Suppose $h=u+iv$ is differentiable on $G.$ Show $h'(z) = u_x(z) +iv_x(z)$ for all $z\in G.$ Thus if $h'\equiv 0$ on $G,$ then $u_x,v_x\equiv 0$ in $G.$ Use the CR equations to to conclude $\nabla u, \nabla v \equiv 0$ on $G.$ Now you're back in several variable real calculus.