summaryrefslogtreecommitdiff
path: root/1535/CH8/EX8.13
diff options
context:
space:
mode:
Diffstat (limited to '1535/CH8/EX8.13')
-rwxr-xr-x1535/CH8/EX8.13/Ch08Ex13.sci14
1 files changed, 14 insertions, 0 deletions
diff --git a/1535/CH8/EX8.13/Ch08Ex13.sci b/1535/CH8/EX8.13/Ch08Ex13.sci
new file mode 100755
index 000000000..1e57653b7
--- /dev/null
+++ b/1535/CH8/EX8.13/Ch08Ex13.sci
@@ -0,0 +1,14 @@
+// Scilab Code Ex8.13: Page-176 (2010)
+c = 3e+008; // Speed of light in vacuum, m/s
+E = 4.5e+017; // Total energy of object, J
+px = 3.8e+008; // X-component of momentum, kg-m/s
+py = 3e+008; // Y-component of momentum, kg-m/s
+pz = 3e+008; // Z-component of momentum, kg-m/s
+p = sqrt(px^2+py^2+px^2); // Total momentum of the object, kg-m/s
+// From Relativistic mass-energy relation
+// E^2 = c^2*p^2 + m0^2*c^4, solving for m0
+m0 = sqrt(E^2/c^4 - p^2/c^2); // Rest mass of the body, kg
+printf("\nThe rest mass of the body = %4.2f kg", m0);
+
+// Result
+// The rest mass of the body = 4.56 kg \ No newline at end of file