Help! Does anybody know how to do part b?
a) Let $a$ be a real number and consider the function $f:\mathbb R \to \mathbb R$ defined piecewise by
$$f(x) := \begin{cases} x-a, & \text{if $x>a$}\\ 0, & \text{if $x\le a$} \end{cases}$$ Show that for every real number $x$ we have
$$f(x) = 0.5(x-a)+0.5|x-a|$$
b) Consider the function $P:(0,+\infty)\to\mathbb R$, which is defined piecewise by $$P(x) = \begin{cases} 27, & \text{if $0<x\le 2$}\\ 9.5x+8, & \text{if $2<x\le 9$}\\ 6.5x+35, & \text{if $x>9$} \end{cases}$$ Using the result from a), express $(x)$ as the sum of a linear polynomial and absolute values of linear polynomials, i.e. write $(x)$ in the form
$$P(x)=(b_0x+c_0)+|b_1x+c_1|+|b_2x+c_2|+...$$
where $b_i$ and $ c_i$ are real numbers.