Other numerical methods 257
where δ*(D i ) is a modified Dirac function which applies over the subdomain D i rather than at a point.
9.2.3 Least squares method
In the least squares method, the residual is minimized in a least squares
sense. For that purpose, let
P
R x R x dx
R x dx
D
D
=
=
∫
∫
( ) ( )
( )
2
(9.8)
Then the residual is minimized by setting the partial derivatives of the
residual, with respect to the unknown constants, equal to zero:
∂
∂
=
∂
∂
=
∫
P
R x
R dx
i
i
D
α
α
2
0
( )
(9.9)
Therefore, the weight functions are the derivatives of the residuals with
respect to the unknown constants of the trial function.
9.2.4 Method of moments
In the method of moments, the weight functions are selected from a family
of power polynomials as
w i = x i , where i = 0, 1, 2, 3, …
(9.10)
and
R x x dx
i
D
( )
∫
= 0
(9.11)
The number of the selected power terms (i) equals the number of the
unknown constants (α i ).
9.2.5 Galerkin method
In the Galerkin method, the weight function is defined as the derivative of
the trial function with respect to the unknown constants:
R x w dx
R x
f dx
R x x dx
i
D
i
D
i
D
( )
( )
( ) ( )
∫
∫
∫
=
∂
∂
=
=
α
ϕ
0
(9.12)
where the trial functions are the same as those defined in Equation 9.2.
where δ*(D i ) is a modified Dirac function which applies over the subdomain D i rather than at a point.
9.2.3 Least squares method
In the least squares method, the residual is minimized in a least squares
sense. For that purpose, let
P
R x R x dx
R x dx
D
D
=
=
∫
∫
( ) ( )
( )
2
(9.8)
Then the residual is minimized by setting the partial derivatives of the
residual, with respect to the unknown constants, equal to zero:
∂
∂
=
∂
∂
=
∫
P
R x
R dx
i
i
D
α
α
2
0
( )
(9.9)
Therefore, the weight functions are the derivatives of the residuals with
respect to the unknown constants of the trial function.
9.2.4 Method of moments
In the method of moments, the weight functions are selected from a family
of power polynomials as
w i = x i , where i = 0, 1, 2, 3, …
(9.10)
and
R x x dx
i
D
( )
∫
= 0
(9.11)
The number of the selected power terms (i) equals the number of the
unknown constants (α i ).
9.2.5 Galerkin method
In the Galerkin method, the weight function is defined as the derivative of
the trial function with respect to the unknown constants:
R x w dx
R x
f dx
R x x dx
i
D
i
D
i
D
( )
( )
( ) ( )
∫
∫
∫
=
∂
∂
=
=
α
ϕ
0
(9.12)
where the trial functions are the same as those defined in Equation 9.2.
