Two values of minima of a function by two methods. 
I had a problem of finding minima of a function
  $$f(x)=2^{x^2}-1+\frac{2}{2^{x^2}+1}$$

I solved it using AM-GM inequality,
$$2^{x^2}-1+\frac{2}{2^{x^2}+1}$$
$$2^{x^2}+1+\frac{2}{2^{x^2}+1}-2$$
$$2^{x^2}+1+\frac{2}{2^{x^2}+1}\ge\ 2\sqrt2$$
$$2^{x^2}-1+\frac{2}{2^{x^2}+1}\ge\ 2\sqrt2-2$$
But in the solution answer was given as 1 and it was solved using differentiation,
$$f'(x)=\frac{2x.ln2.2^{x^2}(2^{x^2}+1-\sqrt2)(2^{x^2}+1+\sqrt2)}{(2^{x^2}+1)^2}$$
$$2^{x^2}\ge1$$
$$2^{x^2}+1-\sqrt2\ge2-\sqrt2>0$$
At $x=0$ ,$f(x)$ is least.
Least value = $f(0)$ $=1$ 
I cannot understand how can there be two values by two different methods,please help me in the problem.

A much simpler method is to define $$y(x)=2^{x^2}$$ and $$g(y) = y-1+\frac{2}{y+1}$$
Such that $f(x) = g(y(x))$.
Then, rewrite g : $$g(y) = \frac{y^2+1}{y+1}$$
So, it's easy to see that g is increasing on $[1,+\infty)$, and $y\geq1$, therefore, the minimum of $f$ is $g(1)=1$ with $x=0$
