Find all holomorphic functions $f$ in $D(0;1)$ such that $f\left(\frac{1}{n}\right)=n^2f\left(\frac{1}{n}\right)^3$.
What I did:
We have that $f\left(\frac{1}{n}\right)^2=\frac{1}{n^2}$. Let $g(z)=f^2(z)$. Then $g(z)=z^2$ in the set $S=\left\{\frac{1}{n} : n=1,2,\dots \right\}$. Now, $0$ is an accumulation point of $S$ belonging to $D(0;1)$, so by the Identity Theorem, $g(z)=z^2$ in $D(0;1)$. Then $$f(z)=\pm z$$
Is this okay? I tried some values for $f$ and it matches the expected result, but I was expecting a broader family of functions satisfying the property above so I'm not sure if I arrived to the right result. Thanks in advance!
In fact from your conditions either $f(1/n)^2=1/n^2$ or $f(1/n)=0$. So either $f(z)-z$, $f(z)+z$ or simply $f(z)$ has a sequence of zeroes accumulating at 0. This implies $f(z)=z$, $f(z)=-z$ or $f(z)=0$.