# How can I compute the limit with an integral？

I came across a problem that I couldn't solve in a mathematical analysis textbook：

Let $$\alpha, L \in \mathbb{R}$$ and $$L \neq 0$$: $$\mbox{If}\quad\lim_{n \to \infty} \dfrac{\displaystyle n^{\alpha}\int_{0}^{\pi/2}x^{n}\sin\left(x\right)\, \mathrm{d}x}{\displaystyle\int_{0}^{\pi/2}x^{n}\cos\left(x\right)\,\mathrm{d}x} = L,\quad\mbox{then find}\quad\alpha, L$$

My attempt：Let $$a_n=\int_0^{\frac{\pi}{2}} x^n \sin x \mathrm{~d} x$$$$b_n=\int_0^{\frac{\pi}{2}} x^n \cos x \mathrm{~d} x$$,then we get \begin{aligned} a_n&=-\int_0^{\frac{\pi}{2}} x^n \mathrm{~d} (\cos x)=-x^n\cos x\big |_0^{\frac{\pi}{2}}+n\int_0^{\frac{\pi}{2}} x^{n-1} \cos x \mathrm{~d} x=nb_{n-1}\\ b_n&=\int_0^{\frac{\pi}{2}} x^n \mathrm{~d} (\sin x)=x^n\sin x\big |_0^{\frac{\pi}{2}}-n\int_0^{\frac{\pi}{2}} x^{n-1} \sin x \mathrm{~d} x=\left(\frac{\pi}{2}\right)^{n}-na_{n-1}\\ &=\left(\frac{\pi}{2}\right)^{n}-n(n-1)b_{n-2}. \end{aligned}

But the subsequent iterations were so complex that I couldn't figure out the answer. Are there any other ideas to solve this problem?

• are you preparing for jee advanced? seems like a fiitjee question Commented May 22 at 10:27
• @Mathslover sorry,i never know the jee advanced before you say it. Commented May 22 at 11:35
• where did you find that question? which textbook Commented May 22 at 11:36
• @Mathslover a Chinese math textbook. Commented May 22 at 12:01
• Context: JEE = Joint Entrance Examination - "The Joint Entrance Examination (JEE) is an engineering entrance assessment conducted for admission to various engineering colleges in India." Commented May 22 at 22:29

## 4 Answers

We have: $$a_n=\displaystyle\int_0^{\frac{\pi}{2}} x^n \sin x \mathrm{~d} x,\ b_n=\displaystyle\int_0^{\frac{\pi}{2}} x^n \cos x \mathrm{~d} x$$

$$a_n=-\int_0^{\frac{\pi}{2}} x^n \mathrm{~d} (\cos x)=-x^n\cos x\bigg |_0^{\frac{\pi}{2}}+n\int_0^{\frac{\pi}{2}} x^{n-1} \cos x \mathrm{~d} x=nb_{n-1}$$ So, we have to compute the limit: $$L=\displaystyle\lim_{n\to\infty}\dfrac{n^\alpha a_n}{b_n}=\lim_{n\to\infty}\dfrac{n^{\alpha+1}b_{n-1}}{b_n}$$ for some $$\alpha$$.

We can simplify $$b_n$$ as follows: \begin{aligned}b_n=\displaystyle\int_0^{\frac{\pi}{2}} x^n \cos x \mathrm{~d} x&=\displaystyle\int_0^{\frac{\pi}{2}} \left(\frac\pi2-x\right)^n \cos\left(\frac\pi2-x\right) \mathrm{~d} x\qquad \text{Property of definite integral}\\&=\frac\pi2\int_0^1\left(\frac\pi2-\frac{\pi t}2\right)^n\sin\left(\frac{\pi t}2\right)\mathrm{~d} t \qquad \text{Substitute } x=\frac{\pi t}2\\&=\left(\frac\pi2\right)^{n+1}\int_0^1(1-t)^n\left(\frac{\pi t}2+O(t^3)\right)\mathrm{~d} t\qquad \text{Series expansion; Big O notation}\\&=\left(\frac\pi2\right)^{n+1}\left(\dfrac\pi2\operatorname B(n+1,2)+O\left(\operatorname B(n+1,4)\right)\right)\qquad \text{Beta function}\\&=\left(\frac\pi2\right)^{n+1}\left(\frac\pi2\dfrac{\Gamma(n+1)\Gamma(2)}{\Gamma(n+3)}+O\left(\dfrac{\Gamma(n+1)\Gamma(4)}{\Gamma(n+5)}\right)\right)\qquad \text{Relationship to gamma function}\\&=\left(\frac\pi2\right)^{n+1}\left(\frac\pi2\dfrac{1}{(n+1)(n+2)}+O\left(\frac{1}{n^4}\right)\right)\qquad\text{Since }\Gamma(n+1)=n!\end{aligned} Now, $$\dfrac{n^{\alpha+1}b_{n-1}}{b_n}=n^{\alpha+1}\dfrac{2}\pi\frac{\frac\pi2\frac1{n(n+1)}+O\left(\frac1{n^4}\right)}{\frac\pi2\frac1{(n+1)(n+2)}+O\left(\frac1{n^4}\right)}=n^{\alpha+1}\left(\frac2\pi\frac{(n+1)(n+2)}{n(n+1)}+O\left(\frac1{n^2}\right)\right)$$ For the convergence of the limit to a positive number, we need to set $$\alpha+1=0$$, i.e., $$\boxed{\alpha=-1}$$. Hence, the required limit is $$\boxed{L=\dfrac2\pi}$$.

Hope this helps!

We have $$\int_0^{\pi/2} x^n\sin x \,\mathrm{d} x \le \int_0^{\pi/2} x^n \,\mathrm{d} x = \frac{(\pi/2)^{n+1}}{n+1}. \tag{1}$$

We have, for all $$n \ge 4$$, \begin{align*} \int_0^{\pi/2} x^n\sin x \,\mathrm{d} x &\ge \int_{\pi/2 - 2/\sqrt{n}}^{\pi/2} x^n\sin x \,\mathrm{d} x \\ &\ge \sin(\pi/2 - 2/\sqrt{n})\int_{\pi/2 - 2/\sqrt{n}}^{\pi/2} x^n \,\mathrm{d} x\\ &= \frac{(\pi/2)^{n+1}\cos \frac{2}{\sqrt{n}}}{n + 1} - \frac{(\pi/2-2/\sqrt{n})^{n+1}\cos \frac{2}{\sqrt{n}}}{n + 1}. \tag{2} \end{align*}

Using $$\sin x \le x$$ for all $$x\ge 0$$, we have \begin{align*} \int_0^{\pi/2} x^n\cos x\, \mathrm{d} x &= \int_0^{\pi/2} x^n \sin(\pi/2 - x)\,\mathrm{d} x\\ &\le \int_0^{\pi/2} x^n (\pi/2 - x)\,\mathrm{d} x\\ &= \frac{(\pi/2)^{n+2}}{(n+2)(n+1)}. \tag{3} \end{align*}

Using IBP, we have, for all $$n\ge 4$$, \begin{align*} \int_0^{\pi/2} x^n\cos x\, \mathrm{d} x &= \int_0^{\pi/2} \frac{x^{n+1}}{n+1}\sin x\, \mathrm{d} x\\ &\ge \int_{\pi/2 - 2/\sqrt{n}}^{\pi/2} \frac{x^{n+1}}{n+1}\sin x\, \mathrm{d} x\\ &\ge \sin(\pi/2 - 2/\sqrt{n})\int_{\pi/2 - 2/\sqrt{n}}^{\pi/2} \frac{x^{n+1}}{n+1}\, \mathrm{d} x\\ &= \frac{(\pi/2)^{n+2}\cos\frac{2}{\sqrt{n}}}{(n+2)(n+1)} - \frac{(\pi/2- 2/\sqrt{n})^{n+2}\cos\frac{2}{\sqrt{n}}}{(n+2)(n+1)}.\tag{4} \end{align*}

Using (1) and (4), we have, for all $$n\ge 4$$, \begin{align*} \frac{n^\alpha \int_0^{\pi/2} x^n\sin x\,\mathrm{d} x}{\int_0^{\pi/2} x^n\cos x\, \mathrm{d} x} &\le n^\alpha\cdot \frac{\frac{(\pi/2)^{n+1}}{n+1}}{\frac{(\pi/2)^{n+2}\cos\frac{2}{\sqrt{n}}}{(n+2)(n+1)} - \frac{(\pi/2- 2/\sqrt{n})^{n+2}\cos\frac{2}{\sqrt{n}}}{(n+2)(n+1)}}\\[10pt] &= \frac{2}{\pi}\cdot\frac{n^\alpha (n + 2)}{\cos \frac{2}{\sqrt{n}}} \cdot \frac{1}{1 - \left(1 - \frac{4}{\pi \sqrt{n}}\right)^{n+2}}.\tag{5} \end{align*}

Using (2) and (3), we have, for all $$n\ge 4$$, \begin{align*} \frac{n^\alpha \int_0^{\pi/2} x^n\sin x\,\mathrm{d} x}{\int_0^{\pi/2} x^n\cos x\, \mathrm{d} x} &\ge n^\alpha\cdot \frac{\frac{(\pi/2)^{n+1}\cos \frac{2}{\sqrt{n}}}{n + 1} - \frac{(\pi/2-2/\sqrt{n})^{n+1}\cos \frac{2}{\sqrt{n}}}{n + 1}}{\frac{(\pi/2)^{n+2}}{(n+2)(n+1)}}\\[10pt] &= \frac{2}{\pi}n^\alpha(n+2)\cos\frac{2}{\sqrt{n}}\cdot \left(1 - \left(1 - \frac{4}{\pi \sqrt{n}}\right)^{n+1}\right).\tag{6} \end{align*}

From (5) and (6), using $$\lim_{n\to \infty}(1 - \frac{4}{\pi \sqrt{n}})^{n+1}= \lim_{n\to \infty}(1 - \frac{4}{\pi \sqrt{n}})^{n+2} = 0$$, using the squeeze theorem, we have $$\alpha = -1$$, and $$L = \frac{2}{\pi}$$.

Here's yet another way of approaching the problem. I must admit it's not as rigorous as some of the other answers, and fixing that may not be very easy. Still, I managed to use a trick that is quite different from the other answers, and I wanted to share that.

We can start just as the OP did, finding that we need to calculate $$\lim\limits_{n\to\infty} n^{\alpha} \frac{a_n}{b_n}$$. Since $$a_n = nb_{n-1}$$, we may replace $$b_n$$ with $$\frac{a_{n+1}}{n+1}$$ to get $$\lim\limits_{n\to\infty} n^{\alpha}(n+1) \frac{a_n}{a_{n+1}}$$. Our main problem is to find how $$a_n/a_{n+1}$$ behaves as $$n$$ goes to infinity.

We have $$a_n := \int\limits_0^{\pi/2} x^n \sin x\,dx.$$ Now let's define the function $$A(z) := \sum\limits_{n=0}^\infty a_n z^n$$. Here $$z$$ is a variable whose only job is to keep the different $$a_n$$'s apart; it has no other meaning. We get $$A(z) = \int\limits_0^{\pi/2} dx\,\sin x \sum_{n=0}^\infty (xz)^n = \int\limits_0^{\pi/2} \frac{\sin x\,dx}{1 - xz}.$$ This may look like it's completely missing the point, but here comes the trick. We realize that for any $$|z|<2/\pi$$, the integral will converge, but as soon as we put $$z = 2/\pi$$, it becomes divergent. From that we conclude that $$z = 2/\pi$$ is a singularity of $$A(z)$$, and there is no singularity closer to zero than that.

Hence, the power series $$\sum\limits_{n=0}^\infty a_n z^n$$ converges for all $$|z| < 2/\pi$$, and $$2/\pi$$ is its radius of convergence $$R$$. Due to the well-known ratio test, we have $$\lim_{n\to\infty} \frac{a_n}{a_{n+1}} = R = \frac{2}{\pi}.$$

So in the original expression $$(n+1)n^\alpha \frac{a_n}{a_{n+1}}$$, the ratio goes to $$2/\pi$$ in the limit, so for the expression to have a nonzero finite limit, we must choose $$\alpha = -1$$. Then, we have $$\frac{n+1}{n} \to 1$$ and the limit is $$2/\pi$$.

$$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{{\displaystyle #1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\sr}[2]{\,\,\,\stackrel{{#1}}{{#2}}\,\,\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$$ \begin{align} & \mbox{Find}\ \alpha\ \mbox{and}\ L\ \mbox{such that} \\[2mm] & \color{#44f}{\lim_{n \to \infty} {\ds{n^{\alpha}\int_{0}^{\pi/2}x^{n}\sin\pars{x}\,\dd x} \over \ds{\int_{0}^{\pi/2}x^{n}\cos\pars{x}\,\dd x}} = L,\quad\mbox{with}\quad \left\{\substack{\ds{\alpha \in \mathbb{R}}\\[2mm] \ds{L \in \mathbb{R}\setminus\braces{0}}}\right.} \end{align} \begin{align} & \mbox{Note that}\ \\ & \color{red}{\int_{0}^{\pi/2}x^{n}\expo{\ic x}\dd x} \sr{x\ \mapsto\ \pi/2 - x}{=} \int_{0}^{\pi/2}\pars{{\pi \over 2} - x}^{n} \expo{\ic\pars{\pi/2 - x}}\,\,\dd x \\[5mm] = & \ \pars{\pi \over 2}^{n}\int_{0}^{\pi/2} \exp\pars{n\ln\pars{1 -{2 \over \pi}x}} \bracks{\sin\pars{x} + \ic\cos\pars{x}}\,\,\dd x \\[5mm] & \overbrace{\sr{{\rm as}\ n\ \to\ \infty}{\sim} \pars{\pi \over 2}^{n}\int_{0}^{\infty} \expo{-2nx/\pi}\,\pars{x + \ic}\,\,\dd x} ^{\ds{Laplace's\ Method}} \\[5mm] = & \ \color{red}{\pars{\pi \over 2}^{n} \bracks{\pars{\pi \over 2n}^{2} + {\pi \over 2n}\ic}} \\[5mm] \implies & \ \left\{\begin{array}{rcl} \ds{\int_{0}^{\pi/2}x^{n}\sin\pars{x}\,\dd x} & \ds{\sr{{\rm as}\ n\ \to\ \infty}{\sim}} & \ds{\pars{\pi \over 2}^{n}{\pi \over 2n}} \\ \ds{\int_{0}^{\pi/2}x^{n}\cos\pars{x}\,\dd x} & \ds{\sr{{\rm as}\ n\ \to\ \infty}{\sim}} & \ds{\pars{\pi \over 2}^{n}\pars{\pi \over 2n}^{2}} \end{array}\right. \end{align} Therefore, \begin{align} & \color{#44f}{\lim_{n \to \infty} {\ds{n^{\alpha}\int_{0}^{\pi/2}x^{n}\sin\pars{x}\,\dd x} \over \ds{\int_{0}^{\pi/2}x^{n}\cos\pars{x}\,\dd x}}} = \lim_{n \to \infty}n^{\alpha}{\pars{\pi/2}^{n}\ \bracks{\pi/\pars{2n}} \over \pars{\pi/2}^{n}\ \bracks{\pi/\pars{2n}}^{2}} \\[5mm] = & \ \bbx{\color{#44f}{{2 \over \pi}\lim_{n \to \infty}n^{\alpha + 1}}} \ \mbox{with}\ \lim_{n \to \infty}n^{\alpha + 1} = \left\{\begin{array}{rcrcl} \ds{0} & \mbox{if} & \ds{\alpha} & \ds{<} & \ds{-1} \\ \ds{\large 1} & {\large\mbox{if}} & \ds{\large\alpha} & \ds{=} & \ds{\large -1} \\ \ds{\infty} & \mbox{if} & \ds{\alpha} & \ds{>} & \ds{-1} \end{array}\right. \\[5mm] & \mbox{The solution, with}\ L\ \mbox{finite and}\ \not= 0,\ \mbox{is obviously} \end{align} $$\bbx{\color{#44f}{L = {2 \over \pi}\quad \color{black}{\mbox{with}}\quad \alpha = - 1}}$$