# Solution to system of linear ODE's

Let $\Delta_n$ be the closed unit simplex in $\mathbb R^n$. For any $a,b \in \Delta_n$, define the differential equation: $$a'(u) = b-a(u) \quad\quad\quad a(0) = a$$

How does one go about solving this system of ODEs? Solving the case where $n=1$ is simple, does this carry over to the $n$ dimensional case?

I've looked at using eigen values but is there a simpler way when dealing with a large choice of $n$ ? Any hints appreciated

Attempt for the Matrix Differential Equation: $$\frac{dx}{dt} = Ax + f(t), \quad\quad\quad x(0) = x_0$$ where $A$ is a $n\times n$ matrix, $x\in \mathbb R^n$

the solution is given by:

$$x(t) = e^{tA} \int_0^te^{-sA}f(s)ds + e^{tA}x_0$$

Using the fact that for a diagonal matrix : $D=\text{diag}(a_1,...,a_n)$, $e^D = \text{diag}(e^{a_1},....e^{a_n})$

then for my problem:

$$\frac{da}{dt} = \text{diag}(-1,...-1)a(u) + b$$ then \begin{align*} a(t) &= \text{diag}(e^{-t},...,e^{-t}) \int_0^t \text{diag}(e^{-s},...,e^{-s})~ b~ ds + \text{diag}(e^{-t},...,e^{-t}) a\\ &=\text{diag}(e^{-t},...,e^{-t})\text{diag}(1-e^{-t},...1-e^{-t}) b +\text{diag}(e^{-t},...e^{-t}) a\\ &=\text{diag}(e^{-t}-e^{-2t},...e^{-t}-e^{-2t}) b + \text{diag}(e^{-t},...e^{-t}) a\\ \end{align*} $$=\begin{pmatrix} e^{-t}(a_1(0)+b_1) -b_1e^{-2t} \\ \vdots\\ \vdots \\ e^{-t}(a_n(0)+b_n) -b_ne^{-2t} \\ \end{pmatrix}$$

Is this correct?

Well, the answer is already there, I would just like to add a typo correction. The answer via your method also yields the correct solution. \begin{align*} a(t) &= \text{diag}(e^{-t},...,e^{-t}) \int_0^t \text{diag}(e^{\color{blue}{+}t},...,e^{\color{blue}{+}t})~ b~ ds + \text{diag}(e^{-t},...,e^{-t}) a\\ &=\text{diag}(e^{-t},...,e^{-t})\text{diag}(\color{blue}{e^{+t}-1},...,\color{blue}{e^{+t}-1}) b +\text{diag}(e^{-t},...e^{-t}) a\\ &=b+ + \text{diag}(e^{-t},...e^{-t}) (a-b)\\ \end{align*}

Which is the result you can find above, as Christian said, the problem was when you plugged the $A$ in your recipe.

Hope this helps

• isn't the matrix integral just integrating each element of the matrix? $\int_0^t e^{-s}ds = -e^{-s} \vert^t_0 = 1-e^{-t}$? – dimebucker Jul 12 '15 at 15:59
• Yes, I had a typo there, sorry – Conrado Costa Jul 12 '15 at 16:13

(You have $e^{-sA}$ not converted correctly when you plugged your special $A$ into the general recipe.)

Your system $$x'(t)=b-x(t),\qquad x(0)=a,$$ separates without any further ado into the $n$ IVPs $$x_k'(t)=b_k-x_k(t),\qquad x_k(0)=a_k\qquad(1\leq k\leq n)\ .\tag{1}$$ The solutions of $(1)$ are given by $$x_k(t)=(a_k-b_k)e^{-t}+b_k\qquad(1\leq k\leq n)\ ,$$ and we can combine them to the vector solution $$x(t)=e^{-t} (a-b) +b\ .$$

• shouldn't the matrix method give the same solution? – dimebucker Jul 12 '15 at 9:48