**INTRO:**

If you don't feel like reading the justification for my question, just skip down to the question.

Some recurrence relations can be solved by finding **invariants**, or quantities that remain unchanged. For example, consider the sequences defined by
$$a_{n+1}=\frac{a_nb_n}{a_n+b_n+1}$$
$$b_{n+1}=a_n+b_n$$
$$a_0=b_0=-1$$
If one defines the function $\mu$ as
$$\mu (x,y)=x+xy+y$$
then it is easily proven that
$$\mu (x,y)=\mu\bigg(\frac{xy}{x+y+1}, x+y\bigg)$$
From this, it follows that
$$\mu (a_{n+1}, b_{n+1})=\mu (a_n,b_n)$$
and
$$\mu (a_n,b_n)=\mu(a_0,b_0)$$
$$\mu (a_n,b_n)=-1$$
$$a_n+a_nb_n+b_n=-1$$
$$a_n=\frac{-1-b_n}{1+b_n}$$
$$a_n=-1$$
and so
$$b_{n+1}=-1+b_n$$
$$b_{n+1}=b_n-1$$
...yielding explicit formulas for $a_n$ and $b_n$:
$$a_n=-1,\space\space\space b_n=-1-n$$

This was perhaps a trivial (and manufactured) example, but it demonstrates how invariants are used to solve recursions.

**QUESTION:**

I would like to know the following: what are some methods used to find invariants? That is, what methods might one use to find a particular nontrivial solution $\mu$ to the functional equation $$\mu(x,y)=\mu(f(x,y),g(x,y))$$ where $f,g$ are given?