0
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ There seems to be a syntax error in your second RSolve expression. $\endgroup$ – mikado Jun 29 '16 at 21:41
  • $\begingroup$ Sorry, that happened during the copy/pasting, I fixed it now. $\endgroup$ – flawr Jun 29 '16 at 21:47
  • $\begingroup$ 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 $\endgroup$ – mikado Jun 29 '16 at 22:01
  • $\begingroup$ @mikado Yes that is why I included that verison, but the first one does not seem to work, can you confirm that? $\endgroup$ – flawr Jun 29 '16 at 22:13
  • $\begingroup$ 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. $\endgroup$ – mikado Jun 29 '16 at 22:16
1
$\begingroup$

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};
leqn = Map[Log, eqn, {2}] // PowerExpand
transform = {Log[f[u_]] -> lf[u], Log[h[u_]] -> lh[u]};
lsoln = RSolve[leqn /. transform, {lf[n], lh[n]}, n]
{f[n] == Exp[lf[n]], h[n] == Exp[lh[n]]} /. lsoln
$\endgroup$
  • $\begingroup$ Nice, thank you very much! Could you explain what /. is doing / give me a reference? I tried googling it but obviously without success=) $\endgroup$ – flawr Jun 29 '16 at 22:43
  • $\begingroup$ @flawr, instead of googling it, highlight it in the notebook you have and press F1. $\endgroup$ – J. M. is away Jun 29 '16 at 23:05
  • $\begingroup$ Oh great, thank you! $\endgroup$ – flawr Jun 30 '16 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.