# ODE solution method and external packages

## Main Question or Discussion Point

Dear All,

What type of packages exists out there to the solution of the ODE equations in engineering especially for the M*X''+C*X'+K*X = F ; 2nd order equation, where none of the variables denoted as M, C, K and F are function of the time and are mass, damping, stiffness and force matrices, repsectively ?

Bear in mind that I've all the fore-mentioned entities as matrix in hand, so how am I supposed to proceede further to find the solution of the given equation. Any pseudo example will be appreciated ?

Any suggestion on what type of external packages can I use for the solution techniques, preferably in Fortran?

Regards,

## Answers and Replies

HallsofIvy
Homework Helper
Sounds to me like you really need a "linear algebra" package such as "LAPack"
http://www.netlib.org/lapack/

With the conditions you give, that DE problem reduces to solving the matrix equations
$$MA^2+ CA+ K= 0$$
for A and
$$MP^2+ CP+ K= F$$
For P to get $X(t)= C_1e^{A_1t}+ C_2e^{-A_2t}+ P$
where $A_1$ and $A_2$ are the solutions to the first equation and P is either of the solutions to the second equation.

The books also mention that we can use the eigenvalues as a part of the solution techniques, but I don't know where it's been introduced in that overall process, partially or as whole process relies simply on eigenvalues.

I wonder, is that all solution process for ODEs is suitable for the matrices, as a result I'll have the nxn (K, C, M) and nx1 (F) matrices to start with.

Best Regards,

SteamKing
Staff Emeritus
Homework Helper
In addition to LINPACK, there is also an EISPACK, which deals with eigenvalues.

Thank you all for replying,

In addition to LINPACK, there is also an EISPACK, which deals with eigenvalues.
As I see one way or the other I always end up in the LAPACK library (eispack,arpack, blas, etc..). It seems that this package is robust in every way which can solve most ODEs and PDEs in maths.
Please confirm if can I achieve the solution of the equation M*X''+C*X'+K*X = F simply by using and calling the Lapack routines? If possible, in a step by step way?

First of all I'd like to mention the name of the problem in engineering called Response of MDOF in engineering, regarding the book(DIFFERENTIAL EQUATIONS FOR ENGINEERS) I'm reading there is mainly 2 methods to solve that problem. But please bear in mind I didn't fully figured out whether those are the methods and how to apply them correctly, so I write to get your confirmation and review.

1.)Laplace transformation method, which multiplies both side of equation with some coefficient and solves the problem. I still didn't get that fully,so any help with Lapack step by step implementation will be appreciated?
2.)Another method is, which mentions to use eigenvalues and decouple the equation into 1st order linear differential equation set is a preliminary step
$\Phi^T M \Phi*X''$+$\Phi^T C \Phi*X'$+$\Phi^T K \Phi*X$=$\Phi^T F$

But I'm unsure here whether that $\Phi$ corresponds to obtained eigenvalues or vectors?? from undamped system solution or from forced damped solution (homogeneous solution). As a result I know the method in Lapack to solve the eigen value problems( DGGEV subroutine call ). I think that I can write the equation in that form but don't know how to proceed further, what comes as next step?

Your help will be appreciated,

Dear All,

Your help really will be appreciated.