I'm new on Mathematica and I am an engeneer with only a little base of numerical computation. I have to integrate a trigonometrical function numerically with a Gauss integration. The function is:
t[alpha_,x_]= ( 2 Sin[alpha]^4 - Cos[alpha]^2 Sin[alpha]^2 ) 1/(
2 Sin[alpha]^4 (Cot[alpha]^2 - 1) (Cot[alpha]^2 -
0.5)) (-(1/(Cos[alpha]^2 Abs[x]^2)))
I have to integrate it in the interval from 0 to Pi. Then I have to find couples of points and weights like this
f = GaussianQuadratureWeights[n, 0, Pi]
with n the number of point and after add weight for the function t evaluated in the point?
g = 0
For[ i = 1, i < n + 1, i++,
g = g + f[[i, 2]] t[f[[i, 1]],x]
]