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?

  • $\begingroup$ Are $k1,\cdots,kn$ numbers or symbols as well? $\endgroup$ – Bort Jan 6 at 12:21
  • 3
    $\begingroup$ 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. $\endgroup$ – nicoguaro Jan 6 at 15:47
  • $\begingroup$ @Bort, Yes, they are. $\endgroup$ – Jay Jan 6 at 16:31
  • $\begingroup$ @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? $\endgroup$ – Jay Jan 6 at 16:36
  • $\begingroup$ 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. $\endgroup$ – nicoguaro Jan 6 at 21:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.