Solution 1:

The following answer is an compose of the comment of tired under the original question and the answer of Michael Rozenberg. The quickest way at the end of the remark.

Lemma 1. If $f(x)$ for $x>0$ is convex and twice differentiable, then $xf(\frac{1}{x})$ is convex for $x>0$.

Proof. By a direct calculation $\dfrac{\mathrm{d}^2 (x f(\frac{1}{x}))}{\mathrm{d} x^2} = \dfrac{f''\Big(\dfrac{1}{x}\Big)}{x^3}$. QED

Lemma 2. Let $f(x)$ be twice differentiable and positive for $x>0$. If $\ln f(x)$ is convex, then $f(x)$ is convex.

Proof. By a direct calculation $\dfrac{\mathrm{d}^2 \ln f(x)}{\mathrm{d} x^2} = \dfrac{f(x)f''(x)-[f'(x)]^2}{f^2(x)}$, and by noticing that $\ln f(x)$ is convex, we get $$ \dfrac{f(x)f''(x)-[f'(x)]^2}{f^2(x)} \ge 0. $$ Since $f(x)$ is positive, $$ f''(x) \ge \dfrac{[f'(x)]^2}{f(x)}\ge 0. $$ QED

Proof of the convexity of $x(1+1/x)^x$. By Lemma 1, we only need to show that $g(x)=(1+x)^{1/x}$ is convex. Then by Lemma 2, it is sufficient to prove that $\ln g(x) = \frac{1}{x}\ln (1+x)$ is convex.

Since $$\dfrac{\mathrm{d}^2 \ln g(x)}{\mathrm{d} x^2} = \frac{2 (x+1)^2 \log (x+1)-x (3 x+2)}{x^3 (x+1)^2},$$ we need to prove that $$ \log (x+1)-\frac{x (3 x+2)}{2 (x+1)^2}>0, $$ which can be easily followed from $$ \dfrac{\mathrm{d} \Bigl(\log (x+1)-\frac{x (3 x+2)}{2 (x+1)^2}\Bigr)}{\mathrm{d} x} = \frac{x^2}{(x+1)^3} > 0 $$ and $\lim\limits_{x\to 0^+}\Big[\log (x+1)-\frac{x (3 x+2)}{2 (x+1)^2}\Big] = 0$. QED

Remark. For Lemma 1 see Convex function calculus,i.e.,

If $f(x)$ is convex, then its perspective $\displaystyle > g(x,t)=tf\Big(\frac{x}{t}\Big)$ (whose domain is ${\displaystyle > \left\lbrace (x,t)\big|{\tfrac {x}{t}}\in {\text{Dom}}(f),t>0\right\rbrace > } \left\lbrace (x,t)\big|{\tfrac {x}{t}}\in > {\text{Dom}}(f),t>0\right\rbrace )$ is convex.

It seems that the above lemma is from probability which I do not familiar with. So I show Lemma 1 instead. And for Lemma 2 see https://en.wikipedia.org/wiki/Logarithmically_convex_function. If the problem comes from a textbook, I think the above is a clever way. If it comes from a real research, Michael Rozenberg's answer is good enough. However, the most cunning way, which will return the result less then 1 second, I found is to type the following code in Mathematica:

Minimize[{D[x (1 + 1/x)^x, {x, 2}], x > 0}, x]

Solution 2:

Let $f(x)=x\left(1+\frac{1}{x}\right)^x$, where $x>0$.

Hence, $$f''(x)=\frac{\left(1+\frac{1}{x}\right)^x\left(x(x+1)^2\ln^2\left(1+\frac{1}{x}\right)+2(x+1)\ln\left(1+\frac{1}{x}\right)-x-3\right)}{(x+1)^2}.$$ Thus, we need to prove that $$\ln\left(1+\frac{1}{x}\right)>\frac{\sqrt{x^2+3x+1}-1}{x(x+1)}.$$ Let $g(x)=\ln\left(1+\frac{1}{x}\right)-\frac{\sqrt{x^2+3x+1}-1}{x(x+1)}.$

Hence, $$g'(x)=\frac{2x^3+9x^2+7x+2-2\sqrt{(x^2+3x+1)^3}}{2x^2(x+1)^2\sqrt{x^2+3x+1}}=$$ $$=-\frac{11x^3+46x^2+35x+8}{2x(x+1)^2\sqrt{x^2+3x+1}\left(2x^3+9x^2+7x+2+2\sqrt{(x^2+3x+1)^3}\right)}<0,$$ which says that $g(x)>\lim\limits_{x\rightarrow+\infty}g(x)=0$ and we are done!

Solution 3:

I just want to add to the elegant proof of @wangtwo, and remedy the only blemish of an ugly proof of the convexity of $\frac{\ln(1+x)}x$ in a piece of otherwise perfect work. Here is an elegant replacement. $$\frac{\ln(1+x)}x=\int_0^1 \frac1{1+xt}dt$$ is convex since the integrand is convex with respect to $x$.


Here is a closely related problem and my own solution as mentioned by @wangtwo in his comment below.