summaryrefslogtreecommitdiff
path: root/50/CH5/EX5.29/ex_5_29.sce
blob: 7e88c2c8cb7a2dc057ada4a04560bb0dd7b28da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// example 5.29
// evaluate the given double integral using the simpsons rule;

// I= double integral f(x)=1/(x+y) in the range x=[1,2],y=[1,1.5];

h=.5;
k=.25;
deff('[w]=f(x,y)','w=1/(x+y)')

I=(.125/9)*[{f(1,1)+f(2,1)+f(1,1.5)+f(2,1.5)}+4*{f(1.5,1)+f(1,1.25)+f(1.5,1.5)+f(2,1.25)}+16*f(1.5,1.25)];
disp(I);