summaryrefslogtreecommitdiff
path: root/50/CH5/EX5.21/ex_5_21.sce
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.21/ex_5_21.sce
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.21/ex_5_21.sce')
-rwxr-xr-x50/CH5/EX5.21/ex_5_21.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/50/CH5/EX5.21/ex_5_21.sce b/50/CH5/EX5.21/ex_5_21.sce
new file mode 100755
index 000000000..64303a5b5
--- /dev/null
+++ b/50/CH5/EX5.21/ex_5_21.sce
@@ -0,0 +1,16 @@
+// example 5.21
+// caption: gauss-leguerre method
+// I= integral e^-x*(3*x^3-5*x+1) in the range [0,~];
+
+// observing the integral we can inffer that f(x)=(3*x^3-5*x+1)
+
+deff('[y]=f(x)','y=(3*x^3-5*x+1) ');
+
+
+// 1) since , from gauss leguerre two point rule;
+I2=(1/4)*[(2+sqrt(2))*f(2-sqrt(2))+(2-sqrt(2))*f(2+sqrt(2))]
+
+// 3) since , from gauss leguerre three point rule;
+I3=(0.71109*f(0.41577)+0.27852*f(2.29428)+0.01039*f(6.28995))
+
+