$$ x(t):=\begin{cases} 1&\text{if $0<t<T$}\\ \\ 0&\text{if otherwise} \end{cases} \qquad\text{and}\qquad h(t):=\begin{cases} t&\text{if $0<t<2T$}\\ \\ 0&\text{if otherwise} \end{cases} $$ Compute $(x*h)(t)$.
My approach: We first note that :$$\displaystyle x(\tau)=\begin{cases} 1&\text{if $0<\tau<T$}\\ \\ 0&\text{if otherwise} \end{cases}\qquad\text{and}\qquad\displaystyle h(t-\tau)=\begin{cases} t-\tau&\text{if $0<t-\tau<2T$}\\ \\ 0&\text{if otherwise} \end{cases}$$ We observe that : $$ 0<\tau<T $$ $$ t-2T<\tau<t $$ Thus, $(x*h)(t)\in\mathcal{R}[\max(0,t-2T),\min(t,T)]$ (i.e. Riemann integrable). Therefore : \begin{align*} (x*h)(t)&:=\int_{-\infty}^{\infty}x(\tau)h(t-\tau)\;\text{d}\tau\\ &=\int_{\max(0,t-2T)}^{\min(t,T)}t-\tau\;\text{d}\tau\\ &=\left. t\tau-\frac{\tau^{2}}{2}\right|_{\max(0,t-2T)}^{\min(t,T)}\\ &=\left[t\min(t,T)-\frac{\min^{2}(t,T)}{2}\right]-\left[t\max(0,t-2T)-\frac{\max^{2}(0,t-2T)}{2}\right]\\ &=t[\min(t,T)-\max(0,t-2T)]-\frac{1}{2}[\text{min}^{2}(t,T)-\text{max}^{2}(0,t-2T)] \end{align*}
Problem: I want to further solve this to obtain the final solution as a piecewise function (if it has such form)
I present to you the MATLAB simulation of the convolution
First one corresponds to $T=1$ and the second one corresponds to $T=2$. Here is the algorithm used:
t = linspace(0,10,1000); % assume a time span for "t"
T=1;
m = min(t,T); % find min of (t-1 , 5) for each "t"
M = max(0,t-2*T); % find max of (t-3 , 3) for each "t"
vind = M < m; % find "valid" range of "t"
y = t.*(m-M)-0.5*(m.^2-M.^2);% EVALUATE the CONVOLUTION
y = y.*vind; % force non-valid range to zero.
figure,plot(t,y); % DISPLAY:
title('convolution is :');
Credits to $\text{@Fat32}$ for the code in his answer in the link provided in the comment