Is there a way to find an accurate polynomial interpolation and approximation of $\cot(\pi z)$ on the interval $0.1 < z < 0.999$ with a polynomial of degree $2$?
The function is clearly continuous at that interval.
I need to use this function to calculate several values of $z$ at that interval and will want to avoid the $1/z$ term in the series expansion of $\cot(\pi z)$ on that interval.
I already have a Fourier series expansion that converges on that interval but it requires $100$ coefficient terms and so I was wondering if there was a way to utilize a simple polynomial to approximate it to a marginal error.
I think that with a polynomial of degree $n \geq 3$ for $0.1 \leq z \leq 0.9$, we could do a "decent" job.
The idea is to minimize $$\Phi_n=\int_a^{1-a} \Bigg[\cot(\pi z)-\sum_{k=0}^n a_k\,z^k \Bigg]^2\, dz$$ which can be computed explicitly in terms of polylogarithms with complex arguments.
For example, making the numbers rational for $a=0.1$ and $n=3$, the approximation is $$\frac{73056}{15485}-\frac{219043 }{9272}z+\frac{222361 }{5224}z^2-\frac{222361 }{7836}z^3$$ giving $\Phi_3=0.00413$.