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

Beta Function Approach
Substituting $x\mapsto2x+3$,
$$
\begin{align}
&\int_3^5\frac{x^2\,\mathrm{d}x}{\sqrt{(x-3)(5-x)}}\\
&=\int_0^1\frac{(2x+3)^2\,\mathrm{d}x}{\sqrt{x(1-x)}}\\
&=\int_0^1\frac{(3(1-x)+5x)^2\,\mathrm{d}x}{\sqrt{x(1-x)}}\\
&=9\int_0^1\frac{(1-x)^2\,\mathrm{d}x}{\sqrt{x(1-x)}}
+30\int_0^1\frac{(1-x)x\,\mathrm{d}x}{\sqrt{x(1-x)}}
+25\int_0^1\frac{x^2\,\mathrm{d}x}{\sqrt{x(1-x)}}\\
&=9\operatorname{B}\left(\frac52,\frac12\right)
+30\operatorname{B}\left(\frac32,\frac32\right)
+25\operatorname{B}\left(\frac12,\frac52\right)\\
&=9\cdot\frac38\pi
+30\cdot\frac18\pi
+25\cdot\frac38\pi\\
&=\frac{33}2\pi
\end{align}
$$
using the Beta Function.

Trigonometric Subsitution
After the substitution $x\mapsto2x+3$, we can use $x\mapsto\sin^2(x)$
$$
\begin{align}
&\int_3^5\frac{x^2\,\mathrm{d}x}{\sqrt{(x-3)(5-x)}}\\
&=9\int_0^1\frac{(1-x)^2\,\mathrm{d}x}{\sqrt{x(1-x)}}
+30\int_0^1\frac{(1-x)x\,\mathrm{d}x}{\sqrt{x(1-x)}}
+25\int_0^1\frac{x^2\,\mathrm{d}x}{\sqrt{x(1-x)}}\\
&=9\int_0^{\pi/2}2\cos^4(x)\,\mathrm{d}x
+30\int_0^{\pi/2}2\sin^2(x)\cos^2(x)\,\mathrm{d}x
+25\int_0^{\pi/2}2\sin^4(x)\,\mathrm{d}x\\
&=9\cdot\frac38\pi
+30\cdot\frac18\pi
+25\cdot\frac38\pi\\
&=\frac{33}2\pi
\end{align}
$$
