summaryrefslogtreecommitdiff
path: root/1205/CH14/EX14.2/S_14_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '1205/CH14/EX14.2/S_14_2.sce')
-rw-r--r--1205/CH14/EX14.2/S_14_2.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1205/CH14/EX14.2/S_14_2.sce b/1205/CH14/EX14.2/S_14_2.sce
new file mode 100644
index 000000000..b39f21f39
--- /dev/null
+++ b/1205/CH14/EX14.2/S_14_2.sce
@@ -0,0 +1,18 @@
+clc;
+m=10;//kg, mass of projectile before exploding
+v=30;//m/s, velocity of projectile before exploding
+mA=2.5;//kg, mass of fragment A of projectile
+mB=7.5;//kg, mass of fragment B of projectile
+thetaA=45;//degree, direction of fragment A
+thetaA=thetaA*%pi/180;//rad, conversion into radian
+thetaB=30;//degree, direction of fragment B
+thetaB=thetaB*%pi/180;//rad, conversion into radian
+//Law of conservation of momentum gives
+//mA*vA+mB*vB=m*v
+//Taking x and y components of vA and vB we get
+A=[mA*cos(thetaA),mB*cos(thetaB);mA*sin(thetaA),-mB*sin(thetaB)];// matrix of coefficients
+B=[m*v;0];//matrix B, v is along X axis
+X=linsolve(A,-B);//solution matrix
+vA=X(1);//m/s, velocity of fragment A
+vB=X(2);//m/s, velocity of fragment B
+printf("Velocity of fragment A after explosion is %.2f m/s \n Velocity of fragment B after explosion is %.1f m/s with given directions\n",vA,vB);