# Rayleigh–Ritz method

(Redirected from Rayleigh-Ritz method)

## Description of method

The Rayleigh–Ritz method allows for the computation of Ritz pairs ${\displaystyle ({\tilde {\lambda }}_{i},{\tilde {\textbf {x}}}_{i})}$ which approximate the solutions to the eigenvalue problem[1]

${\displaystyle A{\textbf {x}}=\lambda {\textbf {x}}}$

Where ${\displaystyle A\in \mathbb {C} ^{N\times N}}$.

The procedure is as follows:[2]

1. Compute an orthonormal basis ${\displaystyle V\in \mathbb {C} ^{N\times m}}$ approximating the eigenspace corresponding to m eigenvectors
2. Compute ${\displaystyle R\gets V^{*}AV}$
3. Compute the eigenvalues of R solving ${\displaystyle R\mathbf {v} _{i}={\tilde {\lambda }}_{i}\mathbf {v} _{i}}$
4. Form the ritz pairs ${\displaystyle ({\tilde {\lambda }}_{i},{\tilde {\textbf {x}}}_{i})=({\tilde {\lambda }}_{i},V{\textbf {v}}_{i})}$

One can always compute the accuracy of such an approximation via ${\displaystyle \|A{\tilde {\textbf {x}}}_{i}-{\tilde {\lambda }}_{i}{\tilde {\textbf {x}}}_{i}\|}$

If a Krylov subspace is used and A is a general matrix, then this is the Arnoldi Algorithm.

### The method in calculus of variations

In this technique, we approximate the variational problem and end up with a finite dimensional problem. So let us start with the problem of seeking a function ${\displaystyle y(x)}$ that extremizes an integral ${\displaystyle I[y(x)]}$. Assume that we are able to approximate y(x) by a linear combination of certain linearly independent functions of the type:

${\displaystyle y(x)\approx \varphi _{0}(x)+c_{1}\varphi _{1}(x)+c_{2}\varphi _{2}(x)+\cdots +c_{N}\varphi _{N}(x)}$

where ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ are constants to be determined by a variational method, such as one which will be described below.

The selection of which approximating functions ${\displaystyle \varphi _{i}(x)}$ to use is arbitrary except for the following considerations:

a) If the problem has boundary conditions such as fixed end points, then ${\displaystyle \varphi _{0}(x)}$ is chosen to satisfy the problem’s boundary conditions, and all other ${\displaystyle \varphi _{i}(x)}$ vanish at the boundary.

b) If the form of the solution is known, then ${\displaystyle \varphi _{i}(x)}$ can be chosen so that ${\displaystyle y(x)}$ will have that form.

The expansion of ${\displaystyle y(x)}$ in terms of approximating functions replaces the variational problem of extremising the functional integral ${\displaystyle I[y(x)]}$ to a problem of finding a set of constants ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ that extremizes ${\displaystyle I(c_{1},c_{2},\cdots ,c_{N})}$. We can now solve this by setting the partial derivatives to zero. For each value of i,

${\displaystyle {\partial I \over \partial c_{i}}=0}$

The procedure is to first determine an initial estimate of ${\displaystyle c_{1}}$ by the approximation ${\displaystyle y(x)\approx \varphi _{0}(x)+c_{1}\varphi _{1}(x)}$. Next, the approximation ${\displaystyle y(x)\approx \varphi _{0}(x)+c_{1}\varphi _{1}(x)+c_{2}\varphi _{2}(x)}$ is used (with ${\displaystyle c_{1}}$ being redetermined). The process continues with ${\displaystyle y(x)\approx \varphi _{0}(x)+c_{1}\varphi _{1}(x)+c_{2}\varphi _{2}(x)+c_{3}\varphi _{3}(x)}$ as the third approximation and so on. At each stage the following two items are true:

1. At the ith stage, the terms ${\displaystyle c_{1},\cdots ,c_{i-1}}$ are redetermined
2. The approximation at the ${\displaystyle i^{th}}$ stage ${\displaystyle y(x)\approx \varphi _{0}(x)+c_{1}\varphi _{1}(x)+\cdots +c_{i}\varphi _{i}(x)}$ will be no worse than the approximation at the ${\displaystyle (i-1)^{th}}$ stage

Convergence of the procedure means that as i tends to infinity, the approximation will tend towards the exact function ${\displaystyle y(x)}$ that extremizes an integral ${\displaystyle I[y(x)]}$.

In many cases one uses a complete set of functions e. g. polynomials or sines and cosines. A set of functions ${\displaystyle \varphi _{i}(x)}$ is called complete over [a, b] if for each Riemann integrable function ${\displaystyle f(x)}$, there is a set of values of coefficients ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ that reproduces ${\displaystyle f(x)}$.

The above outlined procedure can be extended to cases with more than one independent variable.

## Applications in Mechanical Engineering

The Rayleigh-Ritz method is often used in mechanical engineering for finding the approximate real resonant frequencies of multi degree of freedom systems, such as spring mass systems or flywheels on a shaft with varying cross section. It is an extension of Rayleigh's method. It can also be used for finding buckling loads and post-buckling behaviour for columns.

Consider the case whereby we want to find the resonant frequency of oscillation of a system. First, write the oscillation in the form,

${\displaystyle y(x,t)=Y(x)\cos \omega t}$

with an unknown mode shape ${\displaystyle Y(x)}$. Next, find the total energy of the system, consisting of a kinetic energy term and a potential energy term. The kinetic energy term involves the square of the time derivative of ${\displaystyle y(x,t)}$ and thus gains a factor of ${\displaystyle \omega ^{2}}$. Thus, we can calculate the total energy of the system and express it in the following form:

${\displaystyle E=T+V\equiv A[Y(x)]\omega ^{2}\sin ^{2}\omega t+B[Y(x)]\cos ^{2}\omega t}$

By conservation of energy, the average kinetic energy must be equal to the average potential energy. Thus,

${\displaystyle \omega ^{2}={\frac {B[Y(x)]}{A[Y(x)]}}=R[Y(x)]}$

which is also known as the Rayleigh quotient. Thus, if we knew the mode shape ${\displaystyle Y(x)}$, we would be able to calculate ${\displaystyle A[Y(x)]}$ and ${\displaystyle B[Y(x)]}$, and in turn get the eigenfrequency. However, we do not yet know the mode shape. In order to find this, we can approximate ${\displaystyle Y(x)}$ as a combination of a few approximating functions ${\displaystyle Y_{i}(x)}$

${\displaystyle Y(x)=\sum _{i=1}^{N}c_{i}Y_{i}(x)}$

where ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ are constants to be determined. In general, if we choose a random set of ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$, it will describe a superposition of the actual eigenmodes of the system. However, if we seek ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ such that the eigenfrequency ${\displaystyle \omega ^{2}}$ is minimised, then the mode described by this set of ${\displaystyle c_{1},c_{2},\cdots ,c_{N}}$ will be close to the lowest possible actual eigenmode of the system. Thus, this finds the lowest eigenfrequency. If we find eigenmodes orthogonal to this approximated lowest eigenmode, we can approximately find the next few eigenfrequencies as well.

In general, we can express ${\displaystyle A[Y(x)]}$ and ${\displaystyle B[Y(x)]}$ as a collection of terms quadratic in the coefficients ${\displaystyle c_{i}}$:

${\displaystyle B[Y(x)]=\sum _{i}\sum _{j}c_{i}c_{j}K_{ij}={\bf {c^{T}Kc}}}$

${\displaystyle A[Y(x)]=\sum _{i}\sum _{j}c_{i}c_{j}M_{ij}={\bf {c^{T}Mc}}}$

The minimization of ${\displaystyle \omega ^{2}}$ becomes:

${\displaystyle {\partial \omega ^{2} \over \partial c_{i}}={\partial \over \partial c_{i}}{\frac {\bf {c^{T}Kc}}{\bf {c^{T}Mc}}}=0}$

Solving this,

${\displaystyle {\bf {{c^{T}Mc}{\partial {\bf {c^{T}Kc}} \over \partial c}-{\bf {{c^{T}Kc}{\partial {\bf {c^{T}Mc}} \over \partial c}=0}}}}}$

${\displaystyle {\bf {{Kc}-{\frac {\bf {c^{T}Kc}}{\bf {c^{T}Mc}}}{\bf {{Mc}=0}}}}}$

${\displaystyle {\bf {{Kc}-\omega ^{2}{\bf {{Mc}=0}}}}}$

For a non-trivial solution of c, we require determinant of the matrix coefficient of c to be zero.

${\displaystyle \det({\bf {{K}-\omega ^{2}{\bf {M}}}})=0}$

This gives a solution for the first N eigenfrequencies and eigenmodes of the system, with N being the number of approximating functions.

## Simple case of double spring-mass system

The following discussion uses the simplest case, where the system has two lumped springs and two lumped masses, and only two mode shapes are assumed. Hence M = [m1m2] and K = [k1k2].

A mode shape is assumed for the system, with two terms, one of which is weighted by a factor B, e.g. Y = [1, 1] + B[1, −1]. Simple harmonic motion theory says that the velocity at the time when deflection is zero, is the angular frequency ${\displaystyle \omega }$ times the deflection (y) at time of maximum deflection. In this example the kinetic energy (KE) for each mass is ${\displaystyle {\frac {1}{2}}\omega ^{2}Y_{1}^{2}m_{1}}$ etc., and the potential energy (PE) for each spring is ${\displaystyle {\frac {1}{2}}k_{1}Y_{1}^{2}}$ etc.

We also know that without damping, the maximal KE equals the maximal PE. Thus,

${\displaystyle \sum _{i=1}^{2}\left({\frac {1}{2}}\omega ^{2}Y_{i}^{2}M_{i}\right)=\sum _{i=1}^{2}\left({\frac {1}{2}}K_{i}Y_{i}^{2}\right)}$

Note that the overall amplitude of the mode shape cancels out from each side, always. That is, the actual size of the assumed deflection does not matter, just the mode shape.

Mathematical manipulations then obtain an expression for ${\displaystyle \omega }$, in terms of B, which can be differentiated with respect to B, to find the minimum, i.e. when ${\displaystyle d\omega /dB=0}$. This gives the value of B for which ${\displaystyle \omega }$ is lowest. This is an upper bound solution for ${\displaystyle \omega }$ if ${\displaystyle \omega }$ is hoped to be the predicted fundamental frequency of the system because the mode shape is assumed, but we have found the lowest value of that upper bound, given our assumptions, because B is used to find the optimal 'mix' of the two assumed mode shape functions.

There are many tricks with this method, the most important is to try and choose realistic assumed mode shapes. For example, in the case of beam deflection problems it is wise to use a deformed shape that is analytically similar to the expected solution. A quartic may fit most of the easy problems of simply linked beams even if the order of the deformed solution may be lower. The springs and masses do not have to be discrete, they can be continuous (or a mixture), and this method can be easily used in a spreadsheet to find the natural frequencies of quite complex distributed systems, if you can describe the distributed KE and PE terms easily, or else break the continuous elements up into discrete parts.

This method could be used iteratively, adding additional mode shapes to the previous best solution, or you can build up a long expression with many Bs and many mode shapes, and then differentiate them partially.