summaryrefslogtreecommitdiff
path: root/50/CH5/EX5.29
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /50/CH5/EX5.29
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '50/CH5/EX5.29')
-rwxr-xr-x50/CH5/EX5.29/ex_5_29.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/50/CH5/EX5.29/ex_5_29.sce b/50/CH5/EX5.29/ex_5_29.sce
new file mode 100755
index 000000000..7e88c2c8c
--- /dev/null
+++ b/50/CH5/EX5.29/ex_5_29.sce
@@ -0,0 +1,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);
+