Basically I'm trying to solve the equation
$$A\Big(\sin(\theta_a-\theta_{a+1}) + \sin(\theta_a-\theta_{a-1})\Big) + B\Big(n_a^z \sin(\theta_a) - n_a^x \cos(\theta_a)\Big) = 0$$ subjected to the constraint that $$A\Big(\cos(\theta_a-\theta_{a+1}) + \cos(\theta_a-\theta_{a-1})\Big) + B\Big(n_a^x \sin(\theta_a) + n_a^z \cos(\theta_a) \Big) > 0.$$ In addition I would like all of the angles $\theta_a$ to lie on the interval $(-\pi,\pi)$.
Here $A$ and $B$ are some numerical constants and $a$ labels the sites of a lattice. For concreteness let's say that $a=1,2,3,\dots,N$ where $N$ is some finite even number. Furthermore the numbers $n_a^z = 1$ and $n_a^x = 0$ for all sites except $a = N/2$. At the site $a = N/2$ the two numbers can be chosen arbitrarily. For instance $n_{N/2}^z = -1/\sqrt{2}$ and $n_{N/2}^x = -1\sqrt{2}$.
Furthermore I'm using the periodic boundary conditions $\theta_1 = \theta_N = 0$.
To solve this numerically I have tried using the function FindRoot on the first equation. However, this results in that some of the angles I find are not satisfying the second constraint. Is there a nice way of solving the above two equations numerically for a finite lattice in Mathematica?
The problem is basically that my initial guess $(\theta_a = \pi/4)$ in FindRoot ends up giving me an angle that satisfies the first equation, but does not satisfy the second equation.