If $(u(x,y))^2+u(x,y)v(x,y)$ has a local maximum or minimum in $D$, then $f$ must be constant? 
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!

I didn't think about it much, so I don't know if it helps for the answer, but we can show that $(u(x,y))^2+u(x,y)v(x,y)$ is constant.
For seeing this you should first calculate the Laplace operator of $f$, i.e. $\triangle f$ and see that $-\triangle f\leq 0$ everywhere. You need to use the Cauchy-Riemann-equations for this.
Since an analytic function is smooth, we can use that $f\in C^2$ is subharmonic iff. $-\triangle f\leq 0$ everywhere.
You can now use the maximum principle for subharmonic functions.
