
94 Applied calculus of variations for engineers
0
.2
.4
.6
.8
1
1.2
1.4
1.6
0 0.2 0.4 0.6 0.8 1
y_approx(x)
y_exact(x)
y_error(x)
FIGURE 7.1 Accuracy of the Ritz solution
The figure demonstrates that the Ritz solution satisfies the boundary con-
ditions and shows acceptable differences in the interior of the interval. Finally,
the variational problem’s extremum is computed for both cases. The analyt-
ical solution is based on the derivative
y
=
√
2πcos(πx),
and obtained as
1
0
y
2
(x)dx =2π
2
1
0
cos
2
(πx)dx = π
2
=9.87.
The Ritz solution’s derivative is
y
= −
√
30(2x − 1).
and the approximate extremum is
1
0
y
2
(x)dx =30
1
0
(2x − 1)
2
dx =
30
3
=10.
The approximate extremum