Nature of the series $\sum_{n\ge0}\int_0^{\pi/2}\cos^n(t)\sin(nt)\,dt$ 
Consider, for all $n\ge0$ :
$$u_n=\int_0^{\pi/2}\cos^n(t)\sin(nt)\,dt$$
Does the series $\sum_{n\ge0}u_n$ converge ?

 A: The series diverges by comparison with the harmonic series. We can get a lower bound $u_n \geqslant \frac{1}{2n}$ from noting that
\begin{align}
\cos^n t \sin (nt) &= \operatorname{Im} e^{int} \cos^n t \\
&= \operatorname{Im} e^{int} \biggl(\frac{e^{it} + e^{-it}}{2}\biggr)^n \\
&= 2^{-n} \operatorname{Im} e^{int} \sum_{k = 0}^{n} \binom{n}{k} e^{ikt} e^{-i(n-k)t} \\
&= 2^{-n} \operatorname{Im} \sum_{k = 0}^{n} \binom{n}{k} e^{2ikt} \\
&= 2^{-n} \sum_{k = 0}^{n} \binom{n}{k} \sin (2kt) \\
&= 2^{-n} \sum_{k = 1}^{n} \binom{n}{k} \sin (2kt),
\end{align}
and
$$\int_0^{\pi/2} \sin (2kt)\,dt = -\frac{\cos (2kt)}{2k}\biggr\rvert_0^{\pi/2} = \frac{1 - (-1)^k}{2k}$$
for $k > 0$. Thus
$$u_n = 2^{-n} \sum_{\substack{0 < k \leqslant n \\ k\text{ odd}}} \binom{n}{k} \frac{1}{k} \geqslant \frac{1}{n2^n}\sum_{\substack{0 < k \leqslant n \\ k\text{ odd}}} \binom{n}{k} = \frac{2^{n-1}}{n2^n} = \frac{1}{2n}.$$
Another way, that when done completely gives the more precise $u_n \sim \frac{1}{n}$, is to split the interval into parts, starting with
$$\int_0^{\frac{\pi}{2n}} \cos^n t \sin (nt)\,dt \geqslant \bigl(\cos \frac{\pi}{2n}\bigr)^n\int_0^{\frac{\pi}{2n}}\sin (nt)\,dt = \bigl(\cos \frac{\pi}{2n}\bigr)^n\cdot \frac{1}{n},$$
which is $\sim \frac{1}{n}$. Then we consider
$$I_{n,k} = \int_{(2k-1)\frac{\pi}{2n}}^{(2k+1)\frac{\pi}{2n}} \cos^n t\sin (nt)\,dt$$
for $1 \leqslant k \leqslant \frac{n-1}{2}$. Since $\cos t$ is decreasing on $\bigl[0,\frac{\pi}{2}\bigr]$, we have $\lvert I_{n,k}\rvert > \lvert I_{n,k+1}\rvert$, and the $I_{n,k}$ have alternating sign, $\lvert I_{n,k}\rvert = (-1)^{k-1} I_{n,k}$. Thus
$$0 \leqslant \sum_{k = 1}^{\bigl\lfloor\frac{n-1}{2}\bigr\rfloor} I_{n,k} \leqslant I_{n,1},$$
and one can without too much trouble see that $I_{n,1} \leqslant \frac{C}{n^2}$ for a suitable $C > 0$.If $n$ is even, there remains a last subinterval, $\bigl[ \frac{(n-1)\pi}{2n},\frac{\pi}{2}\bigr]$, but on that interval $\cos t \leqslant \frac{\pi}{2n}$, whence the contribution of it is $O(n^{-n-1})$. Altogether, this yields
$$u_n = \frac{1}{n} + O(n^{-2}).$$
A: By integration by parts,
$$ u_n = \int_{0}^{\frac{\pi}{2}} (1-\cos (nt)) \cos^{n-1}t \sin t \, dt \geq 0. $$
Thus it follows that
\begin{align*}
\sum_{n=0}^{\infty} u_n
&= \lim_{r\uparrow 1} \sum_{n=0}^{\infty} u_n r^n \tag{1} \\
&= \lim_{r\uparrow 1} \int_{0}^{\frac{\pi}{2}} \operatorname{Im}\left( \sum_{n=0}^{\infty} r^n \cos^n t e^{int} \right) \, dt \tag{2} \\
&= \lim_{r\uparrow 1} \int_{0}^{\frac{\pi}{2}} \frac{r\cos t \sin t}{(1-r)\cos^2 t + \sin^2 t} \, dt \\
&= \int_{0}^{\frac{\pi}{2}} \cot t \, dt
 = \infty. \tag{3}
\end{align*}
Here are some explanations:


*

*(1) This follows from the monotone convergence theorem. Alternatively, this can be understood from the fact that supremums commute:
$$ \sum_{n=0}^{\infty} u_n
= \sup_{N \in \Bbb{N}} \sup_{r \in [0,1)} \sum_{n=0}^{N} u_n r^n
= \sup_{r \in [0,1)} \sup_{N \in \Bbb{N}} \sum_{n=0}^{N} u_n r^n
= \lim_{r\uparrow 1} \sum_{n=0}^{\infty} u_n r^n. $$

*(2) This follows either from the dominated convergence theorem or from the uniform convergence of $\sum_n r^n \cos^n t e^{int}$ for $r \in [0, 1)$. Uniform convergence of this series is easy to establish in view of the Weierstrass $M$-test.

*(3) This follows from the monotone convergence theorem, together with the fact that the integrand is increasing in $r$: $$ \frac{\partial}{\partial r} \left( \frac{r}{(1-r)\cos^2 t + \sin^2 t} \right) = \frac{1-r^2\cos^2 t}{((1-r)\cos^2 t + \sin^2 t)^2} \geq 0. $$
Alternatively, we can utilize the following computation:
$$ \int_{0}^{\frac{\pi}{2}} \frac{r\cos t \sin t}{(1-r)\cos^2 t + \sin^2 t} \, dt = -\frac{\log(1-r)}{2-r}. \tag{4} $$

Addendum. The identity $\text{(4)}$ yields an exact formula for $(u_n)$:
$$ u_n
= \sum_{k=1}^{n} \frac{1}{k 2^{n+1-k}}
= \sum_{j=1}^{\infty} \left( \sum_{k=0}^{n-1} \frac{k^{l-1}}{2^{k+1}} \right) \frac{1}{n^l}. $$
Using this, for arbitrary fixed $N \geq 1$ we have the following asymptotics:
$$ u_n = \sum_{j=1}^{N} \frac{a(j-1)}{n^j} + \mathcal{O}(n^{-N-1}) $$
as $n\to\infty$, where $a(n)$ are the ordered Bell numbers.
A: Here's an alternate path to try.
Over the interval $[0, \pi/2]$, $\cos^n t$ is close to $1$ in a neighborhood of $0$ and very small elsewhere, so breaking up the integral and using the common asymptotics $\cos t \approx 1 - \frac{t^2}{2}$ and $\sin t \approx t$ as $t \to 0$ seems like it might be fruitful. 
Due to the sine term, we need to look at smaller and smaller intervals to make those asymptotics work, so let's formalize this. Let $\epsilon > 0$. We desire $nt < \epsilon$, so we have $t < \frac{\epsilon}{n}$. Now we can break our integral up:
$$\int_0^{\pi/2} \cos^n(t) \sin(nt) \,dt = \int_0^{\epsilon/n} \cos^n(t) \sin(nt) \,dt + \int_{\epsilon/n}^{\pi/2} \cos^n(t) \sin(nt) \,dt$$
Let's check out the left term first. Applying the asymptotics, we have
$$\begin{array}{rl}
\int_0^{\epsilon/n} \cos^n(t) \sin(nt) \,dt &\approx \int_0^{\epsilon/n} \left( 1 - \frac{t^2}{2} \right)^n (nt) \, dt\\
\small{\left(u = 1 - \frac{t^2}{2}\right)}&= -n\int_1^{1-(\epsilon/n)^2/2} u^n \, du\\
&= n\int_{1-(\epsilon/n)^2/2}^1 u^n \, du\\
&= \left. \frac{n}{n+1} u^{n+1} \right|_{1-(\epsilon/n)^2/2}^1 \\
&= \frac{n}{n+1} \left[ 1 - \left(1-(\epsilon/n)^2/2\right)^{n+1} \right] \\
\small{(1+x)^n \approx 1 + nx} &\approx \frac{n}{n+1} \left[ (n+1)(\epsilon/n)^2/2 \right] \\
&= \frac{\epsilon^2}{2n}
\end{array}$$
Now all that's needed is to prove that the right term doesn't end up cancelling out the left term conspiratorially and formalize some of the prior arguments with big O terms. Unfortunately, I don't see an obvious way to do the former at the moment, but it seems true since $\cos^n t$ is decreasing on the interval and $\sin nt$ is rapidly oscillating.
