© 2001 by CRC Press LLC
MATHEMATICA APPLICATIONS
For the buckling problem, Mathematica can be applied as follows:
In[1]: = Ns = 5; EI = 1.; L = 1.; H = L/(Ns + 1);
In[2]: = (Print[“Number of Station = “, Ns, “ EI = “, EI, “ Length = “, L,
“Delta L = “, H)
Out[2]: =
Number of Station = 5 EI = 1. Length = 1. Delta L = 0.166667
In[3]: = (Do[Do[If[i == j, M[[i,j]] = 2.*EI/H^2,
If[i == (j + 1)||i = = (j–1), M[[i,j]] = EI/H^2, 0]],
{i,Ns}],{j,Ns}]); MatrixForm[M]
Out[3]//MatrixForm: =
72. 36. 0. 0. 0.
36. 72. 36. 0. 0.
0. 36. 72. 36. 0.
0. 0. 36. 72. 36.
0. 0. 0. 36. 72.
In the next section, we will show how the characteristic equation for the above
derived matrix [M] can be determined by application of Mathematica and subse-
quently how the eigenvalues and eigenvectors are to be obtained.
7.3 PROGRAM CHARACEQ — DERIVATION OF CHARACTERISTIC
EQUATION OF A SPECIFIED SQUARE MATRIX
The program CharacEq is designed to generate the coefficients of the characteristic
equation of an interactively specified square matrix by use of the Feddeev-Leverrier
method. Such a characteristic equation is needed in the stability, vibration, and other
so-called eigenvalue problems.
3
Readers interested in these problems should also
refer to the discussions on the programs EigenODE and EigenVec. The former
discusses how the square matrix is to be generated by finite-difference approximation
of ordinary differential equation. The latter program delineates how the eigenvectors
are to be found by a modified Gaussian elimination method for each eigenvalue and
how the eigenvalues are to be solved from the characteristic equation by the program
Bairstow. Here for derivation of the characteristic equation, let us denote the specified
square matrix be [A] and its elements be a
i,j
for i,j = 1,2,…,n with n being the order of
[A]. The Feddeev-Leverrier method first express the characteristic equation of [A] as:
(1)−
()
−− −…−−
()
=
−−
−
10
1
1
2
2
1
n
nn n
nn
pp ppλλ λ λ