Advertisement
UF6

Group Project 2, Problem 17

UF6
Apr 29th, 2016
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. %matplotlib inline
  2. import matplotlib.pyplot as plt
  3. from sympy import *
  4. init_printing()
  5.  
  6. x = Symbol("x")
  7. y = Symbol("y")
  8. z = Symbol("z")
  9. L = Symbol("L")
  10. U= Symbol("U")
  11.  
  12. A=solve([y-z,1-x*y,y**2 +z**2 -1,1/2 -L],[x,y,z,L])
  13. B=solve([-y-z,1-x*y,-y**2 -z**2 +1,-1/2 -L],[x,y,z,L])
  14. A[1][0],A[1][1],A[1][2],A[1][3]
  15. B[1][0],B[1][1],B[1][2],B[1][3]
  16. (A[1][0])*(A[1][1])
  17. (B[1][0])*(B[1][1])
  18. (A[1][1])**2 +(A[1][2])**2
  19. (B[1][1])**2 +(A[1][2])**2
  20. (A[1][1])*((A[1][0])+(A[1][3]))
  21. (B[1][1])*((B[1][0])+(B[1][3]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement