I have this function $x(t)=\left|\frac{t}{T}\right|rect(\frac{t}{2T})$
The book states that given the function x(t) is piecewise linear, we can use the Fourier theorem to calculate X(f). They get the first derivative s(t) of the signal x(t) (see figure b below), which is:
$s(t)=\delta(t+T)-\delta(t-T)-\frac{1}{T}rect(\frac{t+\frac{T}{2}}{T})+\frac{1}{T}rect(\frac{t-\frac{T}{2}}{T})$
and from s(t) they obtain its transform S(t) pretty easily.
I understand "graphically speaking" that doing the derivative of x(t) you get:
$-\frac{1}{T}rect(\frac{t+\frac{T}{2}}{T})$ when t<0 and $\frac{1}{T}rect(\frac{t-\frac{T}{2}}{T})$ when t>0
hence I would expect s(t) to simply be
$s(t)=-\frac{1}{T}rect(\frac{t+\frac{T}{2}}{T})+\frac{1}{T}rect(\frac{t-\frac{T}{2}}{T})$
but I'm evidently missing something.
Where do $\delta(t+T)-\delta(t-T)$ come from?
For completeness the transform of s(t) is:
$S(f)=e^{j2\pi fT}-e^{-j2\pi fT}-\frac{1}{T}Tsinc(fT)e^{j\pi fT}+\frac{1}{T}Tsinc(fT)e^{-j\pi fT}=2j*sin(2\pi fT)-2j*sinc(fT)sin(\pi fT)$