Let $r>0$ and let $\mathbb{D}$ be an open disc of radius $r$ centred at $0$. Then let $f$ and $g$ be functions continuous on $\bar{\mathbb{D}}$, the closure of $\mathbb{D}$, holomorphic on $\mathbb{D}$, and satisfy $f(z)\ne 0 \ne g(z)$ on $\bar{\mathbb{D}}$, and $|f(z)|=|g(z)|$ for all $|z|=r$. Prove that $\exists \theta\in \mathbb{C}$, with $|\theta|=1$, such that $f(z)=\theta g(z)$, $\forall z\in \mathbb{D}$.
My approach:
Consider $h(z):=f(z)-g(z)$, then $|h(z)|=|f(z)-g(z)|$. If $|z|=r$ then $|h(z)|=0$. By the Maximum Modulus Principle, $|h(z)|$ attains a maximum on the boundary of $\mathbb{D}$. [$h(z)$ is holomorphic on $\mathbb{D}$ and continuous on $\bar{\mathbb{D}}$. Thus $|h(z)|\equiv 0$ on $\mathbb{D}$. But this implies that $|f(z)-g(z)|\equiv 0$ on $\mathbb{D}$. Hence, $\exists\theta$, with $|\theta|=1$, such that $f(z)=\theta g(z)$ (since $|g(z)|=|\theta||g(z)|=|\theta g(z)|=|f(z)|$.
$\blacksquare$
However, I've been communicated that my proof has one or more errors. Can someone please point out what the errors are?
Also, how do I align the black square on the right?
The assumption $|f(z)|=|g(z)|$ does not imply $f(z)-g(z)=0$. Try considering the quotient $f/g$ rather than $f-g$.