$$h(t) = \left\{\begin{array}{l}1,\, \pi\leq t<2\pi\\ 0,\, 0\leq t<\pi\text{ and }t\geq2\pi\end{array}\right.$$
I need to change $h(t)$ into a one line function.
I believe it to be $h(t)=u_{\pi}(t) - u_{2\pi} (t)$
The part that is throwing me is the $t \geq 2\pi$. Normally these are $t \geq 0$.
I really wish there was an equation editor on here....
It might be helpful to consider it as three separate parts: $$h(t) = \left\{\begin{array}{l} 0,\, 0\leq t<\pi \\ 1,\, \pi\leq t<2\pi\\ 0, t\geq2\pi \end{array}\right.$$
The most systematic way I find to turn these into heaviside functions is to start with the top-most, then add heaviside times the function on the next step minus that of the previous step: $$h(t)=0+u_\pi(t)\cdot(1-0)+u_{2\pi}(t)\cdot(0-1)\\ =u_\pi-u_{2\pi},$$ As you said.