Explanation:
This function has two pieces, each of which is the absolute value of a linear expression. We need to consider the function separately for different ranges of x.
When -5 < x < 0, then x + 5 is negative and x - 5 is also negative. Therefore, we have:
y = -(x - 5) - (x + 5) = -2x
When 0 ≤ x < 5, then x + 5 is positive and x - 5 is negative. Therefore, we have:
y = (x - 5) + (x + 5) = 2x
So the function y = |x - 5| + |x + 5| can be written as:
y =
-2x if -5 < x < 0
2x if 0 ≤ x < 5
Notice that the function is not defined for x ≤ -5 or x ≥ 5.