Here's the code with equations I'm trying to solve using sympy
:
# Import sympy
from math import remainder, tau
from sympy import *
from sympy.solvers import solve
# Define the parameters
nx, ny, nz = [0,0,1]
a,b,c = [0,0,0]
d = 1
t = 9
# Solve the equations
theta = remainder(2*t*sqrt(b**2+c**2+d**2), tau)
delta, beta, gamma = symbols('delta beta gamma')
beta = 7 # Randomly assigned.
eq1 = Eq(tan((delta+beta)/2),nz*tan(theta/2))
eq2 = Eq(ny*tan((delta-beta)/2),nx)
eq3 = Eq(cos((delta+beta)/2)*cos(gamma/2),cos(theta/2))
result = solve([eq1, eq2, eq3], [delta, beta, gamma])
My question is based on the last parameter t
. For the current value, the function should be solvable but it doesn't return any results. If I change the value of t to some other values, then I can get the result. For instance, if t=99
, then the results look like
[(-12.0619298297468, 9.00000000000000, 7.46580816699663e-8*I),
(-12.0619298297468, 9.00000000000000, 12.5663706143592 - 7.46580045560101e-8*I)]
Why I'm unable to get the result from the first t value? How can I fix the issue? Thanks!!