<s>[INST] Integral $\int_0^1 \log x \frac{(1+x^2)x^{c-2}}{1-x^{2c}}dx=-\left(\frac{\pi}{2c}\right)^2\sec ^2 \frac{\pi}{2c}$ Hi I am trying to prove this result $$
I:=\int_0^1 \log x \frac{(1+x^2)x^{c-2}}{1-x^{2c}}dx=-\left(\frac{\pi}{2c}\right)^2\sec ^2 \frac{\pi}{2c},\quad c>1.
$$
Thanks.  Since $x\in[0,1]
$ we can write$$
I=\sum_{n=0}^\infty \int_0^1 \log x (1+x^2) x^{c-2+2cn}dx.
$$
since $\sum_{n=0}^\infty x^n= (1-x)^{-1} , |x| < 1.$  Simplifying
$$
I=\sum_n \int_0^1 \log x\, x^{c-2+2n} dx+\sum_n \int_0^1 \log x \, x^{c+2cn}\, dx.
$$
Now we can write
$$
I=-\frac{1}{4}\psi_1 \left(\frac{c+1}{2}\right)-\frac{1}{4} \psi_1\left( \frac{3+c}{2}\right)
$$
where I summed the results of the integrals using general result of $\int_0^1 \log x \, x^n \, dx=-\frac{1}{(n+1)^2}$.  Howeever this is not the result $\sec^2...$.  Thanks
The function $\psi$ is the polygamma function which is defined in general by
$$
\psi_m(z)=\frac{d^{m+1}}{dz^{m+1}} \log \Gamma(z)
$$
and $\Gamma(z)=(z-1)!$, for this case $m=1$.
 [/INST] Another derivation that uses only very elementary complex analysis and no special functions:
(all integrals are to be regarded as Cauchy PV integrals if necessary)
By substituting $x\mapsto 1/x$, we find that the original integral equals
$$\int_1^{\infty} (-\log x)  \frac{(1+1/x^2)x^{2-c}}{1-x^{-2c}}\frac{dx}{x^2} = \int_1^{\infty} \log x \frac{(1+x^2)x^{c-2}}{1-x^{2c}} \,dx$$
Adding both copies of the integral, the problem is reduced to showing that
$$\int_0^{\infty} \log x \frac{(1+x^2)x^{c-2}}{1-x^{2c}} \,dx = -\frac{\pi^2}{2c^2}\sec^2\left(\frac{\pi}{2c}\right)$$
We will do this by the method that is by now well-known: let $I(\mu) = \int_0^{\infty} \frac{(1+x^2)x^{c-2+\mu}}{1-x^{2c}} \,dx$, then we are looking for $I'(0)$.
We have (remember we are taking PV everywhere)$$\int_0^{\infty} \frac{x^a}{1-x^b} \,dx = \frac{\pi}{b}\cot\left(\pi\frac{a+1}{b}\right)$$
which can be easily derived using residues. (Integrate around a pizza slice contour.)
This immediately gives $$I(\mu) = \frac{\pi}{2c} \left[\cot\left(\pi\frac{c-1+\mu}{2c}\right) + \cot\left(\pi\frac{c+1+\mu}{2c}\right)  \right]$$
and hence 
$$ I'(\mu) = -\frac{\pi^2}{4c^2}\left[\csc^2\left(\frac{\pi}{2c} (c-1+\mu)\right) +\csc^2\left(\frac{\pi}{2c}(c+1+\mu)\right)\right]$$
$$ \implies I'(0) = -\frac{\pi^2}{2c^2}\sec^2\left(\frac{\pi}{2c}\right)$$
</s>