If we use the Legendre shape functions then the coefficient matrix displayed in eq. (1.66) will be perfectly diagonal. The first two rows and columns will be zero on account of the boundary conditions and the diagonal term will be 2. Referring to eq. (1.75) the right hand side vector will be
Therefore the coefficients of the shape functions can be written as
and the QoI is:
From the definition of Ni in eq. (1.53) we have
and the QoI can be written as
where we made use of eq. (1.55). The relationships between the polynomial degree ranging from 2 to 100 and the corresponding values of the QoI computed by the direct method are displayed in Fig. 1.7. It is seen that convergence to the exact value
The indirect method is based on eq. (1.18) which, applied to this example, takes the form
Selecting
Figure 1.7 Example 1.9. Values of
computed by the direct method. which is the exact solution. The choice
Let us choose
Substituting