Buscar

Método Gauss Legendre - Código Scilab

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

function y=f(x)
 y=log(1+sin(x))
endfunction
n=3;
a=0;
b=1;
h=(b-a)/n // n intervalos 
 
w1=5/9; t1=-sqrt(3/5)*(b-a)/2 + (b+a)/2; 
w2=8/9; t2=(b+a)/2; 
w3=w1; t3=(b+a)/2 + sqrt(3/5)*(b-a)/2; 
S=(w1*f(t1) + w2*f(t2) +w3*f(t3))/2
disp(S)

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Continue navegando