Help with solving this equation I'm very new to differential functional equations and I'm trying to solve the following:
$$\frac{\partial f(t,x)}{\partial t} + a f(t,x)+\frac{1}{x} f(t,x+1)+b = 0.$$
So what we know is that $t \in [0, T]$ and $x \geqslant 2 $ and integer for all$ t \in [0, T]$. We also know that $f(T, x) = 0$.
I'm very confused about this type of PDEs and don't know how to solve them.
I studied the method of characteristics and The Myshkys Method of Steps provided in this link for ordinary differential functional equations but I could not adapt their method to my problem. I also tried to use methods in this link, but it was very heavy for me and I didn't understand the material properly.
 A: Solving the above recurrence relation for $f(t,n+1):=f_{n+1}(t)$
$$f_{n+1}(t)=-n(\partial_t+a)f_n(t)-bn$$
Iterating this relationship $n-2$ times yields
$$f_{n+1}(t)=-(\partial_t+a)^{n-1}n!\frac{f_2(t)}{2!}-bn+abn(n-1)-a^2bn(n-1)(n-2)+...\\=(-(\partial_t+a))^{n-1}n!\frac{f_2(t)}{2!}-bn!\sum_{k=0}^{n-2}\frac{(-a)^k}{(n-k-1)!}$$
By the requirement that all functions for any observation $n$ vanish at time $T$ we obtain explicit values for combinations of derivatives of $f_2$ at that time:
$$\frac{1}{2}(\partial_t+a)^{n-1}f_2(t)\Big|_{t=T}=ba^{n-1}\sum_{k=1}^{n-1}\frac{(-a)^{-k}}{k!}$$
Furthermore, one can show that
$\sum_{n=0}^{\infty}\frac{(\partial_t+a)^{n}f(t)|_{t=T}}{n!}(t-T)^n=e^{a(t-T)}f(t)$
and therefore we can find the function $f_2(t)$ explicitly in terms of it's Taylor series:
$$f_2(t)=2!~b~e^{-a(t-T)}\sum_{n=1}^{\infty}\frac{(a(t-T))^n}{n!}\sum_{k=1}^{n}\frac{(-1/a)^{k}}{k!}$$
which can also be shown to have the integral representation
$$f_2(t)=2!~b~e^{-a(t-T)-1/a}\int_{-1/a}^{\infty}dx\frac{I_0(2\sqrt{a(t-T)x})-e^{a(t-T)x}}{x}e^{-x}$$
EDIT: It also appears to be the case that this solution admits another integral representation that allows for an analytic continuation to any $t\in \mathbb{R}$ (note that the previous series presented has an infinite radius of convergence, but the integral representation presented after it does not). The integral representation can be derived by exchanging the order of summation and using the integral representation $\sum_{k=0}^{n-1}\frac{x^n}{n!}=\int_{x}^{\infty}du u^{n-1}e^{-u}$ which allows the sum to be performed, resulting in
$$f_2(t)=2b\left(e^{1/a}-1+\int_{t-T}^{\infty}du \frac{J_1(2\sqrt{u})}{\sqrt{u}}e^{-au}\right)$$
One can also verify that $f_2(T)=0$ by using the well known Laplace transform of the Bessel function in the integrand.
A: You can try to do the following thing. First, let me replace the time $t=T-\tau$, so that new time $\tau$ changes from 0 to 2, and the initial conditions for the new functions
$$
u(\tau,x)=u(T-t,x)=f(t,x)=f(T-\tau)
$$
are set at $\tau=0$. I will also be using index notation
$$
u_n(\tau)=u(\tau,x), \quad n=2,3,\ldots
$$
Now your equation reads
$$
\dot u_n = au_n+b+\frac 1n u_{n+1},\quad n=2,3\ldots,\quad u_n(0)=0,\quad \tau\in[0,2]. 
$$
Assume that for sufficiently large $n+1$ we can disregard the term
$$
\frac{1}{n+1}u_{n+1},
$$
then for $u_{n+1}$ we have the simple ODE
$$
\dot u_{n+1}=au_{n+1}+b,\quad u_{n+1}(0)=0\implies u_{n+1}(\tau)=\frac{b}{a}e^{a\tau}-\frac{b}{a}\,.
$$
Now you can sequentially solve all the equations for $n,n-1,\ldots,2$. The question is which $n+1$ to pick.
It seems (but I do not have rigorous arguments) you can take $n+1=3$. Then (if I did not make any mistakes),
$$
u_2(\tau)=\frac{b \left(3 a e^{a \tau}+a \tau e^{a \tau}-e^{a \tau}-3 a+1\right)}{3 a^2}\,.
$$
Why such $n+1$? The only argument I have is that I experimented a little, and it seems that taking $n+1$ bigger does not really change the resulting $u_2$. Yes, the analytical expressions become more and more cumbersome, but the graph for $u_2$ remains the same.
Of course it all also depends on which $f_n$ (and hence $u_n$) you need.
P.S. Your equation is the so-called mixed functional differential equation. This is the last big project by Anatoly Myshkis, who worked on it at the end of the last century. You can find the English translation of his work here.
