The potential energy functional has the form
Π
[
u
]
=
1
2
∫
B
∇
u
:
(
C
:
∇
u
)
d
V
−
∫
B
f
∙
u
d
V
−
∫
∂
B
t
^
∙
u
d
V
{\displaystyle \Pi [\mathbf {u} ]={\frac {1}{2}}\int _{\mathcal {B}}{\boldsymbol {\nabla }}\mathbf {u} :({\text{C}}:{\boldsymbol {\nabla }}\mathbf {u} )~dV-\int _{\mathcal {B}}\mathbf {f} \bullet \mathbf {u} ~dV-\int _{\partial {\mathcal {B}}}{\widehat {\mathbf {t} }}\bullet \mathbf {u} ~dV}
The standard method of finding an approximate solution to the mixed
boundary value problem is to minimize
Π
{\displaystyle \Pi }
over a restricted class
of functions (the Rayleigh-Ritz method), by assuming that
u
approx
=
w
0
+
∑
n
=
1
N
a
n
w
n
{\displaystyle \mathbf {u} _{\text{approx}}=\mathbf {w} _{0}+\sum _{n=1}^{N}a_{n}\mathbf {w} _{n}}
where
w
n
{\displaystyle \mathbf {w} _{n}}
are functions that are chosen so that they
vanish on
∂
B
u
{\displaystyle \partial {\mathcal {B}}^{u}}
and
w
0
{\displaystyle \mathbf {w} _{0}}
is a
function that approximates the boundary displacements on
∂
B
u
{\displaystyle \partial {\mathcal {B}}^{u}}
. The constants
a
n
{\displaystyle a_{n}}
are then chosen so that
they make
Π
[
u
approx
]
{\displaystyle \Pi [\mathbf {u} _{\text{approx}}]}
a minimum.
Suppose,
Π
[
u
approx
]
=
Π
approx
=
Π
[
a
1
,
a
2
,
,
a
n
]
{\displaystyle \Pi [\mathbf {u} _{\text{approx}}]=\Pi _{\text{approx}}=\Pi [a_{1},a_{2},,a_{n}]}
Then,
Π
approx
=
A
+
1
2
∑
m
,
n
=
1
N
B
m
n
a
m
a
n
+
∑
n
=
1
N
D
n
a
n
{\displaystyle \Pi _{\text{approx}}=A+{\frac {1}{2}}\sum _{m,n=1}^{N}B_{mn}~a_{m}~a_{n}+\sum _{n=1}^{N}D_{n}~a_{n}}
where,
A
=
∫
B
U
(
w
0
)
d
V
−
∫
B
f
∙
w
0
d
V
−
∫
∂
B
t
t
^
∙
w
0
d
A
B
m
n
=
∫
B
∇
w
m
:
(
C
:
∇
w
n
)
d
V
D
n
=
∫
B
∇
w
0
:
(
C
:
∇
w
n
)
d
V
−
∫
B
f
∙
w
n
d
V
−
∫
∂
B
t
t
^
∙
w
n
d
A
{\displaystyle {\begin{aligned}A&=\int _{\mathcal {B}}U(\mathbf {w} _{0})~dV-\int _{\mathcal {B}}\mathbf {f} \bullet \mathbf {w} _{0}~dV-\int _{\partial {\mathcal {B}}^{t}}{\widehat {\mathbf {t} }}\bullet \mathbf {w} _{0}~dA\\B_{mn}&=\int _{\mathcal {B}}{\boldsymbol {\nabla }}{\mathbf {w} _{m}}:({\text{C}}:{\boldsymbol {\nabla }}{\mathbf {w} _{n}})~dV\\D_{n}&=\int _{\mathcal {B}}{\boldsymbol {\nabla }}{\mathbf {w} _{0}}:({\text{C}}:{\boldsymbol {\nabla }}{\mathbf {w} _{n}})~dV-\int _{\mathcal {B}}\mathbf {f} \bullet \mathbf {w} _{n}~dV-\int _{\partial {\mathcal {B}}^{t}}{\widehat {\mathbf {t} }}\bullet \mathbf {w} _{n}~dA\end{aligned}}}
To minimize
Π
approx
{\displaystyle \Pi _{\text{approx}}}
we use the relations
∂
Π
∂
a
i
=
0
(
i
=
1
,
2
,
,
n
)
{\displaystyle {\frac {\partial \Pi }{\partial a_{i}}}=0~~~(i=1,2,,n)}
to get a set of
N
{\displaystyle N}
equations which provide us with the values of
a
i
{\displaystyle a_{i}}
.
This is the approach taken for the displacement-based finite element method . If, instead, we choose to start with the complementary energy functional, we arrive at the stress-based finite element method.