how to get the solution?

I take the next exercise from Apostol's book. I thought for a while , but nothing. Then I read the solution. I try to think: how did he get it , but nothing. I want to know how to get to the solution. So ...

exercise : A periodic function with period $a$ satisfies $f(x + a) =f(x)$ for a11 $x$ in its domain. What can you conclude about a function which has a derivative everywhere and satisfies an equation of the form $$f(x+a) = bf(x)$$ for a11 x, where $a$ and $b$ are positive constants?

solution: $f(x) = b^{\frac{x}{a}}g(x)$, where $g$ is periodic with period $a$.

• It is certainly much easier after knowing the solution: Consider the function $g(x)=b^{-x/a}f(x)$. Note that $$g(x+a)=b^{-x/a}b^{-1}f(x+a)=b^{-x/a}f(x)=g(x).$$ This completes the argument, and we even didn't use the fact that $f$ is differentiable. But it would be nice to see a deduction without knowing the solution. – John B Feb 8 '16 at 1:32
• Yeah you understand... I was trying but ¿?... I'm waiting a deduction... AJA – Elll Feb 8 '16 at 1:35