How do you write #f(x)=|x-4|# as a piecewise function?

2 Answers
Mar 28, 2017

#f(x)={(x-4,color(white)("XX"),x > 4),(0,,x = 4),(4-x,,x < 4):}#

Explanation:

Basic definitions of absolute value and "piecewise function".

Mar 28, 2017

enter image source here

Explanation:

Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated subdomains. Crucially, in most settings, there must only be a finite number of subdomains, each of which must be an interval, in order for the overall function to be called "piecewise".
graph{|x-4| [-5, 15, -1.85, 8.15]}