Is there a way to solve differential equation $\dot x = f(x,u)$ with linear algebra?

122 Views Asked by At

I'm going to solve a ODE system on the form: $$\dot x(t) = f(x(t),u(t))$$

Where an example of the system migth look like:

$$(\dot x_1(t) ,\dot x_2(t) ,\dot x_3(t))= a x_1(t) + b x_2 (t) + c x_3 (t) + d u(t) e x_2 (t) + f u(t) g x_1(t) + h sin(x_3(t))$$

The parameters $a,b,c,d,e,f,g,h$ are known and $x_1,x_2,x_3,\dot x_1,\dot x_2,\dot x_3$ are known for $t = 0$ and $u$ are known $\forall t$. Also $u$ is constant $\forall t$.

So is there a way to to find $x_1,x_2,x_3$ by using linear algebra? I just got started with Armadillo and C++, then I realize that Armadillo does not have and ODE solver. But Armadillo is optimized for linear algebra.