I'm a Computer Science Masters student and I've faced the following differential equation in my recent project: $$ \frac{df(x, t)}{dt} = p(x) + c\sum_{y\ne x}g(x, y)f(y,t) + cf(x,t) $$ where $c$ is a constant (let's call this Eq 1). For the sake of simplicity, let's assume that $f$ is a continues function with respect to $t$ (time) and is a discrete function with respect to $x$ (there are only a finite number of $x$ values on which $f(x,t)$ is defined; let's say $X=\{x_1,x_2,\cdots,x_N\}$, this shall simplify what we mean by $y \ne x$ in the summation above).
Unfortunately, my background regarding differential equations is limited to university-level calculus for Computer Science, which means that amongst first order differential equations, I'm only familiar with solving ODEs that look like: $$ \frac{dy}{dx} + yp(x) +q(x) = 0 $$ through methods like "Variation of Parameters" and "Integrating Factor".
The problem that I have certainly looks like an ODE to me, but due to the fact that it has a summation on $x$ values combined with a multiplication with another function $g$, I believe that this might not be a separable first order ODE. In fact, I'm not sure how I can solve it using the methods mentioned above. I would appreciate if anyone could help me clear my confusions about this.
My questions are:
- Is this any specific general form (like Linear Separable ODEs) to which this problem belongs?
- Is this problem solvable? If so, how?
- Is there any resource through which I can read more about these kinds of problems and different ways of approaching and solving them?
Thanks in advance!
We can treat this as a set of functions, $f_k(t)$, subject to the following system of ODEs:
$$f'_k(t) = p_k + c\sum_{j \neq k} g_{jk} f_j(t) + f_k(t)$$
Where $p_k, c, g_{jk}$ are all constant with respect to time. Which means that you can actually write this all in matrix form:
$$f'(t) = Af(t) + B$$
Where $f(t) = (f_1(t), \ldots, f_n(t))^T$ is a column vector of your individual functions, $B = (p_1, \ldots, p_n)^T$ is a column vector of the constant terms, and $A$ is an $n \times n$ matrix with entries $A_{kk} = 1$ and $A_{jk} = c g_{jk}$ for $j \neq k$.
Even better, these things are pretty easy to solve, and I would suggest you look up "linear first order system ODE" to find an appropriate textbook or other resource. As a small spoiler, the answer will look a lot like the answer would be if you were solving the single ODE $f'(t) = af(t) + b$, but you'll need to know how to take an exponential of a matrix.