Calculating integral consisting of two piecewise functions There is a system with response:
$h(t)= \begin{cases}
      1, & \text{if}\ 0 \leq t \leq 2 \\
      0, & \text{elsewhere} \end{cases}$
I need to find the response of the system to the following input:
$u(t)= \begin{cases}
      1-t, & \text{if}\ 0 \leq t \leq 1 \\
      0, & \text{elsewhere} \end{cases}$
I know that in order to get the response $y(t)$ I need to calculate the integral $\int_0^t{u(\tau)h(t-\tau)\,d\tau}$. From this integral I get $y(t)=t-\frac{1}{2}t^2$ for $0 \leq t \leq 1$, however this is not the complete answer and incorrect (has to be $<$ not $\leq$). So my question is how to calulate the other part of the solution? And why are the other parts not $0$ if $u(t)$ is $0$ in the integral?
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\mbox{Lets}\ \mrm{f}\pars{t} & =\int_{0}^{t}\mrm{u}\pars{\tau}\mrm{h}\pars{t - \tau}\,\dd\tau =
\int_{0}^{t}
\braces{\vphantom{\large A}\pars{1 - \tau}\bracks{0 \leq \tau \leq 1}}
\bracks{0 \leq t - \tau \leq 2}\,\dd\tau
\\[5mm] & =
\int_{0}^{t}\pars{1 - \tau}\bracks{0 \leq \tau \leq 1}
\bracks{t - 2 \leq \tau \leq t}\,\dd\tau\qquad
\pars{~\mbox{Obviously}\, \,\mrm{f}\pars{t} = 0\ \mbox{if}\ t \leq 0~}
\end{align}

Then,

\begin{align}
\left.\vphantom{\large A}\mrm{f}\pars{t}\,\right\vert_{\ t\ >\ 0} & =
\int_{0}^{t}\pars{1 - \tau}\bracks{0 \leq \tau \leq 1}
\bracks{t - 2 \leq \tau \leq t}\,\dd\tau
\\[5mm] & =
\bracks{t < 1}\int_{0}^{t}\pars{1 - \tau}\,\dd\tau +
\bracks{t > 1}\int_{0}^{1}\pars{1 - \tau}
\bracks{t - 2 \leq \tau \leq t}\,\dd\tau
\\[1cm] & =
\bracks{t < 1}\pars{t - {1 \over 2}\,t^{2}} +
\bracks{t > 1}\bracks{t - 2 < 0}\int_{0}^{1}\pars{1 - \tau}\,\dd\tau
\\[2mm] & +
\bracks{t > 1}\bracks{0 < t - 2 < 1}\int_{t - 2}^{1}\pars{1 - \tau}\,\dd\tau
\\[1cm] & =
\bracks{t < 1}\pars{t - {1 \over 2}\,t^{2}} +
\bracks{1 < t < 2}{1 \over 2} + \bracks{2 < t < 3}
\pars{{1 \over 2}\,t^{2} - 3t + {9 \over 2}}
\end{align}

$$\bbx{%
\mrm{f}\pars{t} =\int_{0}^{t}\mrm{u}\pars{\tau}\mrm{h}\pars{t - \tau}\,\dd\tau =
\left\{\begin{array}{lcl}
\ds{-\,{1 \over 2}\,t^{2} + t} & \mbox{if} & \ds{0 < t \leq 1}
\\[2mm]
\ds{1 \over 2} & \mbox{if} & \ds{1 < t \leq 2}
\\[2mm]
\ds{{1 \over 2}\,t^{2} - 3t + {9 \over 2}} & \mbox{if} & \ds{2 < t < 3}
\\[2mm]
\ds{0} && \mbox{otherwise}
\end{array}\right.}
$$

A: For t>1 Let $\tau$ =x (easier on my typing) . If x < t-1 we have h(t-x)=0.
Also u(x)=0 so for x>1 so  you need to calculate y(t)= $\int_{t-1}^1 (1-x) dx$  .I will let you do it.
