# Question:How can I solve Linear ODEs system using matrix method in Maple?

## Question:How can I solve Linear ODEs system using matrix method in Maple?

$$\textbf{x}' = \begin{bmatrix} -4 & -2 \\ 3 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}+\begin{bmatrix} -t \\ -2t-1 \end{bmatrix},\textbf{x}(0)=\begin{bmatrix} 3 \\ -5 \end{bmatrix}$$

As I know firstly, when the matrix is denoted by $A$, we must compute $e^{At}$ by diagonalizing $A$: if $A=PDP^{-1}$ for a diagonal $D$ then $e^{At} = P e^{Dt} P^{-1}$ where $e^{Dt}$ is a diagonal matrix with $(e^{Dt})_{ii} = e^{D_{ii} t}$...

How can I write The Maple code? maple.stackexchange)

restart: with(LinearAlgebra):

A := Matrix(2,2,[-4,-2,3,1]);

....

﻿