Professional Documents
Culture Documents
CE27 HX1
Tingatinga/Mata
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
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