$\Omega\subset\mathbb C$ is open connected and bounded, $f:\Omega\mapsto\Bbb C$ is holomorphic and continuous on $\overline{\Omega}$ and the real part $\mathfrak {R} f(z)$ attains its maximum at $a\in \Omega$. Show that $f$ is constant.
My attempt Let $R>0$ be small enough so that $\overline{B_R(a)}\subset\Omega$ and $\mathfrak R f(z)\le\mathfrak Rf(a)\ \forall z\in B_R(a)$
For any $0<r\le R$ there there is a (mean value) property that states $\mathfrak Rf(a)={1\over 2\pi}\int\limits_0^{2\pi}\mathfrak Rf(a+re^{it})dt$ and since $|a+re^{it}-a|=r$ we have $\mathfrak Rf(a)\ge \mathfrak Rf(a+re^{it})$ which implies
$$0={1\over 2\pi}\int\limits_0^{2\pi}\mathfrak Rf(a+re^{it})-\mathfrak Rf(a)dt\le0$$
Not how can I deduce that $\mathfrak Rf(a+re^{it})=\mathfrak Rf(a)~~\forall t\in[0,2\pi]$?
Or do I even need to have this equality for more than just one point on the circle?
One point on each circle of decreasing radius suffices to get a sequence of points with the equality and use the analytic continuation to conclude that $\mathfrak Rf(z)\equiv\mathfrak Rf(a)~~\forall |z-a|\le R$ and in fact $\forall z\in \Omega$ since $\Omega$ is connected
If what I wrote above is true could we prove the existence of a $t_n\in[0,2\pi]~\forall r_n={r\over n},~n\in\Bbb N$ by the (other, most known) mean value theorem on the closed cirle and $\mathfrak Rf(z)$ as the function?
Let $f$ be analytic on $\Omega$. Assume that at $z_0 \in \Omega$, $\Re(f(z_0))$ is a maximum of $f$ on $\Omega$. Then by the mean value property, (one verified this by Cauchy Integral Formula), we know for any $r>0$ such that $\overline{B_{r}(z_0)} \subset \Omega$ \begin{equation} 0 = \frac{1}{2 \pi} \int_{0}^{2 \pi} \Re(f(z_0)) - \Re(f(z_0+re^{it}) dt \end{equation} the integrand is positive as $z_0$ is a max of the real part, so one sees $\Re(f(z_0)) = \Re(f(z))$ on any $B_{r}(z_0)$ such that its closured is contained in $\Omega$. So the set \begin{equation} V = \{z: \Re(f(z)) = \Re(f(z_0))\} \text{ is open } \end{equation} But as the real part of $f$ is continuous, $V$ is closed since the pre-image of a singleton is closed for continuous functions. At the same time $V$ is non-empty, since $z_0 \in V$. Therefore, $V = \Omega$ since $\Omega$ is connected.
Then by the Cauchy-Riemann equations we know the imaginary part has zero derivative everywhere (the partials vanish on a connected set). Therefore, $f$ is constant on $\Omega$.