Rigorous estimates on roots of function We consider the function
$$f(x) = 1- \frac{1}{N} \sum_{i=1}^N \frac{\sin\left(\tfrac{\pi i}{N}\right)^2}{1+\sin\left(\tfrac{\pi i}{2N}\right)^2-x}.$$
The arguments of the two sines differ by a factor of $2$, and the function as a whole has a bit of the flavour of a Riemann sum.
By monotonicity, there is precisely one root of $f$ in each interval $\Big(1+\sin\big(\tfrac{\pi (i-1)}{2N}\big)^2,1+\sin\big(\tfrac{\pi i}{2N}\big)^2\Big)$ and precisely one root to the left of $ 1+\sin\big(\tfrac{\pi}{2N}\big)^2$. Now I wonder about more refined estimates for the roots of $f$.
Which roots are on the left and which ones are on the right half of the intervals
$\Big(1+\sin\big(\tfrac{\pi (i-1)}{2N}\big)^2,1+\sin\big(\tfrac{\pi i}{2N}\big)^2\Big)?$
Regarding answers as of Dec 15, 2022: I am looking for rigorous estimates with error control.
 A: Let
$$a_i=\sin ^2\left(\frac{\pi  i}{N}\right)\qquad \text{and} \qquad b_i=1+\sin ^2\left(\frac{\pi  i}{2 N}\right)$$ and consider
$$f(x)=1-\frac{1}{N} \sum_{i=1}^N \frac{a_i}{b_i-x}$$ For the root between $b_k$ and $b_{k+1}$, consider instead  the function
$$\color{red}{g(x)=(b_k-x)(b_{k+1}-x)f(x)}$$ which, detailed to avoid the problem of limits, write
$$\color{blue}{g(x)=(b_k-x)(b_{k+1}-x)-}$$ $$\color{blue}{\frac{1}{N} \Big[\sum_{i=1}^{k-1} \frac{a_i(b_k-x)(b_{k+1}-x)}{b_i-x}+a_k(b_{k+1}-x) +a_{k+1}(b_{k}-x)+\sum_{i=k+2}^{N} \frac{a_i(b_k-x)(b_{k+1}-x)}{b_i-x}\Big]}$$ No more vertical asymptotes and a smooth function.
Computing at the bounds
$$g(b_k)=-\frac{a_k(b_{k+1}-b_k)} N \qquad \text{and} \qquad g(b_{k+1})=-\frac{a_{k+1}(b_k-b_{k+1})}N$$
Just using the secant  gives the estimate
$$\color{red}{x_0=\frac{a_{k+1}\,b_k+a_k\,b_{k+1}}{a_{k}+a_{k+1} }}$$
Trying for $N=10$ and $k=4$, the above will give as a first estimate
$$x_0=\frac{132-7 \sqrt{5}}{82}=1.41887$$
while the solution is $x=1.43987$ and the bounds $b_4=\frac{13-\sqrt{5}}{8} =1.34549$, $b_5=\frac 32$.
The first iterates of Newton method are $x_1=1.44146$, $x_2=1.43988$.
Now, may I confess that I spent (wasted ?) more than thirty years with this kind of equations. In chemical engineering, this is the so-called Leibovici & Neoschil method.
A: Put $a_k=1+\sin(k\pi/(2N))^2$, so $f(x)=1-N^{-1}\sum_{k=1}^N(a_k-1)/(a_k-x)$.  Let $b_k$ be the unique root of $f(x)$ lying in $[a_{k-1},a_k]$, and put $t_k=(b_k-a_{k-1})/(a_k-a_{k-1})$, so $t_k$ measures the position of $b_k$ in the interval $[a_{k-1},a_k]$.  Experimental calculation makes it clear that $t_k$ is very well approximated by a linear function $t_k\approx m_Nk+c_N$ with $1/(2N-3)<m_N<1/(2N-2)$ and so $2Nm_N\to 1$ as $N\to\infty$.  In particular, it seems that $t_k<1/2$ unless $k$ is very close to $N$.  When $N=100$ we have $t_k<1/2$ iff $k\leq 97$.
