## Calculus: Early Transcendentals (2nd Edition)

$$f(x)=|x-2|+3,\quad g(x)=-|x+2|-1.$$
1) The purple function. We see that it has a cusp when $x=2$ and $y=3$. This means that the function $y=|x|$ has to be shifted upwards by $3$ and rightwards by $2$. There is no rescaling since the function in the linear pieces increases or decreases by $1$ unit when $x$ changes by $1$ so the equation is $$y=|x-2|+3.$$ 2) The blue function. This function has a cusp when $x=-2$ and $y=-1$ and it point upwards which means that it is inverted with respect to $y=|x|$. There are several ways to obtain this function, one of them is: invert it with respect to $x$ axis and then shift it leftwards by $2$ and downwards by $1$: a) Inversion $|x|\to-|x|$; b) Leftwards shift $-|x|\to-|x+2|$ c) Downwards shift $-|x+2|\to-|x+2|-1$ The function is then $$y=-|x+2|-1.$$ Their graphs are in the figure below