In order to find the right equation for this piecewise function, I had to play around with Desmos and try different equations until I got the right one. To get the red line, I knew that it was less than zero, so that meant x<0 had to be in the equation somewhere. The domain changed from each individual function because they didn't continue on forever, each function had a point on the graph where they stopped. For example the red line's domain would be negative infinity to zero. The blue line's domain would be zero to two and the green line would be two to infinity, therefore they are all different. The range however did not change, the range for all three of these equations will always be zero to positive infinity.