Solving differential equations through matrix

In summary, the conversation discusses the possibility of solving the equation d ( x^2 ) / dt^2 + w^2 x = 0 using a matrix. The method involves defining y= dx/dt and converting the equation into a single matrix equation \frac{dX}{dt}= \left(\begin{array}{ccc}0 && 1 \\-w^2 && 0\end{array}\right)X. The solution can be found by finding the eigenvalues of the coefficient array and can be written in terms of sine and cosine functions.
  • #1
devoured_elysium
15
0
Hello

I'd like to know how to solve the following equation with matrix, if possible at all:

d ( x^2 ) / dt^2 + w^2 x = 0

I know how to solve it without having to use a matrix, but I heard it is possible to do it with matrix. How about doing it? How is this method called?

Thanks
 
Physics news on Phys.org
  • #2
Is that d ( x^2 ) / dt^2 + w^2 x = 0
or d^2 x/dt^2+ w^2x= 0?

I'm going to assume it is the latter. Define y= dx/dt so dy/dt= d^2x/dt^2 and the equation becomes dy/dt= -w^2x. You now have the two equations dx/dt= y and dy/dt= -w^2x. If you write
[tex]X= \left(\begin{array}{c} x \\ y\end{array}\right)[/tex]
Then the two equations become the single matrix equation
[tex]\frac{dX}{dt}= \left(\begin{array}{ccc}0 && 1 \\-w^2 && 0\end{array}\right)X[/tex]
To solve that, find the eigenvalues of the coefficient array (they are [itex]\pm w i[/itex]). The general solution then can be written as exponentials of those eigenvalues times t or, since they are imaginary, sine and cosine.
 
  • #3
it's the latter one, as you thought. thanks by the response!
 
  • #4
Hi again

Sorry but I could not follow the step X=(x, y) and why then it becomes the next equation.
 
  • #5
[tex]\left(\begin{array}{c}\frac{dx}{dt} \\ \frac{dy}{dt}\end{array}\right)= \left(\begin{array}{ccc}0 && 1 \\-w^2 && 0\end{array}\right)\left(\begin{array}{c}x \\ y\end{array}\right)[/tex]

Do you see how the matrix multiplication on the right works out?
 
  • #6
HallsofIvy said:
[tex]\left(\begin{array}{c}\frac{dx}{dt} \\ \frac{dy}{dt}\end{array}\right)= \left(\begin{array}{ccc}0 && 1 \\-w^2 && 0\end{array}\right)\left(\begin{array}{c}x \\ y\end{array}\right)[/tex]

Taking this one step further, define [itex]\mathbf X[/itex] and [itex]\mathbf A[/itex] as
[tex]\begin{array}{rl}
\mathbf X &\equiv \bmatrix x\\y\endbmatrix \\[12pt]
\mathbf A &\equiv \bmatrix 0&&1\\-w^2&&0\endbmatrix
\endarray[/tex]

then

[tex]\frac {d\mathbf X}{dt}= \mathbf A\mathbf X[/tex]

If [itex]\mathbf X[/itex] and [itex]\mathbf A[/itex] were scalars, the solution to the above would be the exponential

[tex]\mathbf X = e^{\mathbf A t}\mathbf X|_{t=0}[/tex]

The series expansion of the exponential function works for matrices as well as scalars (for example, see http://mathworld.wolfram.com/MatrixExponential.html" ).

In this case,

[tex]\mathbf A^2 = -w^2 \mathbf I[/tex]

where [itex]\mathbf I[/itex] is the identity matrix. Thus

[tex]\begin{array}{rl}
(\mathbf A t)^{2n} &= (-1)^n (wt)^{2n} \mathbf I \\
(\mathbf A t)^{2n+1} &= (-1)^n \frac 1 w (wt)^{2n+1} \mathbf A\\
\end{array}[/tex]

The matrix exponential is thus

[tex]\begin{array}{rl}
e^{\mathbf A t} &=\sum_{n=0}^{\infty} \frac {(\mathbf At)^n}{n!}
\\[12pt]
&= \sum_{n=0}^{\infty} \frac {(\mathbf At)^{2n}}{(2n)!} +
\sum_{n=0}^{\infty} \frac {(\mathbf At)^{2n+1}}{(2n+1)!}
\\[12pt]
&= \sum_{n=0}^{\infty} (-1)^n\frac {(wt)^{2n}}{(2n)!} \mathbf I +
\frac 1 w\sum_{n=0}^{\infty}(-1)^n\frac{(wt)^{2n+1}}{(2n+1)!} \mathbf A
\\[12pt]
&= \cos(wt) \mathbf I +\frac 1 w\sin(wt) \mathbf A
\end{array}[/tex]
 
Last edited by a moderator:

1. What is the purpose of solving differential equations through matrix?

The purpose of solving differential equations through matrix is to find a numerical solution to a system of differential equations. This method involves converting the differential equations into a matrix equation, which can then be solved using matrix algebra.

2. How does solving differential equations through matrix differ from other methods?

Solving differential equations through matrix differs from other methods in that it is a numerical technique rather than an analytical one. This means that it involves using numerical approximations to find a solution, rather than finding an exact solution algebraically.

3. Can all types of differential equations be solved through matrix?

No, not all types of differential equations can be solved through matrix. This method is most commonly used for systems of linear differential equations, and may not be effective for non-linear equations or equations with complicated boundary conditions.

4. What are the advantages of using matrix to solve differential equations?

One advantage of using matrix to solve differential equations is that it allows for the use of powerful computational tools, making it possible to solve more complex systems of equations. Additionally, it can provide more accurate solutions compared to traditional numerical methods.

5. Are there any limitations to solving differential equations through matrix?

One limitation of solving differential equations through matrix is that it can be computationally intensive and may require advanced skills in linear algebra. Additionally, it may not be suitable for all types of differential equations and may not always provide an exact solution.

Similar threads

  • Linear and Abstract Algebra
Replies
6
Views
507
  • Linear and Abstract Algebra
Replies
2
Views
453
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
919
Replies
34
Views
2K
  • Linear and Abstract Algebra
Replies
6
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
596
  • Linear and Abstract Algebra
Replies
2
Views
2K
Replies
7
Views
827
  • Linear and Abstract Algebra
Replies
2
Views
2K
Back
Top