diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /50/CH5/EX5.29 | |
download | Scilab-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-x | 50/CH5/EX5.29/ex_5_29.sce | 12 |
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);
+
|