Need help with a question about analytic functions on a simply connected domain. [duplicate]

This question already has an answer here:

Let $V\subseteq\mathbb{C}$ be a simply connected domain such that $V\neq\mathbb{C}$, with $a,b\in V, a\neq b.$ Prove that if $g:V\rightarrow V$ is analytic with fixpoints $a,b$, then $\forall z\in V, g(z) = z$.

Here's my attempt at a solution.

Let $$f(z) = g(z) - z.$$ As $V$ is simply connected, for every cycle $\gamma\in V$, $$0 = \int_{\gamma}{f(z)}dz = \int_{\gamma}{(g(z)-z)}dz = \int_{\gamma}{g(z)}dz - \int_{\gamma}{z}dz,$$ so for every cycle $\gamma\in V$, $$\int_{\gamma}{g(z)}dz = \int_{\gamma}{z}dz.$$

This can only be the case if $\forall z\in V, g(z) = z$, so we are done.

I'm not sure whether my last line is correct or not, but I have a feeling that it isn't. Could anyone either confirm that this is a correct proof or point me in the right direction if it's incorrect? Thanks!

marked as duplicate by Martin R, mrf complex-analysis StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 25 '17 at 13:56

• The last conclusion does not work, $\int_{\gamma}{g(z)}dz = 0$ always holds in a simply connected domain. Also you did not use the fact that $g$ has two fixpoints. – Can you use the Riemann mapping theorem? – Martin R Jan 25 '17 at 13:00
• It all looks fine...until the last line: that line integrals' equality is true for any pair of complex analytic functions on $\;V\;$ . Not only that: where did you use the fact that $\;g\;$ as two fixed points? – DonAntonio Jan 25 '17 at 13:03