# How do you find the intervals of increasing and decreasing using the first derivative given y=5-abs(x-5)?

##### 1 Answer
Feb 23, 2017

$x \in \left(- \infty , 5\right) \implies$ increasing
$x \in \left(5 , \infty\right) \setminus \setminus \setminus \setminus \setminus \implies$ decreasing

#### Explanation:

We have:

$y = 5 - | x - 5 |$

It always helps to draw a graph, we cam probably answer the question fully from the graph, at the very least it can help guide the solution.

graph{5-|x-5| [-8.42, 11.58, -4, 6]}

From the graph we can see $y$ is increasing on the interval $\left(- \infty , 5\right)$, and decreasing on $\left(5 , \infty\right)$

Let us see if was can establish this same solution analytically. The definition of an increasing or decreasing function is that

$\left\{\begin{matrix}y ' < 0 \\ y ' > 0\end{matrix}\right. \implies \left.\begin{matrix}y \text{ is decreasing" \\ y " is increasing}\end{matrix}\right.$

It is the modulus in the function that will complicate analysis, so let's remove that using its' definition, and break the function into analytical segments. By definition;

$| x | = \left\{\begin{matrix}- x \setminus \setminus \setminus & x < 0 \\ 0 & x = 0 \\ x & x > 0\end{matrix}\right.$

And so:

$| x - 5 | = \left\{\begin{matrix}- \left(x - 5\right) \setminus \setminus \setminus & x - 5 < 0 \\ 0 & x - 5 = 0 \\ x - 5 & x - 5 > 0\end{matrix}\right.$

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left\{\begin{matrix}- \left(x - 5\right) \setminus \setminus \setminus & x < 5 \\ 0 & x = 5 \\ x - 5 & x > 5\end{matrix}\right.$

And finally:

$\therefore \setminus \setminus - | x - 5 | = \left\{\begin{matrix}\left(x - 5\right) \setminus \setminus \setminus & x < 5 \\ 0 & x = 5 \\ - \left(x - 5\right) & x > 5\end{matrix}\right.$

$\therefore 5 - | x - 5 | = \left\{\begin{matrix}5 + \left(x - 5\right) \setminus \setminus \setminus & x < 5 \\ 5 + 0 & x = 5 \\ 5 - \left(x - 5\right) & x > 5\end{matrix}\right.$

$\therefore \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus y = \left\{\begin{matrix}x \setminus \setminus \setminus & x < 5 \\ 5 & x = 5 \\ 10 - x & x > 5\end{matrix}\right.$

And we can now differentiate to get:

$y ' = \left\{\begin{matrix}1 \setminus \setminus \setminus & x < 5 \\ \text{undefined} & x = 5 \\ - 1 & x > 5\end{matrix}\right.$

And so the derivative condition are:

$y ' > 0 \implies x < 5 \implies x \in \left(- \infty , 5\right) \implies$ increasing
$y ' < 0 \implies x > 5 \implies x \in \left(5 , \infty\right) \setminus \setminus \setminus \setminus \setminus \implies$ decreasing

which gives intervals consistent with our graphical analysis.