I am trying to understand the steps to this solution (which outputs a function $f(t)$) but I don't understand why the integral is split for the case $-1\leq t \leq 1$ and don't understand how the sign of $-|t-\tau|$ in the exponent changes there. I understand how $1$ and $-1$ as limits got there (due to Heavyside/theta functions).
$$ \frac{1}{-4}\int_{-1}^1 e^{i\frac{\pi}{2}\tau} e^{-\lvert t-\tau\rvert}\,d\tau = \frac{1}{-4} \begin{cases} \int_{-1}^1 e^{i\frac{\pi}{2}\tau}e^{-(\tau - t)}\,d\tau, & t < -1 \\ \int_{-1}^t e^{i\frac{\pi}{2}\tau}e^{\tau - t}\,d\tau + \int_t^1 e^{i\frac{\pi}{2}\tau}e^{-(\tau - t)}\,d\tau, & -1\leq t\leq 1 \\ \int_{-1}^1 e^{i\frac{\pi}{2}\tau} e^{\tau - t}\,d\tau, & t > 1\end{cases} $$
I know that $$ -|t-\tau| = \begin{cases} -t+\tau & t>\tau \\ t-\tau & t<\tau \end{cases} $$
So I understand the sign in the exponent in case $t<-1$ and $t>1$, but I dont understand what goes on in the middle case. Could you please explain that?
In the case that $-1\leq t\leq 1$, then the interval $[-1,1]$ can be split into two parts: $[-1,t]$ and $[t,1]$. So one can split the integral into two integrals over those subintervals.
If $-1\leq\tau\leq t$, then the absolute value term in the integrand is $-\lvert t - \tau\rvert = \tau - t$. If $t\leq\tau\leq 1$, then the absolute value term is $-\lvert t - \tau\rvert = -(\tau - t)$. This agrees with the integrand in both integrals you’ve shown for that case.