# Finite elements/Choosing weight function

## Choice of weighting functionsEdit

As you have seen, we need to know the weighting functions (also called test functions) in order to define the weak (or variational) statement of the problem more precisely.

Consider the second model problem (3). If is a weighting function, then the ** weak** form of equation (3) is

Let the possible weighting functions for this equation be such that they satisfy the boundary conditions, that is and . This set of weighting functions will be denoted by the symbol .

The ** exact weak form** of the problem can then be stated as:

```
```

To get to an ** approximate weak form**, we need to choose trial functions. Let these trial functions ( ) reside in the function space . The approximate weak form of the problem is

```
```

One requirement that these trial functions ( ) have to satisfy is that

The trial functions also have to satisfy the boundary conditions.

If you look at the weak form shown above, you will notice that the highest derivatives of are of the second order while there are no derivatives of . This leads to a lack of symmetry in the formulation that is usually avoided for numerical reasons.

To get a symmetric weak form, we integrate the first term inside the integral by parts to get

(Recall that the formula for integration by parts is .)

Applying the boundary conditions on , we get

Therefore the problem can be restated in symmetric form as :

```
```

Since the same order of derivatives appear in both the trial and the weighting functions, we can choose our functions from the same set , where . As you can see, the smoothness requirements on are further weakened. This boundary value problem is also called the ** variational** boundary value problem.

The variational boundary value problem (18) can be (and often is) written using bilinear function notation as

```
```

where

### Characteristics of Edit

Let us now characterize , the class of admissible functions for the problem. We know that if and are irregular then their derivatives are even more irregular. Therefore, the most irregular term in the problem statement is

Now, both and are functions in the space . So we can choose to be equal to . Hence the minimum requirement for is

Functions like the above are called ** square integrable**.

Thus, our weighting functions have to be square integrable. This is a stricter condition than just requiring to be piecewise continuous, and reduces the number of functions that you can choose from.

There are two other interesting properties of the space . These are :

- It is a
**linear**space which means that if and are two arbitrary functions in this space, then the following operations hold :

- It is an
**infinite dimensional**space. This means that an infinity of parameters are needed to uniquely determine a weighting function . Thus,

- where, are linearly independent functions (also called
**basis**functions) and are constants. If we choose only of these basis functions then this is a -dimensional (i.e., finite dimensional) subspace of and we denote this as .