1.double gauss_ch1(double(*f)(double),int n); 1
?1f (x )dx √1?x 2
. n Gauss-Chebyeshev ; .
[?1,1] 1√1?x 2
T n (x )=cos(n arccos(x )).T n (x ) [?1,1] n x k =cos(2k ?1
2n π),k =1,···,n .n Gauss-Chebyeshev
1
?1
f (x )dx √1?x 2
≈
πn n k =1f cos 2k ?1
2n π 2.double gauss_ch2(double(*f)(double),int n); 1?1
√
1?x 2f (x )dx .
n Gauss-Chebyeshev II ; . [?1,1] √1?x 2 U n (x )=sin((n +1)arccos(x ))
.U n (x ) [?1,1] n x k =cos(kπ),k =1,···,n .n Gauss-Chebyeshev II
1
?1
√
1?x 2f (x )dx ≈
πn +1n
k =1
sin 2
kπn +1
f cos
kπ
n +1
3.double comp_trep(double (*f)(double),double a,double b);
b
a f (x )dx . ; .
4.double romberg(double (*f)(double),double a,double b);
b
a f (x )dx . Romberg ; .
1
5.double gauss_leg_9(double(*f)); 1
?1
f(x)dx.
9 Gauss-Legendre .
? :
1?1e x
√
1?x2dx
=
1
?1
xe x
√
1?x2
dx
1
2
3
4
5
? 3,4,5 :
π
2
sin xdx(=1)
3
4
5
2