Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %matplotlib inline
- import matplotlib.pyplot as plt
- from sympy import *
- init_printing()
- x = Symbol("x")
- y = Symbol("y")
- z = Symbol("z")
- L = Symbol("L")
- A=solve([L*2*x-2, L*2*y-6,L*2*z-10,x**2 +y**2 +z**2 -25], [x,y,z,L])
- A[1][0],A[1][1],A[1][2],A[1][3]
- (1)**2 +(3)**2 +(5)**2
- (-1)**2 +(-3)**2 +(-5)**2
- 2*(1)+6*(3)+10*(5)#min
- 2*(-1)+6*(-3)+10*(-5)#max
Add Comment
Please, Sign In to add comment