A divergent Definite Integral I am trying the study a definite integral
$$\int_{0}^{\pi}\frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} dx$$
It is a divergent integral, but I am struggling to show that fact. Since the discontinuous point is at $\frac{\pi}{2}$, so
$$\int_{0}^{\pi}\frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} dx= \lim_{a \rightarrow \frac{\pi}{2}} \int_{0}^{a} \frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} dx + \lim_{a \rightarrow \frac{\pi}{2}} \int_{a}^{\pi} \frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} dx$$
Then I study the first term on RHS which is $\lim_{a \rightarrow \frac{\pi}{2}} \int_{0}^{a} \frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} dx$.
For $x \in [0,\frac{\pi}{2}]$, I try to bound the function $\frac{1}{(x-\frac{\pi}{2})^3+1} \leq \frac{1}{(x-\frac{\pi}{2})^3+\cos{x}} \leq \frac{1}{(x-\frac{\pi}{2})^3}$.
I can show $\int_{0}^{a}\frac{1}{(x-\frac{\pi}{2})^3} dx$ is divergent. But by comparison, I cannot say that the required function is also divergent.
How can I continue to show that the function is divergent? Thanks~

One approach may be to change variables to $u = x-\pi/2$
$$
\begin{split}
\int_0^\pi \frac{dx}{(x-\frac{\pi}{2})^3+\cos{x}}
 &= \int_{-\pi/2}^{\pi/2} \frac{du}{u^3+\cos(u + \pi/2)} \\
 &= \int_{-\pi/2}^{\pi/2} \frac{du}{u^3-\sin u} \\
 &= 2 \int_0^{\pi/2} \frac{du}{u^3-\sin u},
\end{split}
$$
where the last step is because the integrand is odd. Now over $[0,\pi/2]$ we have $\sin u \le 1$ so $u^3 - 1 \le u^3-\sin x$ therefore,
$$
\int_0^{\pi/2} \frac{du}{u^3-\sin u} \ge \int_0^{\pi/2} \frac{du}{u^3-1},
$$
which you can integrate analytically by factoring the denominator and applying partial fractions. It will diverge.
