# Generalized hypergeometric function 1F2 , special values

I have two hypergeometric functions $\ _{1}\mathcal{F}_{2}[\frac{1}{2}+q;\frac{1}{2},\frac{3}{2}+q;-X^{2}]$ and $\ _{1}\mathcal{F}_{2}[1+2q;\frac{3}{2},2+2q;-X^{2}]$. For fixed integer positive $q$ Mathematica gives me some trigonometric polynomials. How does Mathematica compute them?

-

Note: $$u(X) = {}_2F_1\Biggl(\biggl[\frac{1}{2},\frac{1}{2} + q\biggr],\biggl[\frac{3}{2} + q\biggr],-X^{2}\Biggr) = \biggl(\frac{1}{2} + q\biggr) \sum_{k = 0}^{\infty} \frac{2 {-1/2\choose k} X^{2 k}}{2 k + 1 + 2 q}$$ so we get a differential equation $$\frac{d}{d X} \left[u(X) X^{1 + 2 q}\right] = \frac{(1 + 2 q) X^{2 q}}{\sqrt{X^{2} + 1}}$$ with solution $$u(X) = \frac{\int_{X} \frac{(1 + 2 q) X^{2 q}}{\sqrt{X^{2} + 1}} d X + C}{X^{1 + 2 q}}$$ Now the general form of that integral may be hypergeometric. But for $q$ a positive integer we can integrate by parts and end up with some trig, right?