I would like to solve the following algebraic linear q-difference equation:

\begin{equation} a\left(x\right)f\left(x\right)=f\left(qx\right) \end{equation}

The parameter $q$ is real, positive and smaller than $1$, while the functions $a\left(x\right)$ and $f\left(x\right)$ are $\mathbb{R}\rightarrow\mathbb{R}$. Moreover $a\left(x\right)$ is known, continuous and such that $a\left(0\right)=0$ (this is an important constraint), and I would like to calculate $f\left(x\right)$. So for example we can consider the functional equation $xf\left(x\right)=f\left(qx\right)$.

Do you know how to calculate $f\left(x\right)$?

Thanks in advance for your help!

**EDIT:**

Please observe that $f\left(0\right)=0$ and that the solution for $x<0$ doesn't depend on the solution for $x>0$, so for example we can have $f\left(x\right)=0$ only for $x\leq0$ and not for $x>0$, or viceversa.