# Solution for system of equations

1. Apr 8, 2014

### Jhenrique

If a system of first-order ODEs like $\frac{d\vec{r}}{dt}=A\vec{r}$ have as solution $\vec{r} = C_1 \exp(\lambda_1 t)\hat{v}_1 + C_2 \exp(\lambda_2 t)\hat{v}_2$ (being λ the eigenvalues and v the eigenvectors), so, given a system of second-order ODEs, like $A \frac{d^2 \vec{r}}{dt^2} + B \frac{d\vec{r}}{dt} + C \vec{r} = \vec{0}$, which is the solution for it?

2. Apr 8, 2014

### Staff: Mentor

To the best of my knowledge, you don't normally see 2nd-order matrix equations like the one you show. None of the texbooks on ODE that I have (around 5 of them) have this as a topic, I don't believe.

Going back to your first equation, if the solution involves two eigenvalues and two eigenvectors, it must be that the matrix is 2 X 2, so what you show as a solution is not the general solution for the vector ODE r' = Ar.

An important application of vector ODEs is to convert second-order and higher order ODEs into first order vector DEs.

For example, you can convert the second-order ODE is y'' - 3y' + 2y = 0 using these substitutions:
u = y
v = y' = u'
Then y'' = u', so we have this system of first order DEs:
v' - 3v + 2u = 0
u' = v

or,
u' = v
v' = -2u + 3v

This system can be written in matrix form as
$$\vec{r}' = \begin{bmatrix}0 & 1 \\ -2 & 3 \end{bmatrix}\vec{r}$$
where
$$\vec{r} = \begin{bmatrix} u \\ v \end{bmatrix}$$

Using a similar process, a third-order DE can be tranformed to a first-order vector equation with a 3 x 3 matrix, and a fourth-order DE can be transformed to a first-order vector equation with a 4 x 4 matrix, and so on.

3. Apr 8, 2014

### Jhenrique

But this is the essence of the science, you do an impertinent question and receive a pertinent answer.

4. Apr 8, 2014

### Staff: Mentor

It is often the case, in science and elsewhere, that if you ask an impertinent question, you get ignored. And BTW, asking impertinent questions is NOT the essence of science.

However, I didn't ignore your question. What I said was that you can transform equations of second and higher order to a system of first order DEs that you can write as a matrix equation. Your second order equation could probably be rewritten as a first order system of equations. Maybe you could take a crack at it, since I've shown you how to convert a 2nd order equation into a system of two first order equations.

5. Apr 8, 2014

### AlephZero

You probably won't find them in math texts on differential equations, but they are used all the time in numerical calculations (maybe with matrices of dimenision 10^5 or 10^6).

From the point of view of the math, you can trivially convert $n$ ODEs of order $k$ into $kn$ first order ODEs by taking the first $k-1$ derivatives are independent variables, and in principle there is no new math involved when $k > 1$ or $n > 1$.

But from the point of view of finding efficient numerical solution algorithms, there is a great deal more math involved, and second-order DEs are probably more common in physics and engineering than first-order DEs, because of Newton's second law of motion.

6. Apr 8, 2014

### Staff: Mentor

I understand the importance of second-order DEs in applications such as damped spring-mass systems and LCR circuits, and applications of these show up a lot in math DE textbooks, but how common are second-order systems of equations, where the system is written in matrix form as Ar'' + Br' + Cr = 0, where A, B, and C are matrices, and r'', r', and r are vectors, similar to what Jhenrique asked about in the OP?

I haven't run into any discussion about these, but it seems to me that, in principle, such a matrix equation could be reduce to a first-order matrix equation.

7. Apr 8, 2014

### AlephZero

Google for multi degree of freedom (MDOF) systems for the basics.

Finite element and finite volume methods are good examples of this on a large scale, for structural and/or fluid dynamics.

You are right that the second order equations can be reduced to first order, but that may destroy "nice" properties of the system matrices, like symmetry, positive definiteness, sparsity, etc.

An alternative idea is to diagonalize the matrices to decouple the equations, which is nice when it works, but doing it by solving an eigenproblem numerically may be harder than working with the original matrices.

8. Apr 9, 2014

### Jhenrique

If u = r and v = r' so we have that $$\begin{bmatrix} \vec{u}'\\ \vec{v}'\\ \end{bmatrix} = \begin{bmatrix} 0 & 1\\ -A^{-1} C & -A^{-1} B \\ \end{bmatrix} \begin{bmatrix} \vec{u}\\ \vec{v}\\ \end{bmatrix}$$ What is interesting, because we have vectors and matrices inside another vector and another matrix, difficult thing of happen. But now, how get the solution for this system?

9. Apr 9, 2014

### AlephZero

That only works if $A$ is non-singular. $\begin{bmatrix}I & 0 \\ 0 & A\end{bmatrix}\begin{bmatrix} \vec{u}'\\ \vec{v}'\\ \end{bmatrix} = \begin{bmatrix} 0 & I\\ - C & - B \\ \end{bmatrix} \begin{bmatrix} \vec{u}\\ \vec{v}\\ \end{bmatrix}$ is more general.

You can solve it the same way as in your OP. The $\lambda_i$ are eigenvalues of the quadratic eigenproblem $|A\lambda^2 + B\lambda + C| = 0$.

10. Apr 10, 2014

### Jhenrique

But, I still have my doubts about the setp-by-step...