Show there in no non constant analytic functions in disk unit s.t $f(z)=f(2z)$ I'm trying to solve the following

Show that there is no non constant analytic function in the unit disc such that $f(z)=f(2z)$.

My try: let $f$ be an analytic function in the unit disk such that $f(z)=f(2z)$.
Now, we can write $\displaystyle f\left(\frac{z}{2}\right)=f(z)$. The function is analytic, hence we can write $f(z)=\sum_{n=0}^{\infty}a_n z^n$. We have $\displaystyle \left|\frac{z}{2}\right|\le \left|z\right|<R$ where $R$ is the radius of convergence, thus $\displaystyle f\left(\frac{z}{2}\right)=\sum_{n=0}^{\infty}\frac{a_n}{2^n}z^n$.
Equating coefficients we get $\displaystyle \forall n: \frac{a_n}{2^n}=a_n$, thus we have $\forall n>0:a_n=0$, i.e $f(z)=a_0$, i.e $f$ is constant.
Is my reasoning correct? Why should we notice the unit disk?
Thank you!

[1]. Another way to show that $a_n=0$ for $n\geq 1$ is that for $0<r<1/2$ and $n\geq 1$ we have $$2 \pi i a_n=(2 \pi i/n!)(d^nf/dz^n)(0)=\int_{|z|=r}f(z)z^{-n-1} \;dz=$$ $$=\int_{|z|=r}f(2 z)z^{-n-1}\;dz=\int_{|z|=r}f(2 z)(2 z)^{-n-1}2^n\;d(2 z)=$$ $$=2^n\int_{|y|=2 r} f(y)y^{-n-1}\;dy= 2^n(2 \pi i/n!)(d^nf/dz^n)(0) =2^n(2 \pi i a_n).$$ 
[2]. Different proof. (i) Prove that if $g:[0,1)\to \mathcal C$ is continuous and $g(x)=g(2 x)$ for $x\in [0,1)$ then $g$ is constant. (ii) For  $r\in [0,1)$ and $t\in \mathcal R,$ we have $$f'(r e^{i t})=\lim_{s\to r^+} (f(s e^{i t})-f(r e^{i t})) /((s-r)e^{i t}).$$ Observe that $g_t(x)=f(x e^{i t})$, satisfies $g_t(x)=g_t(2 x)$ for $x\in [0,1).$ So $f'=0$.
For a proof of (i), if $x\in (0,1)$ then $g(0)=\lim_{n\to \infty}g(x 2^{-n})=\lim_{n\to \infty}g(x)=g(x).$
