Answer
a.
$ y=0$ when $0\leq x\leq \frac{T}{2}$
$ y=\frac{2}{T}x-1$ when $\frac{T}{2}\leq x\leq T $
b.
$ y=A $ when $0\leq x \lt \frac{T}{2}$
$ y=-A $ when $\frac{T}{2}\leq x \lt T $
$ y=A $ when $ T\leq x \lt \frac{3T}{2}$
$ y=-A $ when $\frac{3T}{2}\leq x \lt 2T $
Work Step by Step
a. We can see that the two line segments are: $(0,0)$ to $(\frac{T}{2},0)$ and $(\frac{T}{2},0)$ to $(T,1)$.
Using the formula of line equation passing two points:
Left line segment: $\frac{y-0}{x-\frac{T}{2}}=\frac{0-0}{0-\frac{T}{2}}$ which gives $ y=0$ when $0\leq x\leq \frac{T}{2}$
Right line segment: $\frac{y-1}{x-T}=\frac{0-1}{\frac{T}{2}-T}$ which gives $ y=\frac{2}{T}x-1$ when $\frac{T}{2}\leq x\leq T $
b. The four line segments are: $(0,A) to (\frac{T}{2},A)$, $(\frac{T}{2},-A) to (T,A)$, $(T,A) to (\frac{3T}{2},A)$ and $(\frac{3T}{2},-A) to (2T,-A)$
The equations can be easily found as:
$ y=A $ when $0\leq x \lt \frac{T}{2}$
$ y=-A $ when $\frac{T}{2}\leq x \lt T $
$ y=A $ when $ T\leq x \lt \frac{3T}{2}$
$ y=-A $ when $\frac{3T}{2}\leq x \lt 2T $