# Solving Differential Equations

1. May 16, 2009

### gruffins

What is the technique to solve differential equations using matrices?

I think it would help if an example were solved:

2(d^2y/dx^2)-5(dy/dx)+2y = 0

I don't even know how to start

2. May 17, 2009

### tiny-tim

Welcome to PF!

Hi gruffins! Welcome to PF!

(try using the X2 tag just above the Reply box )

Matrices I dunno

but if you mean using operators,

you write it (2D2 - 5D + 2)y = 0,

and then you factor that into (D - a)(D - b)y = 0,

so the solutions are linear combinations of the solutions to Dy = ay or Dy = by

3. May 17, 2009

### pbandjay

It's kind of a neat technique I think. Since this is a pretty simple ODE I will use the operator form for solving it as well.

You have 2y'' - 5y' + 2y = 0. We seek forms of ex in the solutions.

Using operator form we can rewrite this as: (2D2 - 5D +2)y = 0
with auxiliary polynomial 2r2 - 5r +2 = 0
containing roots r = 1/2 and 2
and linearly independent solutions e2x and ex/2.
Therefore by the superposition principle we can say: y(x) = c1e2x + c2ex/2 where c1 and c2 are our constants.

Now if we want to rewrite this as a vector formulation, in our original ODE we can let z1 = y and z2 = y'
so our ODE becomes 2z2' - 5z2 + 2z1 = 0.

Now we can write a system:

z1' = z2
z2' = -z1 + (5/2)z2

And letting a vector z = (z1, z2) and a matrix A = [0, 1; -1, 5/2]
we have the vector differential equation: z' = Az. (Note: in A, the 0 and 1 are the first row and -1 and 5/2 are the second row. I am new to this forum and haven't had time to see if the forum has tex or anything.)

We must now examine A and find its eigenvalues, which happen to be: 1/2 and 2. (When you find the characteristic polynomial of A to find the eigenvalues, notice how similar it is to the auxiliary equation in solving the ODE in operator form.)

Using the eigenvalue of r1 = 2, we have an eigenvector v1 = (1, 2) and since we require solutions in the form of ex our first solution is er1xv1 = e2x(1, 2).

With eigenvalue r2 = 1/2, an eigenvector is v2 = (1, 1/2) and our second linearly independent solution is ex/2(1, 1/2).

And our solution to our vector DE is z(x) = c1e2x(1, 2) + c2ex/2(1, 1/2).

And since z = (z1, z2) and z1 = y, we only need the first component of this vector solution. The second component is a solution to y' since z2 = y'.

Therefore y(x) = z1 = c1e2x + c2ex/2.

The solution to the vector differential equation can vary depending on how you pick your eigenvectors.
Also, extra steps need to be taken if the separate solutions are not linearly independent (i.e. same eigenvectors, etc..), which goes into cycles of generalized eigenvectors.

Last edited: May 17, 2009
4. May 17, 2009

### tiny-tim

Welcome to PF!

Hi pbandjay! Welcome to PF!

Just two comments …

i] for LaTeX, type [noparse]$$before and$$ after[/noparse] (or use the ∑ tag just above the Reply box)

ii] "axillary" means "relating to the armpits"!

5. May 17, 2009

### pbandjay

Re: Welcome to PF!

Oops heh.. thanks for noticing that. I think I just accidentally spelled auxiliary wrong and automatically clicked axillary in the spell check.