Find the "best" $n$ such that $g(x)\leq 4$ Problem: Let $0<n<1$ be a real number, then define for $x>0$ :
$$f(x)=\left(1+x\right)^{\frac{1}{x^{n}}} \quad \text{ and }\quad g(x)=f(x)+f\!\left(\frac{1}{x}\right).$$
What is the minimum value of $n$ such that $g(x)\leq 4$?
This problem is a direct follow up of Prove that $(1+x)^\frac{1}{x}+(1+\frac{1}{x})^x \leq 4$.
On the link we can find some good ideas to show the case $n=1$. Some numerical routine show that the "best" value of $n$ is close to $n\simeq\sqrt{2}-1\simeq \frac{3}{5}\ln(2)$. How should we find $n$? Does it admit a closed form?
I totally forgot the second derivative. My apologies for this. Any help is greatly appreciated.
Some further investigation :
Using @Gary "best" constant $v=\frac{1}{2\ln2}\left(1-\sqrt{\frac{1-\ln2}{1+\ln2}}\right)$ we have using Lemma 7.1 in (1) for $1\leq x \leq 2$ :
$$2^{x^{v}}\left((1-x^{v})^{2}+\frac{1+x^{-1}}{2}\cdot x^{v}\cdot(2-x^{v})-\frac{1+x^{-1}}{2}\cdot x^{v}\cdot(1-x^{v})\cdot\ln\frac{1+x^{-1}}{2}\right)\geq \left(1+x^{-1}\right)^{x^{v}}$$
I used $c=x^{v},a=\frac{1+x^{-1}}{2}$ in the Lemma.
Update:
Using WA and choosing the simplest function I got :
Let $1\leq x\leq 3$ then we have :
$$x^{a}+x^{b}+cx-c\geq \left(1+x\right)^{x^{-v}}$$
Where :
$$a=\frac{1}{2}\left(1-\sqrt{2-4\sqrt{\frac{1-\ln2}{1+\ln2}}}\right),c=-1+\sqrt{\frac{1-\ln2}{1+\ln2}}+\sqrt{\frac{1}{2}-\sqrt{\frac{1-\ln2}{1+\ln2}}},b=1/2$$
Ref (1): Cirtoaje, Vasile. "Proofs of three open inequalities with power-exponential functions.." The Journal of Nonlinear Sciences and its Applications 4.2 (2011): 130-137. http://eudml.org/doc/223938.
 A: Notice that $g(1)=4$, so we are essentially interested in $x=1$.
We can see $g'(1)=0$ regardless of what $f$ is:
$$g(x)=f(x)+f\left(x^{-1}\right)\\
g'(x)=f'(x)-x^{-2}f'\left(x^{-1}\right)\\
g'(1)=f'(1)-f'(1)=0$$
This means $x=1$ produces a critical point, one which is a potential maximum or minimum for $g$.
Now, we want the values of $n$ that make $g(1)=4$ a maximum, so we need $g'(x>1)<0<g'(x<1)$ i.e $g$ increases upto $x=1$ then decreases for larger values of $x$; this is true iff $g''(1)<0$. Here is a simple proof:
$$g''(1)=\lim_{h\to0}\frac{g'(1+h)-g'(1)}{h}\\
=\lim_{h\to0}\frac{g'(1+h)}{h}\\
\lim_{h\to0^+}\frac{g'(1+h)}{h}<0\Longleftarrow g'(1+h)<0<h\\
\lim_{h\to0^-}\frac{g'(1+h)}{h}<0\Longleftarrow g'(1+h)>0>h$$
Solving for the $n$ values that satisfy this, we might get multiple possibilities, how we know which one is true is after we solve for $n_0$, the $n$ value that makes $g_{n_0}''(1)=0$, we check whether $g_{n_0-m}''(1)>0$, where we can choose $m\in(0,n_0)$ specifically to make the check easy; this means $n_0$ is the best $n$ that we want, any smaller $n$ has $g_{n<n_0}(1)=4$ as the minimum, not the maximum. Now, we solve for $g''(x)$ in terms of derivatives of $f(x)$:
$$g''(x)=f''(x)+2x^{-3}f'\left(x^{-1}\right)+x^{-4}f''\left(x^{-1}\right)\\
g''(1)=2(f'(1)+f''(1))\\
g_{n_0}''(1)=0\\
f_{n_0}'(1)+f_{n_0}''(1)=0$$
Solving this is easy enough, you get two solutions:
$$n_0=\frac{1}{2\ln 2}\left(1\pm\sqrt{\frac{1-\ln 2}{1+\ln 2}}\right)$$
Notice that the $n_0$ that lies in $(0,1)$, as you specified, is:
$$n_0=\frac{1}{2\ln 2}\left(1-\sqrt{\frac{1-\ln 2}{1+\ln 2}}\right)$$
You can check by calculation that this $n_0$ is also the only one that satisfies $g_{n_0-m}''(1)>0\Longleftarrow f_{n_0-m}'(1)+f_{n_0-m}''(1)>0$ for some $m\in(0,n_0)$.
A: If you perform a Taylor expansion around $x=1$
$$g(x)-4=\Big[1-2n\left(1+\log(2)\right)+2n^2 \log(2)\left(1+\log(2)\right)\Big](x-1)^2+O((x-1)^3)$$ Cancelling this first coefficient leads to the result
$$n=\frac{1}{2\ln 2}\left(1-\sqrt{\frac{1-\ln 2}{1+\ln 2}}\right)$$ already given by @Gary and @mohamedshawky.
Using it again in the expansion of $[g(x)-4]$ and making the coefficients rational
$$g(x)-4=-\sum_{n=4}^\infty a_n\,(1-x)^n$$
$$\left\{\frac{18}{1337},\frac{36}{1337},\frac{26}{717},\frac{9}{217},\frac {27}{619},\frac {7}{160},\frac {27}{619},\frac {23}{539},\cdots\right\}$$
A: I put here my progress :
Let $a=1,b=1.1,p=\frac{4c}{\left(a-b\right)}\sqrt{\frac{1-\ln2}{1+\ln2}},c=d$ then $\exists d \in(0,0.1)$ such that for $x>0$:
$$\frac{\left(ax^{p}+b\right)}{cx^{p}+d}-\frac{\left(a+b\right)}{c+d}+2\geq \left(1+x\right)^{x^{-\frac{1}{2\ln2}\left(1-\sqrt{\frac{1-\ln2}{1+\ln2}}\right)}}\tag{I}$$
Then the proof is direct .
Currently I cannot find $d$ and the proof of $(I)$ seems quite complicated .
Update :
Simply $d$ is choose as $f'''(1)=g'''(1)$ where :
$$\frac{\left(ax^{p}+b\right)}{cx^{p}+d}-\frac{\left(a+b\right)}{c+d}+2=f(x),g(x)=\left(1+x\right)^{x^{-\frac{1}{2\ln2}\left(1-\sqrt{\frac{1-\ln2}{1+\ln2}}\right)}}$$
