The following is an old Analysis qualifying problem I am tried to solve but I have not been able to solve rigorously.
Suppose $f$ is continuous in $[0,\pi/2]$. A simple application of dominated convergence shows that $$I_n=\int^{\pi/2}_0 x f(x) (\cos x)^n\, dx \rightarrow0\quad\text{as}\quad n\rightarrow\infty$$ The problem asks to show that $$I_n\sim \frac{1}{n}f(0)+o(1/n)$$
This integral seems to have similarities with integrals where the Laplace method can be use. The function $\cos$ has maximum at $x=0$ in $[0,1]$, so it is not surprise that the values of $x\in[0,\pi/2]$ that contribute to $I_n$ are those near $0$. On the other hand, $\sin x\sim x$ as $x\rightarrow0$. This suggest that $$I_n\sim \int^{\pi/2}_0f(0)\sin x(\cos x)^n\,dx=\frac{1}{n+1}f(0)$$ I can't find a way to put things into a rigorous argument. Any help is appreciated. Thank you!
We have $$I_n = f(0)\int_0^{\pi/2} x(\cos x)^n\,\mathrm{d}x + \int_0^{\pi/2} x(f(x) - f(0))(\cos x)^n \,\mathrm{d} x.$$
Let $$K_n := \int_0^{\pi/2} x(\cos x)^n\,\mathrm{d}x, \quad J_n := \int_0^{\pi/2} x(f(x) - f(0))(\cos x)^n \,\mathrm{d} x.$$
Using $x \ge \sin x$ for all $x \ge 0$, we have $$K_n \ge \int_0^{\pi/2} \sin x \, (\cos x)^n\,\mathrm{d} x = \frac{1}{n + 1}.$$
Using $x \le \sin x + \sin^3 x$ on $[0, \pi/2]$ (easy to prove using $\sin x \ge x - x^3/6$), we have $$K_n \le \int_0^{\pi/2} \left(\sin x + \sin^3 x\right) (\cos x)^n\,\mathrm{d} x = \frac{1}{n+1} + \frac{2}{(n+1)(n+3)}.$$
Thus, we have $$K_n = \frac1n + o(1/n).$$
On the other hand, we have \begin{align*} |J_n| &\le \int_0^{\pi/2} x\, |f(x) - f(0)|\, (\cos x)^n\,\mathrm{d} x\\ &\le \int_0^{\pi/2} 2\sin x\, |f(x) - f(0)|\, (\cos x)^n\,\mathrm{d} x\\ &= \int_0^{1/\sqrt[4]{n}} 2\sin x\, |f(x) - f(0)|\, (\cos x)^n\,\mathrm{d} x + \int_{1/\sqrt[4]{n}}^{\pi/2} 2\sin x\, |f(x) - f(0)|\, (\cos x)^n\,\mathrm{d} x\\ &\le a_n \int_0^{1/\sqrt[4]{n}} 2\sin x (\cos x)^n\,\mathrm{d} x + M \int_{1/\sqrt[4]{n}}^{\pi/2} 2\sin x(\cos x)^n\,\mathrm{d} x\\ &\le a_n \int_0^{\pi/2} 2\sin x (\cos x)^n\,\mathrm{d} x + M \int_{1/\sqrt[4]{n}}^{\pi/2} 2\sin x(\cos x)^n\,\mathrm{d} x\\ &= \frac{2a_n}{n + 1} + \frac{2M}{n + 1}\left(\cos \frac{1}{\sqrt[4]{n}}\right)^{n+1}\\ &\le \frac{2a_n}{n + 1} + \frac{2M}{n + 1}\left(1 - \frac{1}{4\sqrt n}\right)^{n+1}\\ &= o(1/n) \end{align*} where we use $x \le 2\sin x$ for all $x\in [0, \pi/2]$ (easy to prove), and $$a_n := \max_{x\in [0, 1/\sqrt[4]{n}]} |f(x) - f(0)|, \quad M := \max_{x\in [0, \pi/2]} |f(x) - f(0)|,$$ and we use $\lim_{n\to \infty} a_n = 0$ and $\cos u \le 1 - \frac14 u^2$ for all $u\in [0, \pi/2]$ (easy to prove).
We are done.