summaryrefslogtreecommitdiff
path: root/24/CH2/EX2.6
diff options
context:
space:
mode:
Diffstat (limited to '24/CH2/EX2.6')
-rwxr-xr-x24/CH2/EX2.6/Example2_6.sce33
-rwxr-xr-x24/CH2/EX2.6/Example2_6_result.txt13
2 files changed, 46 insertions, 0 deletions
diff --git a/24/CH2/EX2.6/Example2_6.sce b/24/CH2/EX2.6/Example2_6.sce
new file mode 100755
index 000000000..d5e1987a9
--- /dev/null
+++ b/24/CH2/EX2.6/Example2_6.sce
@@ -0,0 +1,33 @@
+//Given that
+g = -9.8 //in m/sec^2
+displacement = -48 //in meter
+
+//Sample Problem 2-6a
+printf("**Sample Problem 2-6a**\n")
+//using newton's equation of motion
+//displacement = 0 * t + .5 * g * t * t
+//displacement = .5 * g * t * t
+time = sqrt(displacement/(.5 * g))
+printf("The time taken to reach at the ground is %f sec\n", time)
+
+//Sample Problem 2-6b
+printf("\n**Sample Problem 2-6b**\n")
+t = poly(0,'t');
+dis_t = 0 * t + .5 * g *t * t
+ds = horner(dis_t,[1,2,3])
+printf("The displacements at times 1,2,3 sec in meter is")
+disp(ds)
+
+//Sample Problem 2-6c
+printf("\n**Sample Problem 2-6c**\n")
+//using newton's first equation of motion v = u + a*t
+velocity = 0 + g * time
+printf("The velocity at water surface is equal to %f km/h\n", velocity)
+
+//Sample Problem 2-6d
+printf("\n**Sample Problem 2-6d**\n")
+//using newton's first equation of motion
+v_at_time_t = 0 + g * t
+velocities = horner(v_at_time_t,[1,2,3])
+printf("The velocitis at times 1,2,3 sec in m/s is")
+disp(velocities) \ No newline at end of file
diff --git a/24/CH2/EX2.6/Example2_6_result.txt b/24/CH2/EX2.6/Example2_6_result.txt
new file mode 100755
index 000000000..868c2e990
--- /dev/null
+++ b/24/CH2/EX2.6/Example2_6_result.txt
@@ -0,0 +1,13 @@
+**Sample Problem 2-6a**
+The time taken to reach at the ground is 3.129843 sec
+
+**Sample Problem 2-6b**
+The displacements at times 1,2,3 sec in meter is
+ - 4.9 - 19.6 - 44.1
+
+**Sample Problem 2-6c**
+The velocity at water surface is equal to -30.672463 km/h
+
+**Sample Problem 2-6d**
+The velocitis at times 1,2,3 sec in m/s is
+ - 9.8 - 19.6 - 29.4 \ No newline at end of file