# What is the range of $x+\frac{1}{x}$ if $-2\leq x \leq 2$

What is the range of $x+\frac{1}{x}$ if $-2\leq x \leq 2$?

My try:

$-2\leq x \leq 2$

$\Rightarrow \frac{-1}{2}\leq x \leq \frac{1}{2}$

$\Rightarrow \frac{-5}{2}\leq x+\frac{1}{x} \leq \frac{5}{2}$

• Hint: For $x=\frac{1}{100}$ you get $x+\frac{1}{x} = \frac{1}{100}+100 = 100.01$ which is not in your given range. – gammatester Aug 6 '15 at 12:46
• Start with just positive $x$ (for negative values, the expression just gets a global negative component). If $0 \leq x \leq 2$, then $\tfrac 1x \geq \tfrac 12$, so you cannot just add the inequalities. – Maciek Aug 6 '15 at 12:46
• You are making two mistakes: wrongly estimating the range of $1/x$, and treating $x$ and $1/x$ as if they could take any value in their respective range independently of each other. (Not counting the typo in the second line.) – Yves Daoust Aug 6 '15 at 13:04
• A sketch of $y=x +\frac1x$ might help you see the issues – Henry Aug 6 '15 at 13:07

For $x=0$, the expression makes no sense. Furthermore, the function $f(x)=x+\frac1x$ is odd, so it suffices to consider the interval $(0,2]$.

The derivative $$f'(x)=1-\frac1{x^2}$$ is negative at $(0,1)$ and positive at $(1,2]$. At $x=1$ there is a minimum and $f(1)=2$, and $$\lim_{x\to0^+}f(x)=\infty$$ therefore, the range for $f(x)$ at $(0,2]$ is $[2,\infty)$.

Can you finish? Remember that $f$ is odd.

It would be good also to notice that $f$ reaches every intermediate value, due to its continuity.

Hint: You can consider the first derivative of $f(x) = x + \frac{1}{x}$ to know how this function varies.

If $x>0$ using Inequality of arithmetic and geometric means,

$$\dfrac{x+\dfrac1x}2\ge\sqrt{x\cdot\dfrac1x}\iff x+\dfrac1x\ge2$$

The equality occurs if $x=\dfrac1x\iff x=1$ as $x>0$

Now consider two values of $x,a>b>0$

$a+\dfrac1a-\left(b+\dfrac1b\right)=(a-b)\dfrac{ab-1}{ab}$ will be $>0$ if $(ab-1)ab>0\iff ab>1$

So, we shall continue getting higher values of $x+\dfrac1x$ if $ab>1$

If $x<0,$ set $-x=y$

• +1. But I think, you should mention the term inequality of arithmetic and geometric means – gammatester Aug 6 '15 at 13:10
• You also forgot to check that equality is possible (and the lower bound tight) in the allowed range of $x$, and that the expression is unbounded above. – Yves Daoust Aug 6 '15 at 13:14
• @YvesDaoust, Please find the revised answer – lab bhattacharjee Aug 6 '15 at 16:20
• Isn't it enough to say that $1/x$ is unbounded ? – Yves Daoust Aug 6 '15 at 17:21

If $x < 0$, then $x+\frac1{x} =-(|x|+\frac1{|x|})$, so we only have to look at $x > 0$.

If $x > 0$, $x+\frac1{x} =x+\frac1{x}-2+2 =(\sqrt{x}-\sqrt{\frac1{x}})^2+2$, so $x+\frac1{x} \ge 2$ and equals $2$ for $x = 1$.

Since $\frac1{x} \to \infty$ as $x \to 0$, $x+\frac1{x}$ can be arbitrarily large.

Therefore, the range for $x > 0$ is $[2,\infty)$ and the range for $[-2, 2]\backslash\{0\}$ is $[2,\infty) \cup (-\infty, -2]$.

Considering $f$'s derivative, $\pm1$ are critical points. And $\pm2$ are endpoints of the domain. And the function is not defined at $0$. Since \begin{align}f(-2)&=-2.5&f(-1)&=-2&\lim_{x\to0^-}f(x)&=-\infty\\ \lim_{x\to0^+}f(x)&=\infty&f(1)&=2&f(2)&=2.5\end{align} the range is $(-\infty,-2]\cup[2,\infty)$.