I am trying to evaluate an expression involving the hypergeometric function evaluated near its (principal) branch cut discontinuity, which is placed on the real line from $1$ to infinity.
For $x>1$, DLMF gives the following expression for the difference (or ''imaginary part'') of the regularized hypergeometric function $\mathbf F(a,b;c;z)={}_2F_1(a,b;c;z)/\Gamma(c)$ across the branch cut, $$ \mathbf F(a,b;c;x+i0) - \mathbf F(a,b;c;x-i0)$$ $$ = \tfrac{i2\pi}{\Gamma(a)\Gamma(b)}(x-1)^{c-a-b}\mathbf F(c-a,c-b;c-a-b+1;1-x)\,. $$ However, I am interested in the analogous expression for the sum (or, the ''real part''), again for $x>1$, $$ \mathbf F(a,b;c;x+i0)+\mathbf F(a,b;c;x-i0)=\,? $$ I tried plugging specific values of this into mathematica, in particular for integer $D>2$, which yields $$ \mathbf F\left(\tfrac{D-1}{2},\tfrac{D}{2};\tfrac{D+1}{2};x+i0\right) + \mathbf F\left(\tfrac{D-1}{2},\tfrac{D}{2};\tfrac{D+1}{2};x-i0\right)$$ $$= (1+(-1)^D)\mathbf F\left(\tfrac{D-1}{2},\tfrac{D}{2};\tfrac{D+1}{2};x\right) + \tfrac{2i^{D+1}\pi^{3/2}x^{-\tfrac{D-1}{2}}}{\cos\left(\tfrac{D\pi}{2}\right)\Gamma\left(\frac{D-3}{2}\right)\Gamma\left(\tfrac{D-1}{2}\right)\Gamma\left(\tfrac{D}{2}\right)}\,. $$ This makes perfect sense when $D$ is odd, since then the right-hand side reads $$ 2\sqrt{\pi}(-1)^{\frac{D-1}{2}} \frac{x^{-\frac{D-1}{2}}}{\Gamma\left(\frac{D-1}{2}\right)\Gamma\left(\frac{D}{2}\right)}\,, $$ however, it doesn't make much sense to me for even $D$, since then the right-hand side seems to still have a nonzero imaginary part.
Is there a general expression analogous to that provided for the difference by DLMF, but expressing the sum across the branch cut?
It turns out that to answer the question it is sufficient to employ in a suitable way some other formulas already present in the DLMF.
A possibility is to use the ''inversion formula'' $$ \frac{\sin(\pi(b-a))}{\pi}\, \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};z\right) = \frac{(-z)^{-a}}{\Gamma(b)\Gamma(c-a)} \,\mathbf F\left(\begin{array}{} a,a-c+1\\ \ \ a-b+1\end{array};\frac{1}{z}\right) - \frac{(-z)^{-b}}{\Gamma(a)\Gamma(c-b)} \,\mathbf F\left(\begin{array}{} b,b-c+1\\ \ \ b-a+1\end{array};\frac{1}{z}\right)\,. $$ Substituting $z=x+i0$ with $x>1$ and noting that, if we place the branch cut of the logarithm along the negative real axis, $(-(x+i0))^{-a}=e^{i\pi a}\,x^{-a}$, we have $$ \frac{\sin(\pi(b-a))}{\pi}\, \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};x+i0\right) = \frac{e^{i\pi a}\,x^{-a}}{\Gamma(b)\Gamma(c-a)} \,\mathbf F\left(\begin{array}{} a,a-c+1\\ \ \ a-b+1\end{array};\frac{1}{x}\right) - \frac{e^{i\pi b}\,x^{-b}}{\Gamma(a)\Gamma(c-b)} \,\mathbf F\left(\begin{array}{} b,b-c+1\\ \ \ b-a+1\end{array};\frac{1}{x}\right)\,. $$ This gives both real and imaginary parts, provided $b-a$ is not an integer (otherwise, the left-hand side vanishes).
For the specific values of $a$, $b$ and $c$ chosen in the example, $b-a=1/2$, so this formula applies and $$ \Re \mathbf F\left(\begin{array}{} \frac{D-1}{2},\frac{D}{2}\\\ \ \frac{D+1}{2}\end{array};x+i0\right) =\begin{cases} (-)^{\frac{D}{2}+1}\sqrt{\pi} x^{-\frac{D}{2}}/\Gamma(\frac{D-1}{2}) &\text{even }D\\ (-)^{\frac{D-1}{2}}\pi x^{\frac{1-D}{2}}/\Gamma(\frac{D}{2}) &\text{odd }D\,. \end{cases} $$
Another workaround is provided by the ''reflection formula'' $$ \frac{\sin(\pi(c-b-a))}{\pi}\, \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};z\right) = \frac{1}{\Gamma(c-a)\Gamma(c-b)} \,\mathbf F\left(\begin{array}{} \ \ \ \ \ \ \ \ a,b\\a+b-c+1\end{array};1-z\right) - \frac{(1-z)^{c-b-a}}{\Gamma(a)\Gamma(b)} \,\mathbf F\left(\begin{array}{} \ \ c-a,c-b\\c-a-b+1\end{array};1-z\right)\,, $$ hence $$ \frac{\sin(\pi(c-b-a))}{\pi}\, \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};x+i0\right) = \frac{1}{\Gamma(c-a)\Gamma(c-b)} \,\mathbf F\left(\begin{array}{} \ \ \ \ \ \ \ \ a,b\\a+b-c+1\end{array};1-x\right) - \frac{e^{i\pi(a+b-c)}(x-1)^{c-b-a}}{\Gamma(a)\Gamma(b)} \,\mathbf F\left(\begin{array}{} \ \ c-a,c-b\\c-a-b+1\end{array};1-x\right)\,, $$ for $x>1$. As a byproduct, we get the formula for the imaginary part quoted in the question, $$ \Im \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};x+i0\right) = \frac{\pi(x-1)^{x-a-b}}{\Gamma(a)\Gamma(b)}\,\mathbf F\left(\begin{array}{} \ \ c-a,c-b\\c-a-b+1\end{array};1-x\right)\,, $$ together with $$ \frac{\sin(\pi(c-b-a))}{\pi}\,\Re \mathbf F\left(\begin{array}{} a,b\\\ \ c\end{array};x+i0\right) = \frac{1}{\Gamma(c-a)\Gamma(c-b)} \,\mathbf F\left(\begin{array}{} \ \ \ \ \ \ \ \ a,b\\a+b-c+1\end{array};1-x\right) - \frac{\cos(\pi(a+b-c))(x-1)^{c-b-a}}{\Gamma(a)\Gamma(b)} \,\mathbf F\left(\begin{array}{} \ \ c-a,c-b\\c-a-b+1\end{array};1-x\right)\,. $$