# Resolution of the Poisson's equation with the WRM using global Shape Functions

From KratosWiki

- The residual formulation is based on the
**Weighted Residual Method (WRM)**. The differential equation is converted in an integral equation with certain weighting functions applied to each equation.

- The
form of the Poisson's equation, that is, by using an approach solution , is written:**residual**

- Therefore, the integral equation to be solved, including the weightings ( and ), become:

- that can be written as:

- with
**K**is a coefficients matrix that depends on the geometrical and physical properties of the problem,**a**is the vector with theunknowns () to be obtained and**n****f**is a vector that depends on the source values and boundary conditions.

- Using the same basis functions for the whole domain, and if they are selected to naturally accomplish the boundary conditions, the integral form can be written:

- and therefore:

- For simplicity reasons, we select as basis functions the Fourier Series , that automatically accomplish the boundary conditions and . If the material is constant, we can write:

- Depending on the kind of weighting functions used, different weighted residual methods (WRM) can be considered, as follows in the next sections.

## Contents |

## Collocation Method

- Remember:

- The matrix components are:

- If the material
**k**is constant and the source**Q**is also constant over a part of the domain, and we still use Fourier series as basis functions, the matrix form becomes:

- If the material

## Subdomain Method

- that is, the Subdomain Method is equivalent to be the residual integral equal to zero for each subdomain (note that now the integral is applied just to the subdomain.

- If the material
**k**is constant and the source**Q**is also constant over a part of the domain, and Fourier series are used too as basis functions, the matrix form becomes:

- If the material

## Galerkin Method

- If the material
**k**is constant and the source**Q**is also constant over a part of the domain, and Fourier series are used as basis functions again, the matrix form becomes:

- If the material

## Least Squares Method

- The expression to minimize is:

- Therefore, the minimization process can be understood as a form of the weighting residues with:

- If the material
**k**is constant and the source**Q**is also constant over a part of the domain, and Fourier series are used as basis functions , the matrix form becomes:

- If the material

- Note that,
**in this case and without generality**, due to the selected basis functions, the obtained solution is the same that the obtained one using the Galerkin method.

- In order to compare the different methods, check some
**specific examples**.