Maple/Graphing equations related to relativity

From Wikibooks, open books for an open world
Jump to: navigation, search

Assigning variables and plotting are both simple maple functions that are very important and can be used towards a variety of goals, whether you are assigning a physical constant to make an equation easier to use or making the task of graphing a data set of 1000 terms much more manageable. Here, we are illustrating these simple commands with equations relating to Special Relativity.

Graph e=mc^2[edit]

E=mc^2 is a very famous equation which describes the relationship between energy and mass. The full equation involves a gamma function which basically modifies the answer based on the speed. This graph shows that as the velocity approaches the speed of light, the energy approaches infinity.


1. Assign c to the value 1. (Though the speed of light, 'c', is actually close to 3*10^8 m/s in special relativity we use the convention of having it equal 1 so when we use very large velocities we can assign them as fractions of the speed of light. ie. v=0.5 is half the speed of light)

2. Assign the function: \gamma(v) = \frac{1}{\sqrt{1-v^2/c^2}}

3. Assign the function:  E(v,m)=\gamma(v)\,m\,{c}^{2}

4. Plot E(v,30) over the range m= 0 to 0.9. To label the y axis, enter the label you want as the third term in the maple plot command, after the range is specified. See below. Also see how the title is added.

Solution (Maple Commands)

c:=1;
Gamma:= (v)-> 1/sqrt(1-(v**2/c**2));
E:= (v,m)-> Gamma(v) * m * c**2;
plot(E(v,30), v=0..0.9, energy, title="Energy Mass Relationship");
Energy Mass Relationship.jpg

Graph Length Contraction Equation[edit]

Explained by the theory of special relativity, length of an object as viewed from another frame of reference contracts as it moves in a direction along its length. In fact, as the object's relative velocity approaches the speed of light, the length of the object approaches zero. In theory, the object will never actually reach the speed of light. The equation for this is L_prime= L/Gamma. L_prime is the contracted length, and L is the 'proper length' or the length measured in the frame of the object. Gamma is the problem above. Plot the graph of L_prime for a limousine that is 10 meters long from v=0 to c.

Solution

c:=1;
Gamma:= (v)-> 1/sqrt(1-(v**2/c**2));
L_prime:= (L,v)-> L/Gamma(v);
plot(L_prime(10,v),v=0..c, length, title="Length Contraction");
Length Contraction.jpg

Computing Length Contraction for Everyday Objects[edit]

Gamma's purpose in these equations is in essence a modifier to take into account the change in different values with respect to how fast an object is moving. Changes in length do not affect our everyday lives because everything around us moves too slowly to affect the length or time we perceive. To show this, try plugging in different speeds to the L_prime equation for an object 1 meter long and see how big of a change there will be for the speed of a person walking- about 1.5 m/s, a car - about 30 m/s, the X-43 rocket/scramjet plane- 3,111m/s, and at 10,000 times the actual speed of Apollo 10 as it reentered the atmosphere (11,100 m/s * 10,000). Use the actual value of the speed of light for c, 299,792,458 m/s. (By using the evalf function, it forces maple to output a decimal instead of a cumbersome fraction). Notice the small change by the ridiculously high spaceship speed.

Solution:

L_prime:= (L,v)-> L/Gamma(v);
c:=299792458;
evalf(L_prime(1,1.5));
                                                           1.000000000
evalf(L_prime(1,30));
                                                           0.999999999
evalf(L_prime(1,3111));
                                                           0.999999999
evalf(L_prime(1,(11,100*10000)));
                                                           0.9290317539

It can be seen that the length contraction at speeds that we can achieve is negligible. Speed of:
walking- 1 meter
car- 1 meter
jet- 1 meter
10,000 times the Apollo 10- 0.93 meters

Relativity in Kinetic Energy (plotting multiple functions per graph)[edit]

For every day situations, we can measure the kinetic energy of an object based on its mass and speed with the equation, E = \frac{m\,v^2}{2}. However, special relativity tells us that energy increases to infinity as velocity approaches the speed of light. The more accurate equation that describes kinetic energy at very high relative speeds is E = \lambda\,m\,c^2-m\,c^2. Assign both of these functions, and then graph them together on the same graph to show the error in the Newtonian kinetic energy equation(E=mv^2/2) at very high speeds. Make a graph of both equations at 10% the speed of light, 50% the speed of light and 100% the speed of light. Notice that until very high speeds, the difference in the energy computed in both equations is negligible.

Solution:

kinetic:=(m,v)-> (1/2)*m*v**2; 
kinetic2:= (m,v)-> Gamma(v) * m * c**2- m*c**2;
c:= 299792458;
plot([kinetic2(13, v), kinetic (13,v)], v=0..(.1*c),kinetic_energy, title="Difference Between Newtonian and Relativistic Kinetic Energies at 10% c");
Difference Between Newtonian and Relativistic Energies at 10% c.jpg
plot([kinetic2(13, v), kinetic (13,v)], v=0..(.5*c),kinetic_energy, title="Difference Between Newtonian and Relativistic Kinetic Energies at 50% c");
plot([kinetic2(13, v), kinetic (13,v)], v=0..c,kinetic_energy, title="Difference Between Newtonian and Relativistic Kinetic Energies at 100% c");

Difference Between Newtonian and Relativistic Energies at 100% c.jpg