Matrix Exponentiation
When solving a system of differential equations, it is often easy to solve it in a matrix form. However, the result is often of the form where is a matrix. In this wiki matrix exponentiating methods will be shown.
Exponentiating a Diagonal Matrix
Exponentiating diagonal matrices are the easiest. All other matrices can be factorized to have a diagonal factor, making this useful.
If is a diagonal matrix (i.e all numbers not on the diagonal are 0):
then
Note that for diagonal matrices
This can be easily shown by induction. so we have the taylor series
We can use linearity of matrices to get this to be
Hence proved.
Some examples are given below.
if , find
Since is diagonal here,
Show that for a diagonal matrix , where is the trace of a matrix or the sum along its diagonal.
Use the fact that for a diagonal matrix the determinant is
So,
Exponentiating All Matrices
Now that we know how to exponentiate a diagonal matrix, we can do it for all matrices.
If we write in its eigenvector form, then
where is the eigenvector matrix and is the diagonal eigenvalue matrix.
First, we want to find an expression for which is
This can be proved by induction. We see the base case is true for the equation, and the inductive step is
Now we use the Taylor series again:
Find for
First, we want to find its eigenvalues, for which we write
We find eigenvectors for both eigevalues:
- One solution, the one we will pick, is
- One solution, the one we will pick, is .
Then we have
and
and that is the answer.
Differential Equations
As stated in the introduction, matrices can indeed be used to solve differential equations. Below are some examples:
Given a system of differential equations
solve for all variables in terms of
The trick is to consider the matrix . So,
We know the equation of the form
We can see the eigenvalues for this matrix is and the eigenvectors are . We then have
So, the solution is
That was tedious. For the case of two systems, matrices are not often the optimal path to take. But as the systems increase, matrices become better solutions. In the next example, there is an initial value problem.
Given a system of differential equations
find the exact solutions when
We already know the solution from last time to be
We have
and this does indeed satisfy the equations and boundary conditions.