Advertisement
bolverk

derivation_relativistic_addition_4_velocity

Mar 1st, 2015
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. def main():
  2.  
  3.     import sympy
  4.  
  5.     b1 = sympy.Symbol('b1')
  6.     b2 = sympy.Symbol('b2')
  7.     b12 = (b1+b2)/(1+b1*b2)
  8.  
  9.     w1 = sympy.Symbol('w1',positive=True)
  10.     w2 = sympy.Symbol('w2',positive=True)
  11.     w12 = b12/sympy.sqrt(1-b12**2)
  12.  
  13.     w12 = w12.subs(b1,w1/sympy.sqrt(1+w1**2)).subs(b2,w2/sympy.sqrt(1+w2**2))
  14.     w12 = w12.simplify()
  15.  
  16.     sympy.pprint(w12)
  17.  
  18. if __name__ == '__main__':
  19.  
  20.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement