Let $f(z) = u(x,y)+iv(x,y)$ be an analytic function on a connected open set $D$ with $u(x,y)$ and $v(x,y)$ being the real and imaginary parts of $f(z)$, respectively. If $(u(x,y))^2+u(x,y)v(x,y)$ has a local maximum or minimum in $D$, then $f(z)$ must be a constant.
I am preparing for an upcoming final in complex analysis, and this question was given as a practice problem. The solution given seems very tedious and I suspect this can be proven with a simple contradiction. Since $D$ is open and connected, maybe we can assume $f$ is not constant and apply the open mapping theorem to arrive at a contradiction? Maybe apply the maximum modulus principle?
My apologies for the lack of work, I am not too sure how to attempt the problem. Any help would be much appreciated!