Solving a more complex trig equation.