The integral $\int _{\:0}^{\:\frac{\pi }{2}}\:1+\left(-sinx\right)+\left(-sinx\right)^2+...dx$ is a geometric sereis which can be expressed as $\int _0^{\frac{\:\pi }{\:2}}\:\frac{1}{1-\left(-sinx\right)}dx$.
But this is only valid if $|r|<1$. In the given bounds in the integral, $\sin{x}$ is precisely in between $0$ and $-1$, but at $\sin(90)$, it is actually equal to $-1$ which does not suit $|r|<1$
It always thought that the endpoints were inclusive in a definite integral but that seems to lead to contradictions here.