I'm trying to solve a recurrence relation for a function of three variables. It works with 2 variables but not with 3. A simple example is:

RSolve[a[i + 1, j + 1, l + 1] == a[i, j, l] + 3, a[i, j, l], {i, j, l}]

Do you have any idea how to solve this?

Edit: The actual recurrence relation i want to solve is the following:

$$ C\left(h_1+1,h_2,h_3\right)=\frac{\left(h_1+h_2-h_3\right) C\left(h_1,h_2,h_3\right)}{2 h_1+2 \text{j}_1-k-2}\\ C\left(h_1,h_2+1,h_3\right)=\frac{\left(h_1+h_2-h_3\right) C\left(h_1,h_2,h_3\right)}{2 h_2+2 \text{j}_2-k-2} \\ C\left(h_1,h_2,h_3-1\right)=\frac{\left(h_1+h_2-h_3\right) C\left(h_1,h_2,h_3\right)}{2 h_3-2 \text{j}_3-3 (k+2)} $$ It can be brought into the form of my original question of course. However I know the solution to the problem already, it is a combination of Gamma-functions. But I am interested on how to solve it with Mathematica so I can use it on more complicated relations that will appear in the future.

  • 3
    $\begingroup$ This example may be too simple. Can you provide the actual recurrence relation that you are trying to solve? $\endgroup$
    – bbgodfrey
    Commented Dec 13, 2019 at 2:12
  • $\begingroup$ I have provided the actual recurrence relation i want to solve in the original post. As I stated there, I know the solution to it already. But I'd like to know if it's possible to solve it in Mathematica, so I can solve other problems like it. $\endgroup$
    – Timbo
    Commented Dec 14, 2019 at 9:38
  • $\begingroup$ Please verify the third equation of your edit. I would expect the left side to be C[h1, h2, h3 + 1] rather than C[h1, h2, h3 - 1]. I know how to answer your question but wish to be sure that the equations are correct before doing so. $\endgroup$
    – bbgodfrey
    Commented Dec 14, 2019 at 19:25
  • $\begingroup$ The C[h1,h2,h3-1] is correct as it stands. $\endgroup$
    – Timbo
    Commented Dec 16, 2019 at 8:57
  • $\begingroup$ Is the recurrence equation do you wish to solve the composite of the three equations above, C[h1 + 1, h2 +1, h3 + 1] == f[I, j, l] C[h1, h2, h3.] Or, do you wish to solve the set of three equations explicitly? The former can be solved without difficulty in terms of Gamma functions. The latter is overdetermined, unless specific constraints are placed on the initial conditions. $\endgroup$
    – bbgodfrey
    Commented Dec 17, 2019 at 16:22

1 Answer 1


The question as first posted can be answered as follows. First, consider the 2D case,

RSolve[a[i + 1, j + 1] == a[i, j] + 3, a, {i, j}] // Flatten
(* {a -> Function[{i, j}, 3 i + C[1][i - j]]} *)

By inspection, the 3D case must have as its answer,

{a -> Function[{i, j, l}, 3 i + C[1][j - i, l - i]]}

as can be verified by

Simplify[(a[i + 1, j + 1, l + 1] == a[i, j, l] + 3) /. %]
(* True *)

More generally, a[i + 1, j + 1, l + 1] == a[i, j, l] + f[i, j], a, {i, j, l} must have as its solution

{a -> Function[{i, j, l}, 
    Sum[f[m, j - i + m, l - i + m], {m, 0, i - 1}] + C[1][j - i, l - i]]}

which can be verified as above. Likewise, a[i + 1, j + 1, l + 1] == a[i, j, l]*f[i, j], a, {i, j, l} must have as its solution

{a -> Function[{i, j, l}, 
    Product[f[m, j - i + m, l - i + m], {m, 1, i - 1}]*C[1][j - i, l - i]]}

Presumably, these can be applied to the additional request edited into the question, once its meaning has been clarified.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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