# Matlab: how to solve high dimensional symbolic linear ODE?

For a linear ODE $$\frac{d\textbf{x}}{dt}=A\textbf{x}$$ with symbolic parameters, i.e. $$A$$ is a matrix with symbolics such as $$A=[k1,k2;k3,k4]$$, how to efficiently get the symbolic solution from MATLAB?

I used MATLAB dsolve, and it works when dimension is low. For a bit high dimension such as $$\mathrm{dim}(\textbf{x})=10$$, it is extremely slow. Is there alternative way?

• Are $k1,\cdots,kn$ numbers or symbols as well? – Bort Jan 6 at 12:21
• Can it solve it for 10-dimensional problems? Solving you equation is equivalent to diagonalize the matrix A, and this problem can't be solved analytically for general matrices A for dimensions 5 and higher. – nicoguaro Jan 6 at 15:47
• @Bort, Yes, they are. – Jay Jan 6 at 16:31
• @nicoguaro, good comments, thanks! If it is not analytically solvable, we have to give some initial values for the matrix $A$. Then, my question becomes an numerical fitting problem: what would be a good way to fit matrix $A$ to match the solution of this high dimensional linear ODE with some data points? – Jay Jan 6 at 16:36
• I don't think that I completely understand your question. You can numerically diagonalize your matrix A and then use that information to find an "analytic" solution. – nicoguaro Jan 6 at 21:40