I have been studying complex analysis (informally) for a while, and everything’s fine. But, I got stuck at a very simple problem today.
The book mainly want to show that, if the real part of an analytic function is given, its imaginary part can be determined uniquely up to a constant.
$f=u+iv$
Given $u=x^2-y^2$.
Then, $$dv=2(ydx+xdy)$$
Method 1:
Recognize that $$ydx+xdy=d(xy)$$, immediately $v=2xy+C$ which is the correct answer.
Method 2:
Since $x$ and $y$ are independent of each other, we have $$v=\int dv=2\int\left(ydx+xdy\right)=2\int ydx+2\int xdy=2y\int dx+2x\int dy=4xy+C$$ which is wrong.
What’s the problem?
When doing integration (and using it to find a primitive using FToC) its important to specify a domain. Your first attempt can be justified by considering the variable $w=xy$, which is then integrated along the real line. However, in the second attempt, you start off with a single integral, which you then split, and integrate one part along a curve of constant $x$ and varying $y$, and the other along a curve of constant $y$ and varying $x$, this us not permitted. If you want to use FToC for line integrals in high dimensional space then this is $$ \int_C \nabla f \cdot dl = f(x_1) - f(x_0) $$ where $x_0$ and $x_1$ are the start and end of the curve $C$ respectively.