I have some doubts about this convolution exercise. Take two functions defined as:
$$f(t) = \begin{cases} 2 ~~~~~ 0< t< 3 \\ 0 ~~~~~ \text{elsewhere} \end{cases}$$
$$g(t) = \begin{cases} 2 ~~~~~ 0< t< 1 \\ 0 ~~~~~ \text{elsewhere} \end{cases}$$
And calculate their convolution $f * g $
So by the definition
$$f * g = g * f = \int_{-\infty}^{+\infty} f(\tau) g(t-\tau) \ d\tau$$
That is
$$f * g = \int_{0}^3 2 g (t - \tau)\ d\tau$$
How should I proceed?
Mathematica gives the CORRECT result:
$$\begin{array}{cc} & \begin{array}{cc} 4 & 1<\tau \leq 3 \\ -4 (\tau -4) & 3<\tau <4 \\ 4 \tau & 0<\tau \leq 1 \\ \end{array} \\ \end{array}$$
And of course $0$ elsewhere.
Those guys only make confusion. I will answer you with a very easy method you can use with piecewise functions.
First of all you have two steps functions, which you can easily figure in your mind to be like 2 dimensional boxes of height $2$.
Think about them as two boxes, one of which has to move towards the other. Those are two signals, and the convolution is nonzero only when they do intersect. Figure it out as the following picture:
Before some obnoxious arsehole points it out: this figure does not represent your problem but it's a great help to figure it out.
The first box goes from $0$ to $1$, whilst the second one goes from $\tau -3$ to $\tau$.
In your case, you maintain the smallest step function you have, that is the $g$ and you make $f$, the larger step, to move towards the first box.
Hence you will follow several steps.
Step 1
The signals are like the above figure: separated. In this case, their convolution is simply zero which happens in the range
$$\tau - 3 > 1$$
That is
$$\tau > 4$$
Step 2
The larger box start to insinuate itself onto the smallest, hence you will have
$$\int_{\tau -3}^1 4\ d\tau = 16 - 4\tau$$
And this happens in the range
$$\begin{cases} 0 < \tau -3 \\ 1 > \tau -3 \end{cases}$$
Which means
$$3 < \tau < 4$$
Step 3
The big box is all passing through the small box, id est the smaller is totally contained into the larger. Hence
$$\int_0^1 4\ d\tau = 4$$
In the range
$$\begin{cases} 0 > \tau -3 \\ 1 > \tau \end{cases}$$
Which means
$$1 < \tau < 1$$
Step 4
Now the larger box fades away, but with a bit to it still inside the smaller box.
$$\int_0^{\tau} 4\ d\tau = 4\tau$$
Which happens in the range
$$0< \tau < 1$$
Step 5
Finally the big box goes away, and the convolution is zero again for
$$\tau < 0$$
At the end you have your result:
$$f*g = \begin{cases} 0 & \tau > 4 \\ 16 - 4\tau & 3<\tau < 4 \\ 4 & 1<\tau < 3 \\ 4\tau & 0 < \tau < 1 \\ 0 & \tau < 0 \end{cases}$$
This is a trapezoid, and if you plot it you will get
As it has to be.