$ f(x)=f(x+1) $  and $ f(-1/x)=f(x)$ Is there any function $f$ which would satisfy $f(x)=f(x+1)$ and $f(-1/x)=f(x)$ for every $x$ or at least positive $x$? For the widest possible domains of $x$?
If I could turn this functional equation into differential equations, I could use some approximate analytic method to get the solution.
Thanks in advance.
In a more general case, is the a function $g$ so $ f \left( \frac{ax+b}{cx+d} \right) = g(x)$?
For real $a$, $b$, $c$ and $d$?
 A: (Edit)
You have
$$\frac{-1}{\frac{-1}{\frac{-1}{x}+1}+1}=x-1,$$
so 
$$f(x)=f\left(\frac{-1}{x}\right)=f\left(\frac{-1}{x}+1\right)=\dots =f\left(\frac{-1}{\frac{-1}{\frac{-1}{x}+1}+1}\right)=f(x-1),$$
and so you can even explicitly shift to the left. One can actually construct any continued fraction and so you see that the function takes the same value on all rational values (even for only a finite number of operations for each number). 
Due to $f(x)=f(x\pm 1)$ you have a grid with gap distance $1$ at the right of any starting value. There the function always take the same value, i.e. $f(n)=f(0)$ for all integers. Now consider $n=-2$, then $f(1/2)=f(-2)=f(0-2)=f(0),$ and consequently also $f(1/2+n)=f(0)$. So the grid really only has distance $1/2$. We can go on and collect more point with that value. Look at numbers with bigger absolute values, like $-3:\ f(1/3)=f(-3)=f(0)$. Obviously $f(1/n)=f(0)$ for any $n$. And so in general we have $f(1/n+m)=f(0)$ for all integers $n$ and $m$. Therefore also $f(1/(1/n+m))=f(0)$, and so $f(1/(1/n+m)+k)=f(0)$ and so on.

Sidenote: The first condition is obviously periodicity. And regarding the other condition, notice that whenever you have an operation $g$ with $g(g(x))=x$, like it is the case for $g(x)=-\frac{1}{x}$ or in fact all real functions that can be mirrored w.r.t. the $45°$ axis, then for any function $f$, the function $$\hat{f}(x):=f(x)+f(g(x))$$ fulfills $$\hat{f}(g(x))=f(g(x))+f(g(g(x)))=f(g(x))+f(x)=\hat{f}(x)$$
Actually, via the identity
$$f(x)=\frac{1}{2}\left(f(x)+f(g(x))\right)+\frac{1}{2}\left(f(x)-f(g(x))\right),$$
all functions have a part which fullfills the relation, except the ones which fulfill the anti-relation $f(g(x))=-f(x)$ for which that part is zero.
A: As stopple noted, the transformations $z \to z+1$ and $z \to -1/z$ generate the modular group.
For any two rationals $r$ and $s$ there is a transformation in this group that takes $r$ to $s$, and thus $f(r) = f(s)$.  In particular, if $f$ is continuous that says $f$ is constant.
A: I'm not sure if this is of interest, but if, instead of real $x$, you consider $z$ in the complex upper half plane, then the two linear fractional transformations
$$
z\to z+1,\quad z\to -1/z
$$
generate the modular group.  I.e., writing the linear fractional transformations as matrices, they generate $\text{PSL}_2(\mathbb Z)$.  The classical $j$ invariant 
http://en.wikipedia.org/wiki/J-invariant
is an example of a function invariant under the modular group
A: A very simple solution to these functional equations is any constant function of the form $f(x)=c$ for some constant $c$.  Let f(x)=3.  Then $f(x+1)=f(x)=f(-1/x)=3$.  
