Minimizing a function by finding its critical points Let $f_n(x)$ equal:
$$(2^n+2) \left(2x+1-\sqrt{2x^2+2x} \right)^n-x^n-(x+1)^n-\left(3x+1-2\sqrt{2x^2+2x}\right)^n-\left(3x+2-2\sqrt{2x^2+2x}\right)^n$$
Mathematica suggests that this function has two critical points on $(0,\infty)$, namely $x_1=1$ and $x_2=1/\sqrt{2}-1/2$. This seems to be independent of $n$ (well, I checked for all $4\leq n\leq 7$; also $f_1(x),f_2(x),f_3(x)$ identically equal to zero, a fact that I don't quite understand yet).
Problem: Prove that the only critical points of $f_n(x)$, $n\geq 4$, are $x_1=1$ and $x_2=1/\sqrt{2}-1/2$.
My goal is to show that $f_n(x)\geq 0$ for all $x\geq 0$. If I can show the only critical points are $1$ and $1/\sqrt{2}-1/2$, then by noting that $f_n(1)=0$ and $f_n(1\sqrt{2}-1/2)>0$ we have proved the claim. Of course, if you can prove $f_n(x)\geq 0$ in any way, please do share your proof.
 A: In this answer, it is shown that $f_n(x)\geq 0$ directly without using the derivative.
Denote by ${\cal P}$ the set of all polynomials with nonnegative coefficients in the variable $v$. Clearly, $\cal P$ is closed wrt addition and multiplication.
As explained in RiverLi's answer, it will suffice to show that $h_n(v)\in{\cal P}$ where
$$
h_n(v)=(2^n+2)((1+v)^2+1)^n - 2^n - (v+2)^{2n} - v^{2n} - 2^n (1+v)^{2n}\tag{1}
$$
Our first step is to rewrite $h_n(v)$ as
$$
w_1(n)=-r_1^n-r_2^n+2r_3^n-r_4^n-r_5^n+r_6^n \tag{2}
$$
where
$$
\begin{array}{c}r_1=2,r_2=v^2,r_3=v^2+2v+2,r_4=v^2+4v+4, \\ r_5=2v^2+4v+2,r_6=2v^2+4v+4\end{array} \tag{3}
$$
Notice that each of $r_1,r_2,\ldots,r_6$ is in $\cal P$. So, our goal is to show that $w_1(n)\in{\cal P}$ for each $n\geq 1$. Now, define for $2\leq k \leq 6$,
$$
w_k(n)=w_{k-1}(n+1)-r_{k-1}w_{k-1}(n) \tag{4}
$$
then, it is immediate by induction on $k$ that $w_k(n)$ can be written as $w_k(n)=\sum_{j=k}^{6}c^k_{j}r_j^n$ where the base case (from (2)) is $(c^1_j)_{1\leq j \leq 6}=(-1,-1,2,-1,-1,1)$ and the inductive step (from (4)) is $c^{k}_j=c^{k-1}_j(r_j-r_{k-1})$.
By a domino decomposition (see more detailed explanation below), it will suffice to show that $w_6(n)\in{\cal P}$ and
each of $w_k(1)$ for $1\leq k \leq 5$ is in $\cal P$. Here are the numerical values that show it :
$$
\begin{array}{lcl}
w_1(1) &=& 0 \\
w_2(1) &=& 0 \\
w_3(1) &=& 0 \\
w_4(1) &=& 16v^2(v+1)^2(v+2)^2 \\
w_5(1) &=& 32v^2(v+1)^4(v+2)^2 \\
w_6(n) &=& 3v^2(v+1)^2(v+2)^2(v^2+2v+2) r_6^n \\
\end{array} \tag{5}
$$
Thus, we argue as follows : we have $w_5(2)=r_5w_5(1)+w_6(1) \in {\cal P}$ since all of $r_5,w_5(1)$ and $w_6(1)$ are already known to be in $\cal P$. Similarly, $w_5(3)=r_5w_5(2)+w_6(2)\in {\cal P}$, and more generally $w_5(n)\in {\cal P}$ for any $n\geq 1$, by induction on $n$. We proceed likewise on $w_4,w_3,w_2$ up to $w_1$.
This finishes the proof.
A: The fact that $f_1(x),f_2(x),f_3(x)$ are identically equal to zero is simple (even if a bit tedious) to prove; just expand the expression.
Concerning $f_4(x)$ it reduces to
$$f_4(x)=4 x (x+1) \left(17 x^2+17 x+2\right)-24 \sqrt{2}\, x^{3/2} (x+1)^{3/2} (2 x+1)$$
$$f'_4(x)=8 (2 x+1) \left(17 x^2+17 x+1\right)-12 \sqrt{2}\, x^{1/2} (x+1)^{1/2} (4 x+1) (4 x+3)$$ After one squaring  step, the derivative cancels when
$$(x-1)\left(4 x^2+4 x-1\right) (x+2) \left(2 x^2+2 x+1\right) =0$$ So, since $x >0$, the only acceptable solutions are
$$x_1=1 \qquad \text{and} \qquad x_2=\frac{\sqrt{2}-1}{2} $$ as you already found.
Doing the same for $f'_5(x)$, the derivative cancels for
$$(x-1)  \left(4 x^2+4 x-1\right)(x+2) \left(25 x^4+50 x^3+35 x^2+10 x+4\right)=0$$ and the quartic does not show real roots.
Continuing (it starts to be tedious), for $f'_6(x)$, the derivative cancel for
$$(x-1)\left(4 x^2+4 x-1\right)(x+2) \left(2 x^2+2 x+1\right)  \left(9 x^4+18 x^3+9
   x^2+1\right)$$ and again the quartic does not show real roots.
It seems that the expressions which make the derivative equal to zero show a quite clear pattern. This has been tested up to $n=100$; to confirm, the values of  $f'_n(x_1)$ and $f'_n(x_2)$ have been systematically checked and they are always equal to $0$.
It is clear that $f_n(x_1)=0$. So, now
$$f_n(x_2)=2^{n/2}+2^{1-\frac{n}{2}}-2^{1-n}\Big[ \left(\sqrt{2}-1\right)^n+
   \left(\sqrt{2}+1\right)^n\Big]$$ which is a very fast increasing function.
As @Alexey Burdin commented, this looks to be the result of a (difficult) recurrence relation.
A: Some thoughts
It suffices to prove that $f_n(x) \ge 0$ for $x > 0$.
With the substitution $x = \frac{2}{u^2+2u-1}$ for $u > \sqrt{2} - 1$ (correspondingly, $u = \sqrt{2 + \frac{2}{x}} - 1$), we have
$$f_n(x) = \frac{1}{(u^2+2u-1)^n}
[(2^n+2)(u^2+1)^n - 2^n - (u+1)^{2n} - (u-1)^{2n} - 2^n u^{2n}].$$
It suffices to prove that, for $u > 0$,
$$(2^n+2)(u^2+1)^n - 2^n - (u+1)^{2n} - (u-1)^{2n} - 2^n u^{2n} \ge 0.$$
Denote the LHS by $g_n(u)$. Note that $u^{2n} g_n(\frac{1}{u}) = g_n(u)$ for $u > 0$.
Thus, it suffices to prove that, for $u \ge 1$,
$$(2^n+2)(u^2+1)^n - 2^n - (u+1)^{2n} - (u-1)^{2n} - 2^n u^{2n} \ge 0.$$
Let $u = 1 + v$. It suffices to prove that, for $v \ge 0$,
$$(2^n+2)((1+v)^2+1)^n - 2^n - (v+2)^{2n} - v^{2n} - 2^n (1+v)^{2n} \ge 0.$$
Denote the LHS by $h_n(v)$. It suffices to prove that
the polynomial $h_n(v)$ has non-negative coefficients.
I did some numerical experiments which support this claim.
A: Some remarks:
For $n = 9$ the number of critical points increases at least to four as we can verify with this MATHEMATICA script.
n = 9;
f = (2^n + 2) (2 x + 1 - Sqrt[2 x^2 + 2 x])^n - (3 x + 1 - 2 Sqrt[2 x^2 + 2 x])^n - (3 x + 2 - 2 Sqrt[2 x^2 + 2 x])^n - x^n - (x + 1)^n;
Plot[f, {x, 0, 1.1}]


df = D[f, x];
FindRoot[df == 0, {x, 0.1}]
FindRoot[df == 0, {x, 0.2}]
FindRoot[df == 0, {x, 0.6}]
FindRoot[df == 0, {x, 1.1}]  

