Graphics Programs Reference
In-Depth Information
the weights are all symmetric about the coordinate axes. It followsthat the points
labeled
a
contribute equal amounts to
I
; the same istruefor the points labeled
b
.
Therefore,
555 556)
2
cos
2
π
(0
.
774 597)
2
I
=
4(0
.
888 889) cos
π
(0
.
774 597)
2
cos
π
(0)
2
+
4(0
.
555 556)(0
.
888 889)
2
cos
2
π
(0)
2
+
(0
.
=
1
.
623 391
2
The exact value of the integral is 16
/π
≈
1
.
621 139.
EXAMPLE 6.15
y
4
3
4
3
1
2
x
1
1
4
=
A
Utilize
gaussQuad2
to evaluate
I
f
(
x
,
y
)
dx dy
over the quadrilateral shown,
where
2)
2
(
y
2)
2
f
(
x
,
y
)
=
(
x
−
−
Use enough integrationpoints foran“exact”answer.
Solution
The requiredintegration orderis determinedbythe integrand in Eq. (6.45):
1
1
I
=
f
[
x
(
ξ,η
)
,
y
(
ξ,η
)]
|
J
(
ξ,η
)
|
d
ξ
d
η
(a)
−
1
−
1
We note that
|
J
(
ξ,η
)
|
, definedinEqs. (6.44), is biquadratic.Since the specified
f
(
x
,
y
)
is also biquadratic, the integrand in Eq. (a) is apolynomialofdegree 4 in both
ξ
and
η
3) issufficientforan“exact”result. Here is the
MATLAB command that performs the integration:
. Thusthird-orderintegration (
n
=
>>I=gaussQuad2(@fex6
_
15,[0;4;4;1],[0;1;4;3],3)
I=
11.3778
>>
Search WWH ::
Custom Search