Why does A.M.-G.M. inequality not give desired result for $x^4+\frac{1}{x^2}$, in the form $x^4+\frac{1}{x^2}\ge 2\sqrt{x^2}$ but $2^{\sin x} + 2^{\cos x}$ does?

My confusion about the application of this inequality keeps on increasing. First, the things I believe are true:

  • For the equality to hold, each term must be equal.
  • To get the actual absolute extrema, there should be a constant value on other side. (Because otherwise it will keep changing?)

And that's why, this inequality does not work for $x^4+\frac{1}{x^2}$ in the form $$x^4+\frac{1}{x^2}\ge 2\sqrt{x^2}$$

Though, both terms are equal at $x=1$ but since there's not a constant value on RHS, we don't get desired result.

Here's the question I encountered in my yesterday's exam:

Find the minimum value of $2^{\sin x} + 2^{\cos x}$

I found that in this case there is not going to be a constant term in any case. Hence, A.M.-G.M. inequality is not useful here. So I just left question assuming it is out of my league.

However, later my classmate showed me that the minimum value will be $2^{1-\frac{1}{\sqrt{2}}}$ using A.M.-G.M. inequality.

$2^{\sin x}+2^{\cos x}\ge 2\cdot 2^{\frac12({\sin x +\cos x})}$

For minima, $\sin x +\cos x =-\sqrt2$

I pointed out that there should be a constant value. He then showed me the graph of the function on desmos and the minimum value is actually the absolute minima!

My question is,

Why does A.M.-G.M. inequality not give desired result for $x^4+\frac{1}{x^2}$, in the form $x^4+\frac{1}{x^2}\ge 2\sqrt{x^2}$ but $2^{\sin x} + 2^{\cos x}$ does?

Is this application of A.M.-G.M. inequality mere pure coincidence? (I'm not asking the condition for quality to hold).

If yes, then how do we know which ones are suitable and which ones are not?

If not, then how do we find the absolute extrema?

And, I was thinking it has something to do with minimum of $\sqrt{x^2}$ not being in domain of $x^4+\frac{1}{x^2}$. So I checked for $(x^2+x+1)^2+\frac{1}{(x^2+x+1}$ which verifies that my suspicion was wrong.

  • 1
    $\begingroup$ Why do you think that AM-GM would give an exact answer to all the questions about maxima/minima? After all, it has equality only under very special circumstances that rarely apply (unless the problem is tailored that way). $\endgroup$ Sep 5, 2020 at 4:18
  • 1
    $\begingroup$ And your title is misleading. You haven't exhibited any counterexamples to AM-GM. Nor are you asking about such (AFAICT). $\endgroup$ Sep 5, 2020 at 4:19
  • $\begingroup$ @Jyrki Lahtonen, Counterexample to the "rules" I mentioned above, which I got from this site only. Why do you think A.M.-G.M. would give give an exact answer to all questions about maxima/minima I don't. I'm asking if that's the case. And that's my secondary question. The main question is about the contraction occuring in what I learnt from here, and I want to clear that. $\endgroup$
    – UmbQbify
    Sep 5, 2020 at 4:30

1 Answer 1


This is a very good question. Although it is not a counterexample to the AM-GM inequality, it is rather a counterexample to the "constant-value" rule of thumb that you stated.

To tackle this, let's consider exactly why you are taught this rule. Suppose we have an expression $f(x) + g(x)$. Then by AM-GM we get $$f(x) + g(x) \ge 2\sqrt{f(x)g(x)}.$$ This is always true if $f(x), g(x) \ge 0$. There is no counterexample to it. However, the RHS may involve $x$, so for example $2^{\sin x} + 2^{\cos x} \ge 2\times2^{\sin x + \cos x}$.

Now, you want to find the minimum of the expression, so a mere inequality doesn't do: you need an inequality such that one side is a constant value. And that's why you are taught that rule. But, as a rule of thumbs, you can't trust it in every case. So let's examine closely why your classmate is right.

$${2^{\sin x} + 2^{\cos x} \ge 2\times2^{\sin x + \cos x} \ge 2\times 2^{-\sqrt{2}/2}}$$

Each inequality holds, so indeed you have $2^{\sin x} + 2^{\cos x} \ge 2^{1-\sqrt{2}/2}.$ What about the other example? $$x^4 + \frac1{x^2} \ge 2|x| \ge 0$$

Each inequality holds, so indeed you have $x^4 + \frac1{x^2}\ge 0$. This inequality is correct! The only thing is that it is not the minimum. And why is that? Let's review the condition for the equality to hold. For the first inequality, it holds when $x^4 = \frac1{x^2}$, i.e. when $x=\pm1$. while for the second inequality, it holds when $2|x|=0$, i.e. when $x=0$. A mismatch! This means that the equality for $x^4+\frac1{x^2} \ge 0$ will never hold, since it requires $x=\pm1$ and $x=0$, at the same time!

Now let's turn to $2^{\sin x} + 2^{\cos x}$. The first equality holds when $2^{\sin x} = 2^{\cos x}$, i.e. when $\sin x = \cos x = \pm\frac{\sqrt 2}2$. The second equality holds when $\sin x = \cos x = -\frac{\sqrt2}2$. So the overall equality for $2^{\sin x} + 2^{\cos x} \ge 2^{1-\sqrt2/2}$ can be made to hold, when we take $x = -\frac{3\pi} 4$, for example.

To conclude, if you want to use multiple inequalities to obtain some minimum (in this case, first AM-GM then an inequality for trig functions), you must ensure that all the equalities can hold simultaneously. And that's a more general version of your rule of thumb (your version essentially says that you should only use one inequality when calculating minima, and this of course ensures that the equality can hold simultaneously -- there is just one equality in consideration!).

Edit: the exercise may be a bit inappropriate, deleted.

  • $\begingroup$ @UmbQbify-Key20- $\sqrt {x^2} = |x|$ is always true. So I'm skipping that for brevity. $\endgroup$
    – Trebor
    Sep 5, 2020 at 4:40
  • $\begingroup$ I mean $x^4 + \frac{1}{x^2} \ge 2\sqrt{x^2} = 2|x|$. I just skipped the middle step in belief that you can infer that. $\endgroup$
    – Trebor
    Sep 5, 2020 at 4:45
  • $\begingroup$ Ah yes. Editing. $\endgroup$
    – Trebor
    Sep 5, 2020 at 4:47
  • $\begingroup$ Thank you for this detailed answer. I didn't know it's a rule of thumb $\endgroup$
    – UmbQbify
    Sep 5, 2020 at 4:47
  • $\begingroup$ In particular, for non-negative $f,\,g$ we can find $f+g$'s minimum from $f+g\ge2\sqrt{fg}$ provided $fg$'s minimum satisfies $f=g$. $\endgroup$
    – J.G.
    Sep 5, 2020 at 9:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .