How to solve symbolically a pair of nonlinear equations using Python (sympy)?
问题 I have the following code for a system of three nonlinear equations with three unknowns: import sympy as sp from sympy import symbols, cos, sin v0, a0, f0 = symbols('v0 a0 f0') v1, a1, f1 = symbols('v1 a1 f1') w, t = symbols('w t') g1 = v0 + a0 * w * cos(w*t + f0) - v1 - a1 * w * cos(f1) g2 = v0**2 + a0**2*w**2 -v1**2 - a1**2*w**2 g3 = a0 * sin(w*t + f0) - a1*sin(f1) sp.solvers.solve((g1,g2,g3), (a1,v1,f1)) The system of equations looks very complicated but actually it is easily solved with