I am trying to solve a system of equations:
using SymPy
@syms F_t delta F_a beta_c F_tp F_ap g_p theta v lambda
g = 9.81
m = 9.2;
r = 30;
eq1 = F_t*cos(delta) - F_a*cos(theta) + m*g*sin(beta_c)
eq2 = (m*v^2)/r - F_t*sin(delta) - m*g*cos(beta_c)*cos(lambda) - F_a*sin(theta)
solve([eq1, eq2], [F_t, theta])
I know that a solution exists (other CAS systems can find them), even though the result is quite complex.
But solve just hangs, no error message, no result.
Any idea?
Uwe
You haven’t defined beta_c and others. Was that on purpose so that the solution is a symbolic expression in these variables?
Indeed, I would like to have a symbolic solution. The following code works already:
using SymPy
@syms F_t F_a v theta lambda delta
g = 9.81
m = 9.2
r = 30.0
beta_c = 25*pi/180.0
eq1 = F_t*cos(delta) - F_a*cos(theta) + m*g*sin(beta_c)
eq2 = (m*v^2)/r - F_t*sin(delta) - m*g*cos(beta_c)*cos(lambda) - F_a*sin(theta)
solve([eq1, eq2], [F_t, theta])
It takes a few minutes to solve. So perhaps the original task would also find a solution, if I wait long enougth. Any ideas how to improve the performance?
Uwe