function I=gauss_cebisev(fun,n) %I=gauss_cebisev(fun,n) %izracuna integral %int_(-1)^1 f(x)/sqrt(1-x^2)dx %s pomocjo Gauss-Cebisevih kvadraturnih formul %computes the integral of the function %int_(-1)^1 f(x)/sqrt(1-x^2)dx %using Gauss-Cebisev quadrature formulas w=pi/n;%utez // weight x=cos(pi*(2*(1:n)-1)/(2*n))%vozli // knots I=w*sum(feval(fun,x));%optimalni priblizek za integral // optimal approximation