#importing modules
import math
from __future__ import division
#Variable declaration
m=9*10**-28; #mass(gram)
E=100; #kinetic energy(eV)
e=1.6*10**-12; #kinetic energy(erg)
mc=4000; #mass of car(kg)
mt=10000; #mass of truck(kg)
vc=30; #speed of car(m/s)
#Calculation
P=math.sqrt(E*e*2*m); #momentum of electron(gm cm/sec)
vt=mc*vc/mt; #velocity of truck in 1st case(m/sec)
v1=math.sqrt(mc*vc**2/mt); #velocity of truck in 2nd case(m/sec)
#Result
print "momentum of electron is",round(P*10**19,2),"*10**-19 gm cm/sec"
print "velocity of truck in 1st case is",int(vt),"m/sec"
print "velocity of truck in 2nd case is",round(v1,2),"m/sec"
#importing modules
import math
from __future__ import division
#Variable declaration
v=30; #speed(m/sec)
P1=30; #momentum of 1st part(i)
P2=30; #momentum of 2nd part(j)
P3=3; #momentum of 3rd part(v)
#Calculation
#from conservation of momentum, 30i+30j+3v=0. from which we get v=-10(i+j)
i=1; #coordinate of i
j=1; #coordinate of j
m=math.sqrt(i**2+j**2); #magnitude
mv=10*m; #magnitude of velocity(m/sec)
vbar=math.acos(-10/mv); #direction of velocity(rad)
vbar1=int(vbar*180/math.pi); #direction of velocity(degrees)
vbar2=360-vbar1; #direction of velocity(degrees)
#Result
print "magnitude of velocity is",int(mv/math.sqrt(2)),"*math.sqrt(2) m/sec"
print "direction of velocity is",vbar1,"degrees or",vbar2,"degrees"
#importing modules
import math
from __future__ import division
#Variable declaration
v0=0; #initial velocity of rocket
vr=1.6; #velocity of gases(km/sec)
v=11.2; #final velocity(km/sec)
alphabyM0=1/10; #fuel burnt rate
#Calculation
#assume x=log(M0/M)
x=(v-v0)/vr;
M0byM=math.exp(x);
MfbyMe=M0byM-1; #ratio of mass of fuel to empty rocket
t=(1-(1/M0byM))*(1/alphabyM0); #time(sec)
#Result
print "ratio of mass of fuel to empty rocket is",int(MfbyMe)
print "answer given in the book is wrong"
print "time is",round(t,2),"sec"
#importing modules
import math
from __future__ import division
#Variable declaration
m1=300; #mass in 1st stage(kg)
m2=30; #mass in 2nd stage(kg)
m3=2400; #fuel filled(kg)
m4=270; #fuel filled(kg)
u=2; #velocity(km/sec)
#Calculation
M0=m1+m2+m3+m4; #mass(kg)
M=m1+m2+m4; #mass(kg)
v0=u*math.log(M0/M); #initial velocity of rocket to the second stage(km/sec)
M01=m2+m4; #mass(kg)
V=v0+(u*math.log(M01/m2)); #final velocity of rocket(km/sec)
#Result
print "final velocity of rocket is",round(V,2),"km/sec"
#importing modules
import math
from __future__ import division
#Variable declaration
mr=40; #mass of rocket(kg)
mf=360; #mass of fuel(kg)
g=9.8; #acceleration due to gravity(kg/m**2)
v=2*10**3; #exhaust velocity(m/sec)
v0=0; #velocity(m/sec)
#Calculation
M=mr+mf; #mass(kg)
dmbydt=M*g/v; #thrust(kg/sec)
t=mf/dmbydt; #time taken(sec)
Vmax=v0+(v*math.log(M/mr))-(g*t); #final velocity of rocket(m/sec)
#Result
print "final velocity of rocket is",round(Vmax/10**3,1),"km/sec"
#importing modules
import math
from __future__ import division
#Variable declaration
g=9.8; #acceleration due to gravity(kg/m**2)
vr=800; #exhaust velocity(m/sec)
M=8000; #mass(kg)
a=30; #acceleration(m/s**2)
#Calculation
dMbydt=M*g/vr; #thrust on rocket(kg/sec)
dMbydt1=M*(g+a)/vr; #thrust on rocket to give acceleration(kg/sec)
#Result
print "thrust on rocket is",int(dMbydt),"kg/sec"
print "thrust on rocket to give acceleration is",int(dMbydt1),"kg/sec"
#importing modules
import math
from __future__ import division
#Variable declaration
urel=10000; #exhaust velocity(m/s)
dMbydt=0.02; #rate of fuel burnt(kg/sec)
#Calculation
Freaction=urel*dMbydt; #thrust acting on rocket(N)
#Result
print "thrust acting on rocket is",int(Freaction),"N"
#importing modules
import math
from __future__ import division
#Variable declaration
M=5000; #mass of rocket(kg)
mf=40000; #mass of fuel(kg)
urel=2*10**3; #exhaust velocity(m/sec)
v0=0;
#Calculation
M0=M+mf; #mass(kg)
V=v0+(urel*math.log(M0/M)); #maximum velocity of rocket(m/sec)
#Result
print "final velocity of rocket is",round(V/10**3,1),"km/sec"
#importing modules
import math
from __future__ import division
#Variable declaration
P1=9.22*10**-21; #momentum(kgm/s)
P2=5.33*10**-21; #momentum(kgm/s)
m=3.9*10**-25; #mass of nucleus(kg)
#Calculation
P=math.sqrt(P1**2+P2**2); #momentum(kgm/s)
V=P/m; #recoil velocity of nucleus(m/s)
theta=math.atan(P2/P1); #direction of momentum of nucleus(rad)
theta=180-(theta*180/math.pi); #direction of momentum of nucleus(degrees)
K=P**2/(2*m); #kinetic energy(J)
#Result
print "recoil velocity of nucleus is",round(V/10**5,2),"*10**5 m/s"
print "direction of momentum of nucleus is",round(theta),"degrees"
print "kinetic energy is",round(K*10**15,3),"*10**-15 J"
#importing modules
import math
from __future__ import division
#Variable declaration
malpha=4; #kinetic energy of alpha particle(MeV)
mth=234; #mass of thorium(kg)
valpha=1.5*10**7; #velocity(m/s)
#Calculation
vth=-malpha*valpha/mth; #recoil velocity of residual(m/s)
Kalpha=malpha; #kinetic energy of alpha(MeV)
Kth=malpha*Kalpha/mth; #kinetic energy of residual(MeV)
#Result
print "recoil velocity of residual is",round(vth/10**5,3),"*10**5 m/s"
print "kinetic energy of residual is",round(Kth,3),"MeV"
#importing modules
import math
from __future__ import division
from sympy import Symbol
#Variable declaration
u1=9; #velocity(m/sec)
theta=30*math.pi/180; #scattering angle(rad)
u2=0; #velocity(m/sec)
m=Symbol("m");
#Calculation
v1plusv2=u1/math.cos(theta);
v1minusv2=u2/math.cos(180-theta);
v1=(v1plusv2+v1minusv2)/2; #velocity before collision
v2=(v1plusv2-v1minusv2)/2; #velocity after collisiovelocity after collision isn,v2
KE1=(m*(u1**2/2))+(m*(u2**2/2)); #kinetic energy before collision
KE2=((m*v1**2)/2)+((m*v2**2)/2); #kinetic energy before collision
#Result
print "velocity before collision is",round(v1,3)
print "velocity after collision is",round(v2,3)
print "kinetic energy before collision is",KE1
print "kinetic energy before collision is",KE2
print "energy is not conserved"