Let $n>4, x>0$. I need help with this integral. Using Wolfram,I get that it is $\frac{2\Gamma(n-4)}{\Gamma(n-1)}$, as if it was a Beta distribution with parameters $(3,n-4)$, but I can’t see how to transform this expresion, I can only obtain that it is a Beta$(3,2-n)$.
Also, I do it in a more exhaustive way, using a change of variable and I got $\frac{n^2-6x+10}{(n-3)^2(n-4)}$. Can someone explain me how to get the result of Wolfram?
The result given by Wolfram Alpha is the right one.
Explanation: take a look at this very well done site ; you will see there that you shouldn't refer to a Beta distribution but to a "Beta prime" distribution with pdf:
$$f(x)=\frac{1}{B(a,b)}\frac{x^{a-1}}{(1+x)^{a+b}}$$
here with $a=3$ and $b=n-4$.
Just express that
$$\int_0^{\infty} f(x)=1$$
in order to get
$$\int_0^{\infty}\frac{x^{a-1}}{(1+x)^{a+b}}=B(a,b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}=\frac{2\Gamma(n-4)}{\Gamma(n-1)}$$
which is indeed the result given by WA.