From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 623/CH1/EX1.1.28/U1_C1_28.sce | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 623/CH1/EX1.1.28/U1_C1_28.sce (limited to '623/CH1/EX1.1.28') 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); -- cgit