summaryrefslogtreecommitdiff
path: root/3137/CH17/EX17.15/Ex17_15.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3137/CH17/EX17.15/Ex17_15.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 '3137/CH17/EX17.15/Ex17_15.sce')
-rwxr-xr-x3137/CH17/EX17.15/Ex17_15.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/3137/CH17/EX17.15/Ex17_15.sce b/3137/CH17/EX17.15/Ex17_15.sce
new file mode 100755
index 000000000..f587faf35
--- /dev/null
+++ b/3137/CH17/EX17.15/Ex17_15.sce
@@ -0,0 +1,20 @@
+//Initilization Of Variables
+a=3 //Lower Limit oF the Integral
+b=6 //Upper Limit of the Integral
+n=10 //Interval of the integral
+g=9.8 //m/s^2
+w=4/16
+//Calculation
+//Using Trapezoidal Rule for Intergration
+function[I1]=Trap_Composite1(f,a,b,n)
+ h=(b-a)/n
+ x=linspace(a,b,n+1)
+ I1=(h/2)*((2*sum(f(x)))-f(x(1))-f(x(n+1)))
+endfunction
+deff('[y]=f(x)','y=-3*x^-1')
+an=-Trap_Composite1(f,a,b,n) //ft-lb
+v=sqrt((an*g)/(0.5*w)) //ft/s
+//Result
+clc
+printf('The speed of the disk is %fft/s',v)
+//The answer in the textbook is incorrect