Solution
Folding \(h\left ( \tau \right ) \) to becomes \(h\left ( -\tau \right ) \). Therefore, when \(1+t<-1\) or \(t<-2\), then \(y\left ( t\right ) =0\) since there is no overlap.
When \(-1<1+t<1\), or \(-2<t<0\), then there is partial overlap. In this case\begin{align*} y\left ( t\right ) & =\int _{-1}^{1+t}\cos \left ( \pi \tau \right ) d\tau \qquad -2<t<0\\ & =\frac{1}{\pi }\left [ \sin \left ( \pi \tau \right ) \right ] _{-1}^{1+t}\\ & =\frac{1}{\pi }\left [ \sin \left ( \pi \left ( 1+t\right ) \right ) -\sin \left ( -\pi \right ) \right ] \\ & =\frac{1}{\pi }\sin \left ( \pi \left ( 1+t\right ) \right ) \end{align*}
When \(1<1+t<3\), or \(0<t<2\), then there is partial overlap. In this case\begin{align*} y\left ( t\right ) & =\int _{t-1}^{1}\cos \left ( \pi \tau \right ) d\tau \qquad 0<t<2\\ & =\frac{1}{\pi }\left [ \sin \left ( \pi \tau \right ) \right ] _{t-1}^{1}\\ & =\frac{1}{\pi }\left [ \sin \left ( \pi \right ) -\sin \left ( \pi \left ( t-1\right ) \right ) \right ] \\ & =\frac{-1}{\pi }\sin \left ( \pi \left ( t-1\right ) \right ) \end{align*}
When \(3<1+t\) or \(t>2\) then \(y\left ( t\right ) =0\) since there is no overlap any more. Hence solution is\[ y\left ( t\right ) =\left \{ \begin{array} [c]{ccc}0 & & t\leq -2\\ \frac{1}{\pi }\sin \left ( \pi \left ( 1+t\right ) \right ) & & -2<t\leq 0\\ \frac{-1}{\pi }\sin \left ( \pi \left ( t-1\right ) \right ) & & 0<t\leq 2\\ 0 & & t>2 \end{array} \right . \] The following is a plot of \(y\left ( t\right ) \)