# solving a non linear (log-linear) recurrence relation

I'd like to solve the recurrence relation

\begin{align*} f(n+1) &= 2 f(n)^2 h(n) \\ h(n+1) &= h(n) f(n) \\ f(2) & = h(2) = 2 \end{align*} for an explicit solution for $h$ and $f$. So far I found out that I can use RSolve and came up with following code:

RSolve[ {f[n + 1] == 2 f[n]^2 h[n], h[n + 1] == h[n] f[n], h[2] == 2, f[2] == 2}, {h[n], f[n]}, n ]


Whenever I enter this code, I just get the same code back so I must be doing something wrong, but I cannot find out what. Strangely it immediately returns a result if I enter decoupled recurrence relations with the exact same syntax.

RSolve[ {f[n + 1] == 2 f[n], h[n + 1] == h[n]^2, h[2] == 2, f[2] == 2}, {h[n], f[n]}, n ]


Both are basically simple affine recurrence relations if you logarithmise them, which could be solved by linear algebra. Can anyone spot the mistake I'm making?

• There seems to be a syntax error in your second RSolve expression. – mikado Jun 29 '16 at 21:41
• Sorry, that happened during the copy/pasting, I fixed it now. – flawr Jun 29 '16 at 21:47
• Your second RSolve works for me, returning terms like {f[n] -> 2^(-1 + 2^(-1 + n)), h[n] -> 2}. I'm using Mathematica 10.4 – mikado Jun 29 '16 at 22:01
• @mikado Yes that is why I included that verison, but the first one does not seem to work, can you confirm that? – flawr Jun 29 '16 at 22:13
• Like you, the first RSolve returns unevaluated very rapidly. I can't see any obvious mistakes in it, so I guess that Mathematica must recognise it as something it can't handle. – mikado Jun 29 '16 at 22:16

As you suggest, this can be solved quite easily with a Log transform. E.g.
eqn = {f[n + 1] == 2 f[n]^2 h[n], h[n + 1] == h[n] f[n], h[2] == 2, f[2] == 2};

• Nice, thank you very much! Could you explain what /. is doing / give me a reference? I tried googling it but obviously without success=) – flawr Jun 29 '16 at 22:43