diff options
Diffstat (limited to 'Modern_Physics_by_R_A_Serway/1-Relativity_I.ipynb')
-rw-r--r-- | Modern_Physics_by_R_A_Serway/1-Relativity_I.ipynb | 272 |
1 files changed, 272 insertions, 0 deletions
diff --git a/Modern_Physics_by_R_A_Serway/1-Relativity_I.ipynb b/Modern_Physics_by_R_A_Serway/1-Relativity_I.ipynb new file mode 100644 index 0000000..642bc32 --- /dev/null +++ b/Modern_Physics_by_R_A_Serway/1-Relativity_I.ipynb @@ -0,0 +1,272 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Relativity I" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Relative_velocity_of_recession_of_two_gang_leaders.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.10: Pg 30-31 (2005)\n", +"clc; clear;\n", +"// For simplification assume velocity of light equal to unity\n", +"c = 1; // Velocity of light, m/s\n", +"ux = 0.75*c; // Velocity of pack leader alpha, m/s\n", +"gama = 1/(sqrt(1 - (ux/c)^2));\n", +"u_x = 0; // Velocity component of beta measured in S frame, m/s\n", +"U_x = (u_x - ux)/(1 - u_x*ux/c^2); // Velocity component of beta along X-axis measured in S' frame, (Velocity Addition Rule), m/s\n", +"u_y = -0.90*c; // Velocity component of beta long Y-axis measured in S frame\n", +"U_y = u_y/(gama*(1 - u_x*ux/c^2)); // Velocity component of beta along Y-axis measured in S' frame, m/s\n", +"U = sqrt(U_x^2+U_y^2); // Relative velocity of recession of two gang leaders, m/s\n", +"printf('\nThe relative velocity of recession of two gang leaders = %4.2fc', U);\n", +"\n", +"// Result\n", +"// The relative velocity of recession of two gang leaders = 0.96c " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Period_of_the_pendulum_wrt_different_frames_of_references.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.2: Pg.18 (2005)\n", +"clc; clear;\n", +"c = 3e+08; // Velocity of light, m/s\n", +"v = 0.95*c; // Velocity of observer, m/s\n", +"T_proper = 3; // Proper time period of pendulum in rest frame, s\n", +"gama = 1/(sqrt(1 - (v/c)^2)); // Multiplying factor\n", +"// From time-dilation formula, we have\n", +"T = gama*T_proper; // Time period of pendulum w.r.t to moving observer, s\n", +"printf('\nTime period of pendulum w.r.t to moving observer = %3.1f s', T);\n", +"\n", +"// Result\n", +"// Time period of pendulum w.r.t to moving observer = 9.6 s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Contraction_of_spaceship.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.3: Pg 20 (2005)\n", +"clc; clear;\n", +"c = 3e+08; // Velocity of light, m/s\n", +"L_p = 100; // Proper length of spaceship, m\n", +"v = 0.99*c; // Velocity of spaceship, m/s\n", +"// Using length contracction formula,\n", +"L = L_p*sqrt(1 - (v/c)^2); // Observed length of spaceship, m\n", +"printf('Observed length of spaceship = %2d m', L);\n", +"\n", +"// Result\n", +"// Observed length of spaceship = 14 m" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Altitude_of_spaceship_wrt_different_frames_of_references.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.4: Pg 20 (2005)\n", +"clc; clear;\n", +"c = 3e+08; // Velocity of light, m/s\n", +"L_p = 435; // Proper altitude of spaceship, m\n", +"v = 0.970*c; // Velocity of spaceship, m/s\n", +"// Using length contracction formula,\n", +"L = L_p*sqrt(1 - (v/c)^2); // Observed altitude of spaceship, m\n", +"printf('Observed altitude of spaceship = %2d m', ceil(L));\n", +"\n", +"// Result\n", +"// Observed altitude of spaceship = 106 m" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Shape_of_spaceship_seen_from_different_frames_of_references.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.5: Pg 20 (2005)\n", +"clc; clear;\n", +"c = 3e+08; // Velocity of light, m/s\n", +"L_p = 50; // Proper distance between points x & y of spaceship, m\n", +"v = 0.950*c; // Velocity of spaceship, m/s\n", +"// Using length contracction formula,\n", +"L = L_p*sqrt(1 - (v/c)^2); // Observed distance between points x & y of spaceship, m\n", +"printf('\nObserved distance between points x and y of spaceship = %4.1f m', L);\n", +"printf('\nThe spaceship will get contracted in the direction of motion');\n", +"\n", +"// Result\n", +"// Observed distance between points x and y of spaceship = 15.6 m\n", +"// The spaceship will get contracted in the direction of motion " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Speed_of_recession_of_the_galaxy_Hydra.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.6: Pg 25 (2005)\n", +"clc; clear;\n", +"// For simplification assume velocity of light equal to unity\n", +"c = 1 // Velocity of light, m/s\n", +"lamda_obs = 474e-09; // Wavelength measured by observer, m\n", +"lamda_source = 394e-09; // Wavelength measured in the source's rest frame, m\n", +"v = ((lamda_obs^2 - lamda_source^2)/(lamda_obs^2 + lamda_source^2))*c; // Receding velocity of Hydra, m/s\n", +"printf('\nReceding velocity of Hydra = %5.3fc m/s', v);\n", +"\n", +"// Result\n", +"// Receding velocity of Hydra = 0.183c m/s " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Relative_velocity_of_spaceships.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.8: Pg 30 (2005)\n", +"clc; clear;\n", +"// For simplification assume velocity of light equal to unity\n", +"c = 1; // Velocity of light, m/s\n", +"v = 0.750*c; // Velocity of spaceship A relative to S frame, m/s\n", +"u_x = (-0.850)*c; // Velocity of spaceship B relative to S frame, m/s\n", +"// Using Lorentz velocity transformation\n", +"U_x = (u_x - v)/(1 - u_x*v/c^2); // Velocity of spaceship B with respect to spaceship A, m/s\n", +"printf('\nVelocity of spaceship B with respect to spaceship A = %6.4fc m/s', U_x);\n", +"\n", +"// Result\n", +"// Velocity of spaceship B with respect to spaceship A = -0.9771c m/s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Velocity_of_ball_wrt_stationary_observer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Scilab code Ex1.9: Pg 30 (2005)\n", +"clc; clear;\n", +"// For simplification assume velocity of light equal to unity\n", +"c = 1; // Velocity of light, m/s\n", +"v = 0.800*c; // Velocity of motorcycle w.r.t stationary observer, m/s\n", +"U_x = 0.700*c; // Velocity of ball in the reference frame of motorcyclist, m/s\n", +"// Using inverse Lorentz velocity transformation\n", +"u_x = (U_x + v)/(1 + U_x*v/ c^2); // Velocity of ball relative to stationary observer, m/s\n", +"printf('\nVelocity of ball relative to stationary observer = %6.4fc m/s', u_x);\n", +"\n", +"// Result\n", +"// Velocity of ball relative to stationary observer = 0.9615c m/s" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |