484
8 Direct Methods of Variational Problems
The residual is
R = −
π
4
a 4 a 11 cos
π(x + a)
a
1 − cos
π(y + b)
b
+
π
4
a 2 b 2 a 11 cos
π(x + a)
a
cos
π(y + b)
b
−
π
4
b 4 a 11
1 − cos
π(x + a)
a
cos
π(y + b)
b
− m
Because the residual and the weighted function are both even functions, the
Galerkin equation is
a
−a
b
−b
R
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
dxdy = 4
a
0
b
0
R
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
dxdy = 0
The integral result is
π
4
a 4
3ab
4
+ 2
π
4
a 2 b 2
ab
4
+
π
4
b 4
3ab
4
a 11 − mab = 0
Solve for a 11
a 11 =
4m
π 4
3
a 4 +
2
a 2 b 2 +
3
b 4
The approximate solution is
u =
4m
π 4
3
a 4 +
2
a 2 b 2 +
3
b 4
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
When a = b, the value at the center point is
u =
2ma
4
π 4
Comparing with the analytical solution the relative error is 1.845069%.
Example 8.5.6 The steady-state Schrödinger equation of linear harmonic oscillator
is
−
h
2
2m
d
2
ϕ(x)
dx 2 +
1
2
mω
2 x
2
ϕ(x) = Eϕ(x)
8 Direct Methods of Variational Problems
The residual is
R = −
π
4
a 4 a 11 cos
π(x + a)
a
1 − cos
π(y + b)
b
+
π
4
a 2 b 2 a 11 cos
π(x + a)
a
cos
π(y + b)
b
−
π
4
b 4 a 11
1 − cos
π(x + a)
a
cos
π(y + b)
b
− m
Because the residual and the weighted function are both even functions, the
Galerkin equation is
a
−a
b
−b
R
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
dxdy = 4
a
0
b
0
R
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
dxdy = 0
The integral result is
π
4
a 4
3ab
4
+ 2
π
4
a 2 b 2
ab
4
+
π
4
b 4
3ab
4
a 11 − mab = 0
Solve for a 11
a 11 =
4m
π 4
3
a 4 +
2
a 2 b 2 +
3
b 4
The approximate solution is
u =
4m
π 4
3
a 4 +
2
a 2 b 2 +
3
b 4
1 − cos
π(x + a)
a
1 − cos
π(y + b)
b
When a = b, the value at the center point is
u =
2ma
4
π 4
Comparing with the analytical solution the relative error is 1.845069%.
Example 8.5.6 The steady-state Schrödinger equation of linear harmonic oscillator
is
−
h
2
2m
d
2
ϕ(x)
dx 2 +
1
2
mω
2 x
2
ϕ(x) = Eϕ(x)
