Can we give a definition of the cotangent based on a functional equation? I've recently learned that the cotangent satisfies the following functional equation:

$$\dfrac1{f(z)}=f(z)-2f(2z)$$

(true for $f(z)\neq 0$).
Can we solve this equation for real or complex functions $f?$ Can we give additional conditions such that $\cot$ is the only real or complex function satisfying these conditions and the equation? Or is there perhaps a different functional equation better suited for this purpose?
I'm asking this because I know about such a characterization of the real function $\exp$.
Please note that I know very little about functional equations. I've only seen two examples dealt with in my courses.
 A: This might be related. The Herglotz trick is essentially the statement that $\pi\cot(\pi z)$ is the unique meromorphic function $f(z)$ satisfying:
$f(z)$ is defined for $z\in\mathbb{C}\backslash\mathbb{Z}$
$f(z+1)=f(z)$
$f(-z)=f(z)$
$-f(z+\frac{1}{2})=f(z)-2f(2z)$
$\lim_{z\to0}\left(f(z)-\frac{1}{z}\right)=0$
A: Suppose that $\;f(z) = g(rz)\;$ where $\;r\;$ is the residue of the pole at
 $\;z=0.\;$ Assuming that the Laurent series expansion of $g$ is $\;g(z) = 1/z +\sum_{n=0}^\infty c_n z^n,\;$ then the functional equation rewritten as
$\;0 = f(x)(f(x)-2f(2x))-1\;$ gives $\;0=-c_0/x+(-1-c_0^2-3c_1)+O(x)\;$ and solving for the coefficients gives $\;c_0=0,\; c_1=-\frac13,\;c_2=0,c_3=-\frac1{45},\cdots\;$ which gives $g(z)=\cot(z).\;$ Thus the solution is
$f(z)=\cot(rz).\;$
There are many other functional equations for $f(x):=a\cot(bx),$ including homogenous quadratic equations in one variable such as
$\;0 = f(x)^2-3f(x)f(2x)+f(x)f(3x)+f(2x)f(3x)\;$ and $\;0=f(x)^2-2f(x)f(2x)-f(2x)^2+2f(2x)f(4x).$
