### Intro

This method starts straight from the weak form of a differential equation. It follows by taking *the same* functional space for the solution functions and the weight functions. This makes it similar to the straight Galerkin method – indeed it is often equivalent, as we will discuss in a future article.

### The variational point of view

In a linear problem, the RR method is quite simple. In this case, our weak problem can be written as

,

where is a bilinear operator, and is a linear one.

In our example our final expression in the weak form was:

**ex.**

So we can readily identify

**ex.** and

It is quite interesting physically that can be considered a variation from the true solution , so we may write , and solve

.

For these (bi)linear operators, this can be written, with a little functional analysis, as

**IF** is symmetric, on top of bilinear.

So, indeed, we are solving a variational problem in the spirit of classical mechanics. One would call the quantity the potential energy, or the Lagrangian perhaps. Sometimes, such a physical name is not appropriate, but clearly the quantity is still useful as the thing that is being minimized (or, rather, extremized).

### The Rayleigh-Ritz method

Since in this method we take *the same* functional space for the solution functions and the weight functions, we end up with N equations:

Given the (bi)linearity, we can arrive at a standard linear algebra problem:

where the coefficient matrix has components

and the vector is

.

Notice is bilinear, but doesn’t have to be symmetric. Hence the matrix does not have to be symmetric either.

### Boundary conditions

We recall that NBCs are already included in a proper weak formulation. Hence, our solution function must only comply with the EBCs. This is why we keep dragging the : this function usually satisfies the non-homogeneous BCs that may be, while the rest satisfies homogeneous BCs. If the BCs are homogeneous to start with, is simply zero, and we don’t even have to write it down (as is done as an easy case in some books). Don’t forget that the are also used for in the RR method, which is fine: the weight should indeed comply with homogeneous BC.

### Examples

Let us consider this case:

The weak form from which we begin is:

+ boundary terms

We don’t write down the boundary terms since we are going to consider two sets. Also, we will set , so

+ boundary terms

#### Set 1

Homogeneous Dirichlet BCs: . These are clearly two EBCs. They therefore impose . The weak form is, in this case simply

Also, we may set since they are homogeneous. Hence our linear algebra problem is

with

The set of functions must comply with the EBCs. For example, we may try the following:

The results are trivial but really tedious to copy (see Reddy, p. 45).

A fair convergence is obtained with only . This kind of polynomials is, nevertheless, known to behave badly as *N* increases, since they are “not too orthogonal”. By the way, the exact solution to this problem is

#### Set 2

Homogeneous Dirichlet BC on 0 only: , plus Neumann on *L*: .

There only one EBC, the first one, which imposes . The weak form is, in this case

(The Neumann BC is **not** a EBC since it is *w* which appears in the weak form, not *w*‘.)

We may set again since the EBC is homogeneous. Hence our linear algebra problem is

with the same as before, but now

The set of functions must comply with the EBC. For example, we may try:

so that .

Now the coefficients are easier:

Again, fair convergence is obtained with only , but these simple polynomials are known to be treacherous. By the way, the exact solution to this problem is

#### Refs

*An Introduction to the Finite Element Method*, J. Reddy. McGraw-Hill; 3 edition (January 11, 2005).**ISBN-10:**0072466855. At amazon (167 bucks!).- Petrov-Galerkin_method at wikipedia. (Not to be trusted so much!)
- Method of mean weighted residuals at wikipedia
- Galerkin method at wikipedia
- The method of weighted residuals
- The weak form

Pingback: Approximation for weighted residuals « Daniel Duque Campayo