# Find analytic solution for integral only defined for even integers

I would like to calculate the integral $$\int_0^{2\pi} dx \sin^6\left(\frac{x}{2}\right) F\left(\frac{4-n}{2}, \frac{4+n}{2}, \frac{1}{2}, \cos^2 \frac{x}{2} \right)^2$$ where $$F$$ is the hypergeometric function (Hypergeometric2F1 in Mathematica). One can see in Mathematica that this integral has some well-defined analytic solution when $$n$$ is an even integer, excluding $$0, -2, 2$$ (this is related to the fact that the hypergeometric function is a simple polynomial in these cases). For example, $$n=4$$ gives $$5\pi/8$$ and $$n=6$$ gives $$45\pi/32$$. I would like to obtain an analytic expression for this integral - however, Mathematica obviously cannot solve this for general $$n$$. I've tried using Assumptions in the integral, but Mathematica still cannot solve the expression for variable $$n$$.

• Try replacing $n$ with $2 m$ where $m$ is any integer. Jun 3, 2020 at 19:33
• This doesn't work. I don't think the issue is with $n$ being an even integer, but rather the integer assumption more generally - my guess is that Mathematica doesn't try to simplify the hypergeometric function when it assumes $m$ is an integer. Jun 3, 2020 at 19:46
• Yes, I just tried it, also tweaking with Refine. Disappointing it cannot simplify. Jun 3, 2020 at 19:48

A = Table[{n,
Integrate[Sin[x/2]^6 Hypergeometric2F1[(4-n)/2, (4+n)/2, 1/2, Cos[x/2]^2]^2,
{x, 0, 2π}]}, {n, 4, 20, 2}]

(*    {{4, 5π/8}, {6, 45π/32}, {8, 33π/16}, {10, 429π/160},
{12, 1287π/392}, {14, 12155π/3136}, {16, 20995π/4704},
{18, 323π/64}, {20, 7429π/1320}}                          *)

FindSequenceFunction[A, n] // FullSimplify

(*    (2 (9 - 10 n^2 + n^4) π)/(7 n (-4 + n^2))    *)

• Wow, I wasn't aware of this function. Thanks! Jun 3, 2020 at 19:45