I need to verify the value of the following integral
$$ 4n(n-1)\int\_0^1 \frac{1}{8t^3}\left[\frac{(2t-t^2)^{n+1}}{(n+1)}-\frac{t^{2n+2}}{n+1}-t^4\{\frac{(2t-t^2)^{n-1}}{n-1}-\frac{t^{2n-2}}{n-1} \} \right] dt.$$
The integrand (factor of $4n(n-1)$) included) is the pdf of certain random variable for $n\geq 3$ and hence I expect it be 1. If somebody can kindly put it into some computer algebra system like MATHEMATICA, I would be most obliged. I do not have access to any CAS software.


PS:-I do not know of any free CAS software. If there is any somebody may please share



Value of an integral
The integral can be rewritten as
\begin{align\*}
I&=\frac{n(n-1)}{2}\int\_0^1\frac{t^{n-2}(2-t)^{n+1}-t^{2n-1}}{n+1}-\frac{t^n(2-t)^{n-1}-t^{2n-1}}{n-1}\,dt\\[6pt]
&=\frac{1}{2n+2}+\frac{n(n-1)}{2}\int\_0^1\frac{t^{n-2}(2-t)^{n+1}}{n+1}-\frac{t^n(2-t)^{n-1}}{n-1}\,dt.
\end{align\*}
Integrating by parts, we obtain
$$\int\_0^1\frac{t^{n-2}(2-t)^{n+1}}{n+1}\,dt=\frac{1}{n^2-1}+\int\_0^1\frac{t^{n-1}(2-t)^n}{n-1}\,dt.$$
Therefore,
\begin{align\*}
I&=\frac{1}{2}+\frac{n}{2}\int\_0^1t^{n-1}(2-t)^n-t^n(2-t)^{n-1}\,dt\\[6pt]
&=\frac{1}{2}+\frac{1}{2}\int\_0^1(t^n(2-t)^n)'\,dt=\frac{1}{2}+\frac{1}{2}=1.
\end{align\*}


**P.S.** You can use [SageMath](https://www.sagemath.org/) and [WolframAlpha](https://www.wolframalpha.com/) for symbolic calculations. Both are free.


