$\lim_{n\rightarrow \infty}\frac{(3n+1)f(n)}{(2n+1)^2g(n)}$ is 
Let $\displaystyle f(n) = \int^{1}x^{n-1}\sin \bigg(\frac{\pi x}{2}\bigg)dx$ and $\displaystyle g(n)=\int^{1}_{0}x^{n-1}\cos\bigg(\frac{\pi x}{2}\bigg)dx$ where $n$ 
  is a natural number
   and $\displaystyle \lim_{n\rightarrow \infty}\frac{(3n+1)f(n)}{(2n+1)^2g(n)}=\frac{a}{b\pi}.$ Then what is the least value of $a+b$?

Plan
$$f(n)=-\frac{2\pi }x^{n-1}\cos(\pi x/2)\bigg)\bigg|^{1}_{0}+\frac{2(n-1)}{\pi}\int^{1}_{0}x^{n-1}\cos(\pi x/2)dx$$ 
$$f(n)=\frac{2(n-1)}{\pi}g(n-1)=\frac{2^2}{\pi^2}(n-1)(n-2)g(n-2)$$
How do I solve it?


Lemma. If $f:[0,1]\to\mathbb R$ is a continuous function then
  $$\lim_{n\to\infty}n\int_0^1 f(x)x^{n-1}\,dx=f(1).$$

Proof. See this question.
Hence it follows that
$$\lim_{n\to\infty}nf(n)=\sin(\pi/2)=1.$$
Now, you have shown that
$$g(n)=\frac\pi2\frac{f(n+1)}n$$
so 
$$\lim_{n\to\infty}n^2g(n)=\frac\pi2$$
and the problem reduces to a simple computation.
