mixing convex and concave for convexity Let $n\in\mathbb{N}$ and $0<x<1$ be a real number. Is the following a convex function of $x$?
$$G_n(x)=\log\left(\frac{(1+x^{4n+1})(1+x^{4n-1})(1+x^{2n})(1-x^{2n+1})}{(1+x^{2n+1})(1-x^{2n+2})}\right).$$
It appears to be so, but have no proof. Any ideas? The question has some semblance to that of Curious inequality
To make it "simpler", we may drop one term and try proving: if $2\leq n\in\mathbb{N}$ and $0<x<1$ is a real number, then 
$$F_n(x)=\log\left(\frac{(1+x^{4n-1})(1+x^{2n})(1-x^{2n+1})}{(1+x^{2n+1})(1-x^{2n+2})}\right)$$
is a convex function of $x$.
$Remark$. All terms inside the log are log-convex or can be turned around to be so, except for $1-x^{2n+1}$. So, here is a modest sub-problem: if $k\geq5$ and $0<x<1$ then prove 
$$g_k(x)=\log\left(\frac{1-x^k}{1-x}\right)$$
is a convex function of $x$.
$Caveat$. A similar argument as Fedor's shows $\log\left(\frac{1-x^k}{1-x^{\ell}}\right)$ is convex, provided $1\leq\ell<k$. However, these subproblems do NOT yet prove that $F_n(x)$ is convex.
 A: (Solution of the modest subproblem)
The second derivative of $g_k(x)$ equals $(1+x+\dots+x^{k-1})^{-2}f_k(x)$, where $f_k(x)$ is a polynomial (not a surprise) with explicit formulae for coefficients:
$$
f_k(x)=\sum_{n=0}^{k-3}\binom{n+3}3x^n+\sum_{n=k-2}^{2k-4}\left(\binom{2k-n-1}3-k(2k-n-3)\right)x^n.
$$ 
It is straightforward that the sum of coefficients of $f_k$ equals $k^2(k-1)(k-5)/12\geqslant 0$ when $k\geqslant 5$, and negative coefficients go with larger powers of $x$, thus $f_k$ is non-negative on $[0,1]$.
maybe such brute force approach works for other questions too.
A: Here are some preliminaries. Let's start with a generic issue:

For given real exponents $1\le p_1\le \dots\le p_r$ and $q_1,\dots,q_r$, how to
  write the second derivative of the function $$F(x):=\log\prod_{j=1}^r (1-x^{p_j})^{-q_j}=-\sum_{j=1}^r q_j \log(1-x^{p_j }),\qquad x\in(0,1)  $$ without opening
  the Pandora's box of derivatives of quotients?

Notice that the above  $F$ has no terms $1+x^p$, yet of course we may write any of them as ${1-x^{2p}\over 1-x^p}$, so that this formulation actually includes your problem. Precisely, in your situation, $r=7$, and $p:=(2n,2n+1,2n+2,4n-1,4n,4n+2,8n-2)$ with $q:=(+1,-2,+1,+1,-1,+1,-1)$ -just for fun we may think these data as describing $7$ point charges $q_j$ located at positions $p_j$.
To describe more clearly the dependence from $(p,q)$ it is convenient to introduce, for $s>0$, the function
$$\varphi(s):=-\log(1-e^{-s})\ .$$
Then, given the data $(p,q)$, consider
the distribution $m\in\mathcal{D'}(\mathbb{R}_+)$ defined by $f\mapsto\langle m,f\rangle:= \sum_{j=1}^r q_j f(p_j)$, just a linear combination of evaluations at the points $p_j$: 
$$m:=\sum_{j=1}^r q_j\delta_{p_j}.$$ Introducing a parameter $t>0$, we then have a function $\Phi=\Phi_m$ defined by the pairing w.r.to the variable $s\in\mathbb{R}_+$:
$$\Phi(t) :=\big
\langle m,   \varphi(ts) \big\rangle_s =-\sum_{j=1}^r q_j \log(1-e^{-p_jt}),$$
so that for $0<x<1$ the function $F=F_m$ writes
$$F(x)=\Phi(-\log x).$$
Since $F''(x)={1\over x^2}\big(\Phi''+\Phi')(-\log x),$ we are interested in $\Phi''(t)+\Phi'(t)$,  that is
$$(\Phi''+\Phi')(t)=\big
\langle m, (\partial_t^2+\partial_{t})\varphi(ts)\big\rangle_s$$
Integrating by parts
$$=-\big
\langle \chi_{\mathbb{R}_+}*m, \ \partial_s(\partial_t^2+\partial_{t})\varphi(ts)\big\rangle_s=\big\langle m_1, \kappa(t,s)\big\rangle_s ,$$
with 
$$\kappa(t,s):=-\partial_s(\partial_t^2+\partial_{t})\varphi(ts)=-\partial_s\big(s^2\ddot\varphi(ts)+s\dot\varphi(st)\big)$$
$$=-ts^2 \dddot\varphi(ts)-(2s+ts)\ddot\varphi(ts)-\dot\varphi(ts)= $$
$$={\frac { \left( t{s}^{2} -ts-2\,s+1 \right) {{\rm e}^{2\,ts}}+ \left( {
s}^{2}t+ts+2\,s-2 \right) {{\rm e}^{ts}}+1}{ \left( {{\rm e}^{ts}}-1
 \right) ^{3}}}
$$
and
$$m_1:=\chi_{\mathbb{R}_+}*m=\sum_{j=1}^rq_j (\chi_{\mathbb{R}_+}*\delta_{p_j})=\sum_{j=1}^rq_j \chi_{[p_j,+\infty)} =\sum_{j=1}^{r}\left(\sum_{i=1}^j q_i\right) \chi_{[p_j,p_{j+1})} $$
(where we put $p_{r+1}:=+\infty$). In the case of our $7$ point charges, this is
$$m_1:=\chi_{[2n,2n+1]} { -} \chi_{[2n+1,2n+2]}+\chi_{[4n-1,4n]} +\chi_{[4n+2,8n-2]}. $$
Summarizing, we have the representation for the second derivative, for $0<x<1$ and $t:=-\log x$:
$$F''(x)={1\over x^2}\int_0^{+\infty}\kappa(t,s)m_1(s)ds.$$
Of course, one would be happy to have both $m_1$ and $\kappa$ positive. The idea then would be changing the representation using an identity
$$\langle \mu,\kappa\rangle=\langle {^{t}L}^{-1}\mu, L\kappa\rangle,$$
choosing a suitable invertible operator $L$. 
This gave me some hope to get a quick answer based on an integral formula for $F''$. For instance, the choice $L:=I-H$ with $$Hf(t):={1\over2}f({t\over2})$$ makes $^{t}L^{-1}\mu$ positive, but, unfortunately, not everywhere positive $L\kappa$. 
