You are on page 1of 2

Machine Problem 1:

CE27 HX1
Tingatinga/Mata

INSTRUCTIONS: (see mechanics.doc for more detailed instructions)

1. Solve ALL problems by writing user-friendly C-programs.


2. Submit through email the executable file and source code.
3. Submit an evaluation of group members’ participation
4. Due date: August 25, 2010 5:00 pm

1. The governing differential equation for an undamped free vibration motion of


a multi-degree of freedom structure is given by:

where, m = mass matrix of the structure,


k = stiffness matrix of the structure
u = displacement vector, represents the displacement at each level of
the structure
ü = acceleration vector, represents the acceleration at each level of
the structure

The solution of this differential equation is attained by solving for the eigenvalues
(ω2n) and eigenvectors (φn) of the matrix m-1k then plugging it into the equation:

]
where,

and

Write a C-program that will compute the displacement vector of a 5-story


structure given the initial conditions

and and knowing that

and

Note that to solve this problem you need to define reusable functions to solve the
eigenvalue problem, i.e., implement the shifted inverse-power method as follows:
double SIPM(double alpha, /* the shift */
Vector x0, /* initial guess for the eigenvetor */
double eps, /* convergence criterion */
int maxN, /* maximum number of iterations */
Vector v); /* eigenvector */
/* Return value: The eigenvalue */

2. Write a C-Program to find the least squares nth degree polynomial of a given
set of data. Use your program to solve the least squares 7th degree
polynomial of the given set of data below.

X -1 0 1 2 3 5 7 9
Y -1 3 2.5 5 4 2 5 4

Vector LeastSquaresPoly(Vector x, Vector y, /* given data points */


Int nDeg, /* degree of polynomial */
);
/* Return value: The coefficients of the least square polynomial */

You might also like