Problematic solution related to finding the function range 
The Question: Find the range of the following function
$$y=\dfrac{x}{2}+\dfrac{8}{x}$$


Solution $-1.$ (the solution given to me)
By Cauchy inequality,
$$\dfrac{x}{2}+\dfrac{8}{x}≥2\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}=4$$  where $x>0$ $$\dfrac{x}{2}+\dfrac{8}{x}≤-2\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}=-4$$  where $x<0$ which implies $y \in(-\infty, -4] ∪ [4, +\infty).$


But, as far as I know, we don't define inequality of arithmetic and geometric means for negative numbers.For this reason, I strange this mathematical way.
$$\dfrac{x}{2}+\dfrac{8}{x}≤-2\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}=-4$$  where $x<0.$
Okay, If our equation were equal to a
$$y=\dfrac{x-2}{2}+\dfrac{8}{2-x}$$  or $$ y=\dfrac{x}{2}+\dfrac{8}{|x|}$$ then we can not apply,
$$y=\dfrac{x-2}{2}+\dfrac{8}{2-x} \leq -2\sqrt{ \dfrac{x-2}{2}× \dfrac{8}{2-x}} \in {\emptyset}.$$
$$ y=\dfrac{x}{2}+\dfrac{8}{|x|} ≤-2\sqrt{ \dfrac{x}{2} × \dfrac{8}{|x|}} \in {\emptyset}.$$  where $x<0$.
What I mean,
For $x<0$ ,the arithmetic meaning of $\dfrac{\dfrac{x}{2}+\dfrac{8}{x}}2$  doesn't exist and the geometric meaning of $\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}$ doesn't exist.
So, for $x<0$ to write the $\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}$,  I think, it doesn't make sense.
I would go on like this.
$$y=\dfrac{x}{2}+\dfrac{8}{x}≥2\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}=4$$  where $x>0$
Then, for $x<0$ we have both $\dfrac{x}{2}$ and $\dfrac{8}{x}$ are negative. In this sense we can write
$$\dfrac{x}{2}+\dfrac{8}{x}≥2\sqrt{ \dfrac{x}{2}× \dfrac{8}{x}}=4$$
$$-\left(\dfrac{x}{2}+\dfrac{8}{x}\right)\leq-4$$
$$- \dfrac{x}{2}+\left(-\dfrac{8}{x}\right) \leq-4$$ where $x>0$.
It seems more sense to me.
So we get, $y \in(-\infty, -4] ∪ [4, +\infty)$
I don't know how right I am.

My solution:
$$\begin{align} y=\dfrac{x}{2}+\dfrac{8}{x} \Longrightarrow 2yx=x^2+16 \Longrightarrow x^2-2yx+16=0 \Longrightarrow \Delta=y^2-16 \geq0 \Longrightarrow y \in(-\infty, -4] ∪ [4, +\infty). \end{align}$$


*

*Question $-1$ :Do you find the solution $-1$ perfect?


*Question$-2$ :Is my own solution correct?
Remark.

If our function were as follows, we could easily apply the arithmetic-geometric inequality.
$$y=\dfrac{x^2}{2}+\dfrac{8}{x^2}$$
$$y=\dfrac{x^2}{2}+\dfrac{8}{x^2}≥2\sqrt{ \dfrac{x^2}{2}× \dfrac{8}{x^2}}=4$$
$$y \in [4, +\infty)$$

 A: 

*

*Question $-1$ :Do you find the solution $-1$ perfect?


No, I don't.
Firstly, the inequality in solution $-1$ is correct.
If $x\lt 0$, then by the inequality of arithmetic and geometric means, we have
$$\frac x2+\frac 8x=-\bigg(\frac{-x}{2}+\frac{8}{-x}\bigg)\le -2\sqrt{\frac{-x}{2}\times\frac{8}{-x}}=-4$$
So, the inequality in solution $-1$ is correct.
Secondly, however, solution $-1$ is not correct because it does not prove that the range is $y \in(-\infty, -4] ∪ [4, +\infty)$. Solution $-1$ proves that if $x\gt 0$, then $y\ge 4$, and if $x\lt 0$, then $y\le -4$. This does not imply that the range is $y \in(-\infty, -4] ∪ [4, +\infty)$. Solution $-1$ does not prove that $y$ can take every value in $(-\infty, -4] ∪ [4, +\infty)$.


*

*Question$-2$ :Is my own solution correct?


Yes, it is.
(I would add some words as follows : $y=\dfrac{x}{2}+\dfrac{8}{x}$ is equivalent to $x^2-2yx+16=0$. There is at least one $x$ satisfying this quadratic equation on $x$ if and only if the discriminant is non-negative, i.e. $y \in(-\infty, -4] ∪ [4, +\infty)$.)
A: y' = 1/2 - 8/x$^2$
Solving y' = 0, x$^2$ = 16.
Thus for positive x,
the minimum of y is y(4) = 4
and the range of y is [4,$\infty$).
Simular for negative x.
