**Problem:**


Let $f\colon \mathopen[0,1\mathclose] \to \mathbb{R}$ be defined as
$$
f(x) = \frac{e^{\rho x}-1}{e^{\rho x}-1+e^{\rho (1-\gamma x)}-e^{\rho (1-\gamma) x}}
$$
where $\rho$ and $\gamma$ are strictly positive real parameters. I am interested in showing that, for any fixed $\rho$, there exists a value $\gamma\_{\rho}$ such that for any $\gamma\geq \gamma\_{\rho}$, the function $f$ is first convex on an interval $[0,\bar{x}[$ and then concave on $[\bar{x},1]$, where $\bar{x}$ is the inflection point of $f$. This essentially boils down to showing that $f''$ is positive before $\bar{x}$ and negative afterwards.


**What I have tried:**


I observed that for all $x \in \mathopen]0,1\mathclose[$, the function $f$ satisfies the differential equation
$$
f'(x) = \alpha(x) f(x) (1-f(x))
$$
where
$$
\alpha(x) = \rho \left( \frac{1}{e^{\rho x}-1} + \frac{1}{e^{\rho (1-x)}-1} + (1+\gamma) \right).
$$
From this, I deduced that
$$
f(x) = \frac{f(x\_{0})}{ f(x\_{0}) + \big( 1-f(x\_{0}) \big) \, e^{ -\int\_{x\_{0}}^{x} \alpha(s) \mathrm{d}s } }
$$
for some $x\_{0} \in \mathopen]0,1\mathclose[$. Consequently, $f''(x)$ has the same sign as
$$
\frac{\sigma''(A(x))}{\sigma'(A(x))} + \frac{\alpha'(x)}{\alpha(x)^2}
$$
where
$$
\sigma(x) = \frac{f(x\_{0})}{ f(x\_{0}) + ( 1-f(x\_{0}) ) e^{ -x} }
$$
is the sigmoid function (which is a convex-concave function) and
$$
A(x) = \int\_{x\_{0}}^{x} \alpha(s) \mathrm{d}s.
$$
The challenge is that the signs of $\frac{\sigma''(A(x))}{\sigma'(A(x))}$ and $\frac{\alpha'(x)}{\alpha(x)^2}$ go in opposite directions, making it difficult to determine the sign of $f''$. A similar problem arises when you directly take the second derivative of $f$.


**Question:**


How can we determine the sign of $f''(x)$ and thus establish the regions of convexity and concavity of $f$? Are there any other techniques or insights that can help navigate this problem?



How to establish regions of convexity/concavity of a ratio of exponential polynomials?
This conjecture is true.


Indeed, letting $r:=\rho$, $a:=\gamma$, $t:=rx$, and $u:=e^r-1$, we see  

\begin{equation\*}
 f(x)=R(t):=\frac{e^t-1}{(1+u)e^{-a t}-e^{t-a t}+e^t-1}. \tag{10}\label{10}
\end{equation\*}
So, the problem can be restated as follows:



> 
> Show that for each real $u>0$ there is some real $a\_u>0$ such that for each $a\ge a\_u$ there is some $t\_{u,a}\in(0,\ln(1+u))$ such that $R''\ge0$ on $[0,t\_{u,a}]$ and $R''\le0$ on $[t\_{u,a},\ln(1+u)]$.
> 
> 
> 


In what follows, it is assumed that $u>0$, $a$ is a large enough (depending on $u$) positive real number, and $t\in(0,\ln(1+u)]$ -- unless otherwise specified.
Note that $(1+u)e^{-a t}-e^{t-a t}+e^t-1>e^{-a t}-e^{t-a t}+e^t-1=(e^t-1)(1-e^{-a t})>0$, so that \eqref{10} makes sense.


We have
\begin{equation\*}
\begin{aligned}
 g(t)&:=R''(t)e^{-a t} \left(-e^{a t}+e^{a t+t}-e^t+u+1\right)^3 \\ 
 &=-a^2 (u+1) e^{a t}+e^{a t+2 t} \left(-\left(a^2 (u+3)\right)-2 a
 u-u\right) \\ 
 &+e^t (u+1) \left(a^2 (u+3)+2 a u+u\right)+e^{2 t}
 \left(-\left(a^2 (2 u+3)\right)-2 a u+u\right) \\ 
 &+e^{a t+t} 
 \left(a^2 (2 u+3)+2 a u-u\right)+a^2 e^{3 t}+a^2 e^{a t+3
 t}-a^2 (u+1)^2. 
\end{aligned}
\end{equation\*}
Note that $-e^{a t}+e^{a t+t}-e^t+u+1>-e^{a t}+e^{a t+t}-e^t+1=(e^t-1)(e^{a t}-1)>0$, so that $g(t)$ equals $R''(t)$ in sign. So, the problem can be further restated as follows:



> 
> Show that for each real $u>0$ there is some real $a\_u>0$ such that for each $a\ge a\_u$ there is some $t\_{u,a}\in(0,\ln(1+u))$ such that $g\ge0$ on $[0,t\_{u,a}]$ and $g\le0$ on $[t\_{u,a},\ln(1+u)]$.
> 
> 
> 


To prove this, kill the exponentials of the form $e^{ct}$ for constant $c$'s one by one, by letting  

\begin{equation\*}
 D(t):=\frac{g'(t)}{e^t},\quad D\_2(t):=\frac{D'(t)}{e^t},\quad D\_3(t):=\frac{D\_2'(t)}{e^t},
\end{equation\*}
\begin{equation\*}
 D\_4(t):=\frac{D\_3'(t)}{e^{(a-3)t}},\quad D\_5(t):=\frac{D\_4'(t)}{e^t},\quad D\_6(t):=\frac{D\_5'(t)}{e^t}. 
\end{equation\*}
Then
\begin{equation\*}
 D\_6(t)=6 a^3 (a+1) (a+2) (a+3) e^t \\ 
 -2 a (a+1) \left(a^2+a-2\right)
 \left(a^2 (u+3)+2 a u+u\right), 
\end{equation\*}
which is clearly increasing in $t$, from $D\_6(0)=-2 a (a+1) (a+2) \left(a^3 u+a^2 (u-12)-a u-u\right)<0$ eventually (that is, for all large enough $a$, depending on $u>0$) and $D\_6(\ln(1+u))=2 a (a+1) (a+2) \left(2 a^3 u+4 a^2 (2 u+3)+a u+u\right)>0$ eventually (and, in fact, for all real $a>0$ and $u>0$).


So, eventually $D\_6$ is $-+\,$: that is, for some $t\_{6;a,u}\in(0,\ln(1+u))$ we have $D\_6<0$ on $[0,t\_{6;u,a})$ and $D\_6>0$ on $(t\_{6;u,a},\ln(1+u)]$.


So, eventually $D\_5$ is down-up -- that is, for some $t\_{6;a,u}\in(0,\ln(1+u))$ we have $D\_5$ is decreasing
on $[0,t\_{6;u,a}]$ and increasing on $[t\_{6;u,a},\ln(1+u)]$. Also, eventually
$D\_5(0)=-a (a+1) \left(10 a^3 u+a^2 (5 u-36)-13 a u-2 u\right)<0$ and $D\_5(\ln(1+u))=a (a+1) \left(a^4 u^2+a^3 u (9 u+14)+a^2 \left(16 u^2+43
 u+36\right)+a u (6 u+13)+2 u (2 u+1)\right)>0$. So, eventually $D\_5$ is $-+$.


So, eventually $D\_4$ is down-up. Also, eventually
$D\_4(0)=2 a^2 \left(-11 a^2 u+6 a (u+2)+5 u\right)<0$ and $D\_4(\ln(1+u))=a (u+1) \left(2 a^4 u^2+7 a^3 u (u+2)+8 a^2 \left(u^2+3
 u+3\right)+5 a u (u+2)+2 u^2\right)>0$. So, eventually $D\_4$ is $-+$.


So, eventually $D\_3$ is down-up. Also, eventually
$D\_3(0)=-a \left(14 a^2 u+3 a (3 u-4)+u\right)<0$ and $D\_3(\ln(1+u))\frac{(1+u)^2}{a}=(u+1)^a\left(a^3 u^2+2 a^2 u (u+2)+a \left(-u^2+3 u+6\right)-u (2
 u+1)\right) +6 a (u+1)^2>0$. So, eventually $D\_3$ is $-+$.


So, eventually $D\_2$ is down-up. Also, eventually
$D\_2(0)=-12 a (a+1) u<0$ and $D\_2(\ln(1+u))(1+u)^2
=(u+1)^a\left(-a^2 u (u+1) (3 u+2)-a u (u+1) (7 u+8)-2 u
 (u+1)^2\right) +2 a^2 u (u+1)^2-4 a u (u+1)^2+2 u
 (u+1)^2<0$. So, eventually $D\_2<0$.


So, eventually $D$ is decreasing. Also, eventually
$D(0)=u \left(a^2 u+2 a (u-3)+u\right)>0$ and $D(\ln(1+u))(1+u)^2
=(u+1)^a\left(-a^2 u^2 (u+1)^2-a u (5 u+4) (u+1)^2-u (2 u+3)
 (u+1)^2\right) -2 a u (u+1)^3+3 u (u+1)^3<0$. So, eventually $D$ is $+-\,$: that is, for some $t\_{1;a,u}\in(0,\ln(1+u))$ we have $D>0$ on $[0,t\_{1;u,a})$ and $D<0$ on $(t\_{1;u,a},\ln(1+u)]$.


So, eventually $g$ is up-down -- that is, for some $t\_{1;a,u}\in(0,\ln(1+u))$ the function $g$ is increasing on $[0,t\_{1;u,a})$ and decreasing on $(t\_{1;u,a},\ln(1+u)]$. Also, eventually
$g(0)=(2 a+1) u^2>0$ and $g(\ln(1+u))(1+u)^2
=(u+1)^a\left(-2 a u^2 (u+1)^3-u (u+2) (u+1)^3\right) +2 u
 (u+1)^4<0$.


So, eventually $g$ is $+-$. $\quad\Box$


