f = inline('x./log(x)')
I1 = 2/6 * (f(3) + 4*f(4) + f(5))
I2 = (f(3) + f(5) + 2*f(4) + 4*(f(3.5) + f(4.5)))/6
I1 - I2
quad(f,3,4)
quad(f,3,5)
help quad
M = 1000;
x = linspace(3, 5-2/M, M);
Ips = 2/M * sum(f(x))
xd = linspace(3+2/M, 5, M);
Ipd = 2/M * sum(f(xd))
M = 1000000;
M = 1.e6;
M
x = linspace(3, 5-2/M, M);
xd = linspace(3+2/M, 5, M);
Ips = 2/M * sum(f(x))
Ipd = 2/M * sum(f(xd))
format long
Ips = 2/M * sum(f(x))
Ipd = 2/M * sum(f(xd))
M = 1.e12;
x = linspace(3, 5-2/M, M);
xd = linspace(3+2/M, 5, M);
M = 1.e10;
x = linspace(3, 5-2/M, M);
M = 1.e9;
M = 1.e8;
x = linspace(3, 5-2/M, M);
xd = linspace(3+2/M, 5, M);
Ips = 2/M * sum(f(x))
M = 1.e7;
x = linspace(3, 5-2/M, M);
xd = linspace(3+2/M, 5, M);
Ips = 2/M * sum(f(x))
Ipd = 2/M * sum(f(xd))
quad(f,3,5)
quadl(f,3,5)
2*cos(0.64)-1.28*sin(0.64)
0.4 * sin(0.64) 
quad('sin(x.^2)', 0, 0.8)
0.4 * sin(0.64)
quit;
# Octave 3.6.2, Mon Dec 17 13:07:39 2012 CET <achilles@achilles-TOSH>
