# How to get solutions for recursive relations using RSolve?

I have

$$a(x,t+2) - a(x,t) = -\cos{\theta} [a(x+1,t+1) + a(x-1,t+1)]$$ Setting $$t' = -t\cos(\theta)$$ fetches under the continuum approximation $$2 \frac{\partial a(x,t')}{\partial t'} = a(x-1,t') - a(x+1,t')$$ which resembles Bessel functions's recurrence relations.

I used RSolve but it is of no help.

In[1]:= RSolve[a[x, t + 2] - a[x, t] - a[x - 1, t + 1] + a[x + 1, t + 1] == 0, a[x, t], {x, t}]
Out[1]= RSolve[-a[-1 + x, 1 + t] - a[x, t] + a[x, 2 + t] + a[1 + x, 1 + t] == 0, a[x, t], {x, t}]


Also, I tried using partial differential equation version which wasn't helpful either.

In[6]:= RSolve[2 D[a[x, t], t] - a[x - 1, t + 1] + a[x + 1, t + 1] == 0, a[x, t], {x, t}]
Out[6]= RSolve[-a[-1 + x, 1 + t] + a[1 + x, 1 + t] + 2*Derivative[0, 1][a][x, t] == 0, a[x, t], {x, t}]


This is one of the cases I have to verify and I have several such equations for which I don't know the solutions.

• Your first attempt, RSolve[a[x, t + 2] - a[x, t] - a[x - 1, t + 1] + a[x + 1, t + 1] == 0, a[x, t], {x, t}], works just fine (with result a[x, t] -> C[1][-t + x] + (-1)^t C[2][t + x]). Is this what you wanted? Jul 6 '19 at 20:09
• ... also, what are the initial conditions? note that the trivial solution $a(t,x)\equiv0$ solves your equations, but I guess it does not satisfy your initial conditions? Jul 6 '19 at 20:15

Without boundary/initial conditions, the problem is incomplete. For example, being homogeneous, we always have the trivial solution $$a(t,x)\equiv0$$. A more general solution is, for example, (letting $$\alpha:=\cos\theta$$ and $$n\in\mathbb Z$$), $$a(t,x)=f_1(t-x)+(-1)^{nt}f_2(t-x)$$ where $$f_i$$ is any pair of periodic functions $$f_i(r)\equiv f_i(r+2)$$:
a[x, t + 2] - a[x, t] + α (-a[x - 1, t + 1] + a[x + 1, t + 1]) == 0 /. a -> (f1[#1 - #2] + (-1)^(#1 n) f2[#1 - #2] &)