# Solving this recursive differential equation, knowing the first term (maybe using Laplace Transform)

Function $$f_n(t)$$ is defined for all positive integer $$n$$ and is continuously differential in $$t$$ for $$t\in[0,T]$$.

We have a recursive differential equation that we would like to solve.

$$\frac{\partial f_n(t)}{\partial t}-\alpha\left(f_n(t)-f_{n-1}(t)\right)+\alpha\beta=0,$$ with the terminal condition $$f_n(T)=0$$.

Now we know that for $$n=1$$, we have $$f_1(t)=\beta-\beta e^{-\alpha(T-t)}$$. So we would like to find $$f_n(t)$$ for $$n\ge 2$$.

The first thought I had was solving using the integrating factor method. Doing that, we get this solution $$f_n(t)=\int_{t}^{T}\left(\alpha\beta + \alpha f_{n-1}(s)\right)e^{-\alpha\left(s - t\right)}ds.$$ This is nice but for higher $$n$$, solving the integral is very messy.

Is there another way to find a closed-form expression for $$f_n(t)$$?

I got a hint on using the Laplace Transform, the closed-form expression of $$f_n(t)$$ is something like $$k + (a+bx+cx^2+…) e^{-\alpha x}$$ where $$x=T-t$$.

So using this hint, I started with $$n=2$$ but I don't get this form. I can compute $$f_n(t)$$ for each $$n$$ but not a closed-form for any $$n$$.

• Have you tried performing Laplace transform to the equation without plugging specific $n$ in? Commented Jul 17, 2022 at 13:37
• Thank you for the comment. I thought about that but I wasn't sure how to handle $f_{n-1}(t)$. I'm very new to all this!
– user1007034
Commented Jul 17, 2022 at 13:45
• Just define $F_n(s)$ to be the Laplace transform of $f_n(t)$, so you will obtain an algebraic recurrence relationship for $F_n(s)$. Commented Jul 17, 2022 at 13:47

I see a way using a "characteristic function approach".

I mean by that, the use an auxiliary variable, say $$x$$, generating a formal series obeying a "big" differential equation gathering all the "small" differential equations. Let us be more precise.

Let us multiply the $$n$$-th differential equation by $$x^n$$ and sum up all of them in this way:

$$\sum_{n=1}^{\infty}\frac{\partial f_n(t)}{\partial t}x^n-\alpha \sum_{n=1}^{\infty}f_n(t)x^n+\alpha \sum_{n=1}^{\infty} f_{n-1}(t)x^n+\alpha\beta \sum_{n=1}^{\infty}x^n=0 \tag{1}$$

Let us use the following notation

$$\Phi(t,x):=\sum_{n=1}^{\infty}f_n(t)x^n\tag{2}$$

Using (2), (1) becomes:

$$\frac{\partial \Phi(t,x)}{\partial t}-\alpha \Phi(t,x)+\alpha x(\Phi(t,x)\color{red}{-f_1(t)})+\alpha \beta\frac{x}{1-x}=0 \tag{3}$$

(please note the handling (in red) of the first term). Otherwise said:

$$\frac{\partial \Phi(t,x)}{\partial t}+\alpha(x-1)\Phi(t,x)=\alpha x f_1(t)-\alpha \beta\frac{x}{1-x} \tag{4}$$

with (as indicated)

$$f_1(t)=\beta-\beta e^{-\alpha(T-t)}\tag{5}$$

giving:

$$\frac{\partial \Phi(t,x)}{\partial t}+\alpha(x-1)\Phi(t,x)=\alpha \beta\frac{x^2}{1-x}-\alpha \beta x e^{-\alpha(T-t)} \tag{6}$$

(6) is an ordinary first order differential equation in variable $$t$$ (with $$x$$ considered as a parameter, i.e., a constant).

This constant coefficients differential equation can be solved using Laplace Transform. Here is the how, denoting by $$P$$ the Laplace Transform of $$\Phi$$, with customary variable $$s$$ in the Laplace domain:

$$s P(s,x)-\alpha(x-1) P(s,x)=\alpha \beta \left(\dfrac{s^3}{1-s^3}-xe^{-\alpha T}\dfrac{1}{s-\alpha}\right)$$

$$P(s,x)=\dfrac{\alpha \beta}{s-\alpha(x-1)} \left(\dfrac{s^3}{1-s^3}-xe^{-\alpha T}\dfrac{1}{s-\alpha}\right)$$

I haven't done the computations of the inverse Laplace Transform of $$P$$, in order to obtain a closed form expression for $$\Phi$$ but as they involve rational fractions, they are standard (ask Wolfram Alpha for example).

Having obtained $$\Phi$$, it will remain to expand it as a formal series in $$x^n$$ and "harvest" its coefficients which are the $$f_n(t)$$.

• I have added some further computations. Any comment ? Commented Jul 17, 2022 at 16:31
• Thank you. I am trying to do all the calculations step-by-step and I'm very slow at it!
– user1007034
Commented Jul 18, 2022 at 9:48
• Is your issue connected to Picard iterative method for solving differential equations ? Commented Jul 18, 2022 at 14:28
• This is actually the first time I'm hearing that! I don't see how we can get that $k, a, b, c,\ldots$ coefficients.
– user1007034
Commented Jul 19, 2022 at 20:51