||
1) get the orthgonal polynomials
Orthogonalize[{1,x,x^2,x^3},Integrate[Cos[x*Pi/2]#1 #2,{x,-1,1}]&]
2) find roots for the 4th polynomial you got, which are x_i's
NumberForm[NRoots[-(((384-48 [Pi]^2+[Pi]^4) x)/([Pi]^2 (-8+[Pi]^2)))+x^3==0,x],12]
3) compute w_i with integration of cos(x*pi/2)*L_i(x) in the interval (-1,1), L_i(x) is the ith lagrange polynomial with respect to the nodes you found in step 2.
Results FYI,
x_0=-0.644641970907
x_1=0
x_2=0.644641970907
w_0=0.290197016802
w_1=0.692845511132
w_2=0.290197016802
Is it possible to solve the problem by introducing a polynomial system of equations? It is essential to recognize it as a gaussian quadrature problem and derive a gaussian quadrature formula. In general, the nonlinear system consists of those equations cannot be guarranteed to be solved in closed form in Mathematica.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 12:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社