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.