diff options
Diffstat (limited to '24/CH8/EX8.7/Example8_7.sce')
-rwxr-xr-x | 24/CH8/EX8.7/Example8_7.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/24/CH8/EX8.7/Example8_7.sce b/24/CH8/EX8.7/Example8_7.sce new file mode 100755 index 000000000..65009de85 --- /dev/null +++ b/24/CH8/EX8.7/Example8_7.sce @@ -0,0 +1,17 @@ +//Given that
+mass = 2.0 //in kg
+v1 = 4.0 //in m/s^2
+Ff = 15 //in N
+k = 10^4 //in N/m
+
+//Sample Problem 8-7
+printf("**Sample Problem 8-7**\n")
+//Using energy conservation
+//Ki = Uf + TEf
+Ki = .5* mass* v1^2
+//Uf = .5*k*x^2
+//TEf = Ff* x
+s=poly(0,"s")
+p = .5*k*s^2 + Ff* s - Ki
+x = roots(p)
+printf("The compression in the spring is equal to %fcm", x(1)*100)
\ No newline at end of file |