summaryrefslogtreecommitdiff
path: root/24/CH7/EX7.8/Example7_8.sce
blob: 03fdce9f874c1eaf0fbc4555a1348446b4f19d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Given that
m=.4  //in kg
Vi = .5  //in m/s
k = 750  //in N/m

//Sample Problem 7-8
printf("**Sample Problem 7-8**\n")
//Using work energy theorem
//Wnet = Kf - Ki
//Kf = 0
//.5*k*x^2 = Ki
x = sqrt(m*Vi^2/k)
printf("The compression in the spring is %em", x)