Solve complex trigonomentric equations