Let the weight of the dogs be w
Let the cost of the dogs as a function of the weight be represented as C(w)
Dogs 10 lbs or less are charged $20
That is, when w ≤ 10, C(w) = 20
Dogs between 10 and 40 lb are charged $35
That is when 10 < w < 40, C(w) = 35
Dogs over 40 pounds are charged $50 plus $2 a pound over 40 pounds
That is, when w > 40, C(w) = 50
When w = 40, C(w) = 2w = 2(40) = 80
The piecewise function can therefore be represented as:

Hello