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.11 | |
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.11')
-rwxr-xr-x | 50/CH5/EX5.11/ex_5_11.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/50/CH5/EX5.11/ex_5_11.sce b/50/CH5/EX5.11/ex_5_11.sce new file mode 100755 index 000000000..3f861a3ea --- /dev/null +++ b/50/CH5/EX5.11/ex_5_11.sce @@ -0,0 +1,18 @@ +// example : 5.11
+// solve the definite integral by 1) trapezoidal rule, 2)simpsons rule
+// exact value of the integral is ln 2= 0.693147,
+
+deff('[y]=F(x)','y=1/(1+x)')
+
+//1)trapezoidal rule,
+
+a=0;
+b=1;
+I =trapezoidal(0,1,F)
+disp(error =.75-.693147)
+
+// simpson's rule
+
+I=simpson(a,b,F)
+
+disp(error =.694444-.693147)
\ No newline at end of file |