let $f(x)=\dfrac{n(x)}{d(x)}$ where $n(x)=x-4$ and $d(x)=x+8$
There are 3 regions of note
i) $n(x), d(x)<0$
ii) $n(x)<0, 0 <d(x)$
iii) $0<n(x), 0<d(x)$
$n(x) < 0 \Rightarrow x<4$
$d(x)<0 \Rightarrow x<-8$
so
i) is $x < -8$
ii) is $-8 < x < 4$
iii) is $4 < x$
In region 1 the negative signs cancel each other so we are left with the original expression.
In region 2 we have the negative of the original expression
In region 3 we have no negative signs so we have the original expression.
So we have the original expression on $(x<-8) \cup (4<x)$
and the negative of the original expression on $-8 < x < 4$
Finally note that $x \neq -8$ as this would lead to division by zero, but x=4 is allowed. So we refine our intervals as
Original expression on $(-\infty, -8) \cup (4, \infty)$
Negative expression on $(-8, 4]$
so we have finally
$f(x) = \begin{cases}
\dfrac{x-4}{x+8} &(-\infty, -8)\cup (4,\infty)\\
\dfrac{4-x}{x+8} &(-8,4]\end{cases}$
which is answer #1
Hello, chewydrop!
Express $\displaystyle f(x) \:=\:\left|\frac{x-4}{x+8}\right|$ as a piecewise function
by eliminating the absolute value signs.
There are two cases to consider.
(1) The fraction is positive: .$\displaystyle \frac{x-4}{x+8} \:>\:0$
Then there are two more cases to consider.
. . (a) The numerator and denominator are both positive.
. . . . . $\displaystyle \begin{Bmatrix}x-4 \,>\,0 &\Rightarrow & x \:>\:4 \\ x+8 \:>\:0 &\Rightarrow & x \:>\:\text{-}8\end{Bmatrix} \quad \Rightarrow\quad x \:>\:4 $
. . (b) The numerator and denominator are both negative.
. . . . . $\displaystyle \begin{Bmatrix}x-4\,<\,0 & \Rightarrow & x \,<\,4 \\ x+8 \,<\,0 & \Rightarrow & x \,<\,\text{-}8\end{Bmatrix} \quad\Rightarrow\quad x \,<\,\text{-}8$
Hence, the fraction is positive for: .$\displaystyle x < \text{-}8\;\cup\;x > 4$
And the fraction is negative for: .$\displaystyle \text{-}8 < x < 4$
Therefore: .$\displaystyle f(x) \;=\;\begin{Bmatrix}\dfrac{x-4}{x+8} & \text{ for }(\text{-}\infty,\text{-}8) \cup [4,\,\infty) \\ \\[-3mm]\dfrac{4-x}{x+8} & \text{ for }(\text{-}8,\,4) \end{Bmatrix}$