Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- import sympy
- b1 = sympy.Symbol('b1')
- b2 = sympy.Symbol('b2')
- b12 = (b1+b2)/(1+b1*b2)
- w1 = sympy.Symbol('w1',positive=True)
- w2 = sympy.Symbol('w2',positive=True)
- w12 = b12/sympy.sqrt(1-b12**2)
- w12 = w12.subs(b1,w1/sympy.sqrt(1+w1**2)).subs(b2,w2/sympy.sqrt(1+w2**2))
- w12 = w12.simplify()
- sympy.pprint(w12)
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement