Buscar

romberg

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

deff('y = f(x)','y = exp(x^2)')
a=0
b=2
h=b-a
R = zeros(4,4)
//R11
R(1,1)= h*(f(a) + f(b))/2
//R21
x = (a+b)/2
R(2,1) = (R(1,1) + h*f(x))/2
//R31
x = x/2
h = h/2
R(3,1) = (R(2,1) + h*(f(x) + f(x+h)))/2 
//R41
x=x/2
h=h/2
R(4,1) = (R(3,1) + h*(f(x) + f(x+h) + f(x + 2*h) + f(x + 3*h)))/2
//R22
R(2,2) = R(2,1) + (R(2,1) - R(1,1))/(4^1 - 1)
//R32
R(3,2) = R(3,1) + (R(3,1) - R(2,1))/(4^1 - 1)
//R42
R(4,2) = R(4,1) + (R(4,1) - R(3,1))/(4^1 - 1)
//R33
R(3,3) = R(3,2) + (R(3,2) - R(2,2))/(4^2 - 1)
//R43
R(4,3) = R(4,2) + (R(4,2) - R(3,2))/(4^2 - 1)
//R44
R(4,4) = R(4,3) + (R(4,3) - R(3,3))/(4^3 - 1)
disp(R)

Teste o Premium para desbloquear

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

Outros materiais

Materiais relacionados

Perguntas relacionadas

Perguntas Recentes