<s>[INST] To compute improper integral $\int_3^{5}\frac{x^{2}\, dx}{\sqrt{x-3}{\sqrt{5-x}}}$ I am given improper integral as 
$$\int_3^{5}\frac{x^{2}}{\sqrt{x-3}{\sqrt{5-x}}}dx$$
DOUBT
I see that problem is at both the end points, so i need to split up the integral. But problem seems to me that when i split up integral one of terms in denominator which is ${5-x}$ becomes negative. So how do i split up the integral ? Kindly help
Thanks
 [/INST] Notice, the following 
$$x^2=A(x-3)(5-x)+B(8-2x)+C$$
On solving we get 
$$x^2=-(x-3)(5-x)-4(8-2x)+17$$
Now, we have 
$$\int_{3}^{5}\frac{x^2dx}{\sqrt{(x-3)}\sqrt{(5-x)}}$$
$$=\int_{3}^{5}\frac{(-(x-3)(5-x)-4(8-2x)+17)dx}{\sqrt{(x-3)}\sqrt{(5-x)}}$$
$$=-\int_{3}^{5}\frac{(x-3)(5-x)dx}{\sqrt{(x-3)}\sqrt{(5-x)}}-4\int_{3}^{5}\frac{(8-2x)dx}{\sqrt{(x-3)}\sqrt{(5-x)}}+17\int_{3}^{5}\frac{dx}{\sqrt{(x-3)}\sqrt{(5-x)}}$$
$$=-\int_{3}^{5}\sqrt{(x-3)}\sqrt{(5-x)}-4\int_{3}^{5}\frac{(8-2x)dx}{\sqrt{8x-x^2-15}}+17\int_{3}^{5}\frac{dx}{\sqrt{1-(x-4)^2}}$$
$$=-\int_{3}^{5}\sqrt{1-(x-4)^2}-4\int_{3}^{5}\frac{(8-2x)dx}{\sqrt{8x-x^2-15}}+17\int_{3}^{5}\frac{dx}{\sqrt{1-(x-4)^2}}$$
$$=-\frac{1}{2}\left[(x-4)\sqrt{1-(x-4)^2}+\sin^{-1}\left(x-4\right)\right]_{3}^{5}-4\left[2\sqrt{1-(x-4)^2}\right]_{3}^{5}+17\left[\sin^{-1}(x-4)\right]_{3}^{5}$$
$$=-\frac{1}{2}(\pi)-8(0)+17(\pi)=\frac{33\pi}{2}$$
</s>