Question: I need to define the function $y= |x+2|+|x-3|$ over the relevant intervals,
but I am not entirely sure what this entails. How do I find the needed intervals? Plugging in different values gives me an idea of the shape of the graph, but I don't know how to use that to actually determine the piecewise definition of $y$.

Any guidance would be appreciated.

Answer: 
> 
> But I am not entirely sure what this entails.
> 
> 
> 

It entails investigating the nature of $y=|x+2|+|x-3|$ by using your knowledge of $|x|$ which is defined as follows:
$$
|x|=
\begin{cases}
x &\text{if $x \geq 0$},\\
-x &\text{if $x<0$}.
\end{cases}
$$
Similarly, for $|x+2|$, we have
$$
|x+2|=
\begin{cases}
x+2 &\text{if $x \geq -2$},\\
-(x+2) &\text{if $x<-2$}.
\end{cases}\tag{1}
$$
Finally, for $|x-3|$, we have
$$
|x-3|=
\begin{cases}
x-3 &\text{if $x \geq 3$},\\
-(x+3) &\text{if $x<3$}.
\end{cases}\tag{2}
$$
What intervals do we need to consider to graph $y$? A little bit of investigation reveals that we largely need to consider three intervals:

* **Interval 1:** $\quad x<-2$
* **Interval 2:** $\quad -2\leq x<3$
* **Interval 3:** $\quad x\geq 3$

Now use $(1)$ and $(2)$ to determine what $y$ will look like on these intervals:

For $x<-2$:
$$
y=|x+2|+|x-3|=-(x+2)-(x-3)=-x-2-x+3=-2x+1.
$$
For $-2\leq x<3$:
$$
y=|x+2|+|x-3|=(x+2)-(x-3)=5.
$$
For $x\geq 3$:
$$
y=|x+2|+|x-3|=x+2+x-3=2x-1.
$$
Hence, we have the following:
$$
y=|x+2|+|x-3|=
\begin{cases}
-2x+1 &\text{if $x<-2$},\\
5 &\text{if $-2\leq x<3$},\\
2x-1 &\text{if $x\geq 3$}.
\end{cases}
$$
Your graph will look like this:

![enter image description here](https://i.stack.imgur.com/K1Qc7.png)
you can use the geometric interpretation of the absolute value function $|a-b|$ as the distance between the points represented $a$ and $b$ on the number line. that is rewrite $y = |x+2| + |x-3|$ as $y=|x-(-2)| + |x-3|.$ now interpret $y$ as the sum of the distances between the point $x$ to the points $-2$ and $3.$ 

with that, it becomes clear now that if $x$ is between $-2$ and $3,$ then $y$ is the constant $5,$ the distance between the points $-2$ and $3.$ if $x > 3,$ then $y$ is twice the distance from the midpoint $\frac 12,$ that is $2(x - \frac12) = 2x - 1.$ similarly if $x < -2, y = 1- 2x.$ in fact the graph of $y$ is symmetric about $x = \frac 12.$

so finally we have $$|x+2| +|x - 3| = \begin{cases} 1 - 2x & \text{ if }x \le -2\\5 & \text{ if } -2 < x < 3\\2x-1 & \text{ if } 3 \le x. \end{cases}$$