Since sec ( theta ) != 0, you need [ 2 tan ( theta ) + sec ( theta ) ] = 0
which means 2 sin ( theta ) + 1 = 0
If you want to solve it numerically rather than analytically, and you plug different angle values for theta such that
2 sin ( theta1 ) + 1 > 0 and 2 sin ( theta2 ) + 1 < 0 then you know that 2 sin ( theta ) + 1 = 0 for some theta between theta1 and theta2, and you can binary search to narrow it down

which means 2 sin ( theta ) + 1 = 0

If you want to solve it numerically rather than analytically, and you plug different angle values for theta such that

2 sin ( theta1 ) + 1 > 0 and 2 sin ( theta2 ) + 1 < 0 then you know that 2 sin ( theta ) + 1 = 0 for some theta between theta1 and theta2, and you can binary search to narrow it down