êÎÒO ¢(i)
®e>ÆOÅÆ
êÈ©
¢ye¡o¼ê:
1. double gauss_ch2(double(*f)(double), int n); ¦È©
R
1
−1
√
1 − x
2
f(x)dx.
3«m [−1, 1] þ'u¼ê
√
1 − x
2
õ U
n
(x) =
sin((n+1) arccos(x))
sin(arccos(x))
.
U
n
(x) 3 [−1, 1] þ n ´ x
k
= cos(
kπ
n+1
), k = 1, ··· , n. n :
Gauss-Chebyeshev II .È©úª
Z
1
−1
√
1 − x
2
f(x)dx ≈
π
n + 1
n
X
k=1
sin
2
(
kπ
n + 1
)f(cos(
kπ
n + 1
))
¼ê gauss_ch2 ¢y n : Gauss-Chebyeshev II .È©úª; £È
©Cq.
2. double comp_gauss_leg(double (*f)(double), double a, double b)
¦È©
R
b
a
f(x)dx. Åg~Ez Gauss-legender ü:¦Èúª.
ü: Gauss-Legender ¦Èúª:
Z
1
−1
f(x)dx ≈ f(−1/
√
3) + f(1/
√
3)
éu«m [a, b], C x =
b−a
2
t +
a+b
2
:
R
b
a
f(x)dx =
b−a
2
R
1
−1
f(
b−a
2
t +
a+b
2
)dt
≈
b−a
2
(f(
a−b
2
√
3
+
a+b
2
) + f(
b−a
2
√
3
+
a+b
2
))
ò«m [a, b] n ©, 3z«mþ|^þ¡úª. ¼ê comp_gauss_leg
|^Åg~Eâ, ¦È©
R
b
a
f(x)dx; £È©Cq.
3. double comp_trep(double (*f)(double), double a, double b); ¦
È©
R
b
a
f(x)dx.
¼ê¢yÅg~{EzF/úª; £È©Cq.
1
- 1
- 2
前往页