diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /623/CH1/EX1.1.28 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '623/CH1/EX1.1.28')
-rwxr-xr-x | 623/CH1/EX1.1.28/U1_C1_28.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/623/CH1/EX1.1.28/U1_C1_28.sce b/623/CH1/EX1.1.28/U1_C1_28.sce new file mode 100755 index 000000000..0f74ff877 --- /dev/null +++ b/623/CH1/EX1.1.28/U1_C1_28.sce @@ -0,0 +1,14 @@ +//variable initialization
+c=3*10^8; //speed of light(meter/second)
+v1=0.6*c; //initial velocity of particle (meter/second)
+v2=0.8*c; //final velocity of particle (meter/second)
+
+//Calculation of work required to increase the velocity from v1 to v2:
+
+//Classically
+W_Classic=0.5*((v2/c)^2-(v1/c)^2); //ratio of work and m0*c^2 (mo is the rest mass of particle and c is the speed of light)
+
+//Relativistically
+W_Relative=(1/(1-(v2/c)^2)^(1/2))-(1/(1-(v1/c)^2)^(1/2)); //ratio of work and m0*c^2 (mo is the rest mass of particle and c is the speed of light)
+
+printf("\nWork required:\n\t Classically: Work = %.2f*m0*c^2\n\t Relativistically: Work = %.3f*m0*c^2\nWhere m0:rest mass of particle & c:speed of light",W_Classic,W_Relative);
|