summaryrefslogtreecommitdiff
path: root/2780/CH1/EX1.27/Ex1_27.sce
blob: 9ae6765c64f68d02f5aa414b1f8ae974a567f2f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
//to calculate speed of 0.1MeV electron
E=0.512*10^6 //rest mass energy E=m0*c^2
c=3*10^8 //velocity of light (m/s)
K=0.1*10^6 //kinetic energy (MeV)
v=c*sqrt(1-(E/(K+E))^2) 
disp("speed of electron is v="+string(v)+"m/s" )
//to calculate mass and speed of 2MeV electron
E=2*10^6*1.6*10^-19 //in (J)
m=E/c^2 
disp("mass is m="+string(m)+"kg")
m0=9.11*10^-31 //electron mass (kg)
v=c*sqrt(1-m0^2/m^2)
disp("speed is v="+string(v)+"m/s")