mirror of
https://codeberg.org/Yael-II/MSc2-Project-Chaos.git
synced 2026-03-15 04:16:26 +01:00
18 lines
225 B
Python
18 lines
225 B
Python
from sympy import *
|
|
|
|
# Forces
|
|
X, Y, U, V = symbols("X, Y, U, V")
|
|
POT = (X**2 + Y**2 + 2*X**2*Y - 2*Y**3/3)/2
|
|
KIN = (U**2 + V**2)/2
|
|
TOT = KIN + POT
|
|
|
|
DX = diff(POT, X)
|
|
DY = diff(POT, Y)
|
|
|
|
FX = -DX
|
|
FY = -DY
|
|
|
|
print(FX)
|
|
print(FY)
|
|
|