This is my time domain function. I am asked to find the Fourier Transform and calculate the value when omega is zero. (I am using $X(\omega)$ notation for the Fourier Transform of x(t)).
\begin{align*} X(\omega) &= \int_{-1}^3 x(t) e^{-i\omega t}\, \mathrm{d}t \\ &= \int_{-1}^0 x(t) e^{-i\omega t}\, \mathrm{d}t + \int_{0}^1 x(t) e^{-i\omega t}\, \mathrm{d}t + \int_1^2 x(t) e^{-i\omega t}\, \mathrm{d}t + \int_2^3 x(t) e^{-i\omega t}\, \mathrm{d}t \\ &= \int_{-1}^0 2e^{-i\omega t}\, \mathrm{d}t + \int_{0}^1 (2 - t)e^{-i\omega t}\, \mathrm{d}t + \int_1^2 te^{-i\omega t}\, \mathrm{d}t + \int_2^3 2 e^{-i\omega t}\, \mathrm{d}t, \end{align*}
\begin{align*} X(\omega)=\frac{1+e^{-2i\omega}-2i\omega e^{j\omega}+2i\omega e^{-3i\omega}-2e^{-i\omega}}{\omega^2} \end{align*}
But after substitute $\omega=0$, the whole thing below up. Is my calculation right?
Thank you!

if fourier transform of $x(t)$ is $X(\omega)$
then,
we know ,
area under curve of signal $x(t) $ = value of fourier transform at $\omega =0 $
i.e,
$\implies \displaystyle \int_{-\infty}^{+\infty}x(t) dt= X(0)$
$\implies X(0)=2.\left(2+\dfrac{3}{2}\right)=5 $
there is one other similar property one should know ,
area under of curve of $X(\omega)= 2\pi \times x(0)$ i.e,
$\displaystyle \int_{-\infty}^{\infty}X(\omega) d\omega=2\pi. x(0)$
for this question of yours
area under curve of $X(\omega)= 2\pi . 2= 4\pi$
that extra factor of $2\pi $ is due to definition of Inverse Fourier transform