summaryrefslogtreecommitdiff
path: root/623/CH7/EX2.6.1/U2_C6_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '623/CH7/EX2.6.1/U2_C6_1.sce')
-rwxr-xr-x623/CH7/EX2.6.1/U2_C6_1.sce9
1 files changed, 9 insertions, 0 deletions
diff --git a/623/CH7/EX2.6.1/U2_C6_1.sce b/623/CH7/EX2.6.1/U2_C6_1.sce
new file mode 100755
index 000000000..ed44cd07e
--- /dev/null
+++ b/623/CH7/EX2.6.1/U2_C6_1.sce
@@ -0,0 +1,9 @@
+//variable initialization
+x=(1/3):.01:(2/3);
+x0=1/3;
+x1=2/3;
+
+//calculation
+P=2*integrate('(sin(%pi*x))^2','x',x0,x1);
+
+printf("The required probability = %.2f",P);