How do you solve this limit involving definite integration?

$$\lim \limits_{r \to \infty} \frac {r^C \int_0^{\frac{\pi}{2}} x^r \sin(x)\, dx}{\int_0^{\frac{\pi}{2}} x^r \cos(x)\, dx} = L$$

Find the value of $\pi L - C$, given that $C\in\mathbb{R}$ and $L>0$.

My approach:

I tried to apply integration by parts to both the numerator and denominator to get a recurring relation, hoping to cancel something off, but to no avail. I'm not getting any other method to solve it, so any help will be appreciated.

• Won't the limit depend on the value of $C$? – G-man Oct 25 '15 at 15:20
• That's the thing. You're supposed to get the value of C so that the limit is a finite quantity (which is equal to L, which too you have to find). – Ashish Gupta Oct 25 '15 at 15:21
• That's just too much work for a single question. – G-man Oct 25 '15 at 15:23
• The integrals come out in terms of hypergeometric functions so I wouldn't spend much time on that. The answer is 3 but I have no idea how to do it without cheating. – Ian Miller Oct 25 '15 at 15:23
• @G-Man I know, but I think it's a really well thought of question. – Ashish Gupta Oct 25 '15 at 15:23

$$\lim_{r\to +\infty}\frac{\int_{0}^{\pi/2}x^{r+1}\sin(x)\,dx}{\int_{0}^{\pi/2}x^r\sin(x)\,dx} = \frac{\pi}{2}$$ since the integrand functions in the numerator/denominator get more and more concentrated around the right endpoint as $r$ increases, and their ratio at $x=\frac{\pi}{2}$ is exactly $\frac{\pi}{2}$. By using integration by parts, we have: $$\lim_{r\to +\infty}\frac{(r+1)\int_{0}^{\pi/2}x^{r}\cos(x)\,dx}{\int_{0}^{\pi/2}x^r\sin(x)\,dx} = \frac{\pi}{2}$$ hence the given limit is finite iff $C=-1$ and in such a case $L=\frac{2}{\pi}$.