Explanation for $\int_{\frac{\pi}{2}+(j-1)\pi}^{\frac{\pi}{2}+j\pi} \frac{|\cos(t)|}{\frac{\pi}{2}+j\pi} \,dt = \frac{2}{\frac{\pi}{2}+j\pi} $ I don't see how / why one can rewrite the integral as following:
$$\int_{\frac{\pi}{2}+(j-1)\pi}^{\frac{\pi}{2}+j\pi}  \frac{|\cos(t)|}{\frac{\pi}{2}+j\pi}  \,dt = \frac{2}{\frac{\pi}{2}+j\pi} $$
I think this should be rather easy, but I don't see what I'm missing.

We can write
\begin{align*}
\int_{\frac{\pi}{2}+(j-1)\pi}^{\frac{\pi}{2}+j\pi}  \frac{|\cos(t)|}{\frac{\pi}{2}+j\pi}  \ dt & = \frac{1}{\frac{\pi}{2}+j\pi} \int_{\frac{-\pi}{2}+j\pi}^{\frac{\pi}{2}+j\pi}|\cos(t)| \ dt\\
&\overset{\color{blue}{u=t-j\pi} }{=} \frac{1}{\frac{\pi}{2}+j\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|\cos(u+j\pi)| \ du\\
\end{align*}
and if $j$ is an integer, we know that
$$|\cos(u + j\pi)| = |(-1)^j \cos(u)| = |\cos(u)|
$$
so we get\begin{align*}
\frac{1}{\frac{\pi}{2}+j\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|\cos(u+j\pi)| \ du & = \frac{1}{\frac{\pi}{2}+j\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|\cos(u)| \ du
\end{align*}
and on the interval $\left( -\frac{\pi}{2}, \frac{\pi}{2} \right)$ we know that cosine is positive, so on this interval (which is the one we're integrating on) we get $|\cos(u)| = \cos(u)$. And lastly we see
\begin{align*}
 \frac{1}{\frac{\pi}{2}+j\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}|\cos(u)| \ du & = \frac{1}{\frac{\pi}{2}+j\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\cos(u) \ du\\ 
& = \frac{1}{\frac{\pi}{2}+j\pi} \sin(u)\Biggr|_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\\
& = \frac{1}{\frac{\pi}{2}+j\pi} \left(1 - (-1)\right)\\ 
&  = \frac{2}{\frac{\pi}{2}+j\pi} 
\end{align*}
