I've been reading these notes about the Fourier transform of Heaviside function, but I don't fully understand the derivation right after formula (5) - why does it hold only for $t>0$? The author mentions it is due to step **, but as I understand it
$$ \int_a^b f(x) dx = \left[\begin{matrix}u=-x\\f(x) = f(-u) \\ dx = -du\end{matrix} \right] = - \int_{-a}^{-b}f(-u)du = \int_{-b}^{-a}f(-u)du.$$
So the expression in the notes would be
$$ \int_{-\infty}^0 \frac{e^{i\omega t}}{\omega} d\omega= -\int_0^\infty \frac{e^{-iu t}}{u} du $$
which holds $\forall t \in \mathbb{R}$, and integration variable $u$ can be renamed back to $\omega$.
What am I missing?
The negative sign does not come from step **. It comes from the last step
$$\frac{1}{\pi}\int_0^{\infty}\frac{\sin \omega t}{\omega}\, d\omega$$
When you solve this integral using change of variable, it depends on the sign of $t$ to make the upper limit $\infty$ or $-\infty$.