Let $k\in\mathbb{N}$. Originally, I was looking at a similar limit:
$$\lim_{k\to\infty} \left|\int_0^{\pi/2} \frac{\sin(2kx)}{\cos(x)}\,dx\right|$$
Using induction and angle-addition, one can show
$$\sin(2kx) = 2(-1)^k \cos(x) \sum_{j=1}^{k}(-1)^j\sin((2j-1)x)$$
It follows that
$$\lim_{k\to\infty} \left|\int_0^{\pi/2} \frac{\sin(2kx)}{\cos(x)}\,dx\right| = \lim_{k\to\infty}2\sum_{j=1}^{k}\frac{(-1)^{j+1}}{2j-1} = \frac{\pi}{2}$$
However, the limit obtained by moving the absolute values inside, i.e. $\lim_{k\to\infty} \int_0^{\pi/2} \left|\frac{\sin(2kx)}{\cos(x)}\right|\,dx$, is more interesting. For starters, I don't think it converges, though I can't show this at the moment. Empirically, the data are fit quite well by $f(k)=0.639135\log(1+22.326298k)$
We can't use the Dominated Convergence Theorem, as $\lim_{x\to\pi/2}|\sin(2kx)/\cos(x)|=2k$, so there's not a $g(x)$ that dominates $|\sin(2kx)/\cos(x)|$ on $[0,\pi/2]$. I also tried splitting $[0,\pi/2]$ into $k$ subsections, since we can still use the series identity, but that didn't seem to help with the integration. Perhaps differentiating under the integral sign will help?

-(e^(i (1 - 2 k) x) cos(x) csc(2 k x) ((1 + 2 k) 2F1(1, 1/2 - k, 3/2 - k, -e^(2 i x)) + e^(4 i k x) (-1 + 2 k) 2F1(1, 1/2 + k, 3/2+k,-e^(2ix)))sqrt(sin^2(2kx)))/((-1+4k^2)sqrt(cos^2(x))), so you should try plugging in $x=\pi/2$ and subtracting from the case $x=0$. Unfortunately I don't have mathematica installed on my current machine, and wolfram doesn't want to do the substitution $x=\pi/2$, but it should be computable by hand too. – Snared Jan 06 '25 at 04:45