Integral Representation of the Odd Zeta Function Values

In this book (M. Abramowitz, I. Stegun (Eds.), Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables, Dover Publications, New York, 1972), page 807, Equation 23.2.17, it is stated that it is possible to represent the odd values of the Riemann zeta function as this integral:

$$\zeta\left(2n+1\right) = \frac{\left(-1\right)^{n+1}\left(2\pi\right)^{2n+1}}{2\left(2n+1\right)!}\int_{0}^{1}B_{2n+1}\left(x\right)cot\left(\pi x\right)dx$$

I just don't understand how to prove this, I've looked everywhere and haven't found decent proof of this. How can this be correct if $$x^ncot(\pi x)$$ can not be evaluated at 1?

• Formula (84) at Wolfram Mathworld: Riemann Zeta Function) indicates $\cot\left(\frac{\pi x}{2}\right)$ instead of $\cot(\pi x)$, but perhaps the two integrals are equivalent. Commented Apr 2, 2023 at 23:01
• Your objection just means that this is an improper integral, like $\int_0^1x^{-1/2}\,dx$. Commented Apr 2, 2023 at 23:02
• @StevenClark in fact, plugging that 1/2 into the cotangent makes the interval integrable. Perhaps the equation in the book is correct and is equivalent as you said, however, the one you mentioned makes much more sense. Thanks. If you turned this comment into an answer, I would select it as correct answer. Commented Apr 3, 2023 at 5:30
• Note that $B_{2n+1}(1)=0$. So, this is in fact a well-defined integral. Commented Jul 10 at 18:54