Value of an integral

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

• Your integral equals $1$. See the proof below. – GH from MO Sep 8 at 6:20
• I suppose that the round bracket in $t^4\{\frac{(2t-t^2)^{n-1}}{n-1})$ is redundant (the one on the right). But I did not want to edit this, since it is better if you clarify what is the intended function. I am referring to the current revision. – Martin Sleziak Sep 8 at 6:24
• @MartinSleziak: I omitted the closing round bracket (which has no opening counterpart), and proved that the resulting expression equals $1$. See below. – GH from MO Sep 8 at 6:31
• If it is a pdf, this itself proves that the integral equals 1, "expect" is underestimating. – Fedor Petrov Sep 8 at 8:14
• @FedorPetrov oh! I didnt see it. Then wasnt it too trivial? – vidyarthi Sep 8 at 12:06

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 and WolframAlpha for symbolic calculations. Both are free.

• It seems that yesterday I inadvertently put a -1 to your answer. the only way to correct is making a trivial edit. sorry! – Pietro Majer Sep 9 at 8:52
• @PietroMajer: This is very kind of you, thanks! – GH from MO Sep 9 at 15:11

It seems your conjecture is true. Mathematica gives the result $$(1 + 4^n (-1 + n) n \mbox{Beta} [1/2, -1 + n, 2 + n] - 4^n n (1 + n) \mbox{Beta} [1/2, 1 + n, n])/(2 (1 + n))$$ in terms of the incomplete Beta function, and putting in random integers $$\geq 3$$ always yields 1 (I haven't managed to get Mathematica to spit that out as a general result for arbitrary $$n$$).

• I proved the conjecture in my response. – GH from MO Sep 8 at 6:33
• @GHfromMO - yes, very nice, you have my upvote. We posted simultaneously. I considered deleting my answer, but decided against it, since at least I answered the OP's literal request :-D – Michael Engelhardt Sep 8 at 14:43

You can use CoCalc. For instance, type integral(x^2,x) and get 1/3*x^3

It also permits symbolic parameters.

Input:

f(x,n)=x^2+n

integral(f(x,n),x)

Output:

1/3*x^3+n*x