I was doing some problems for practice and I came across this:
$$f(t) = \cos(\omega_0t) \left[H\left(t+\frac{T}{2}\right) - H\left(t- \frac{T}{2}\right)\right]$$ where $H(t)$ is the Heaviside/ unit step function
I have not seen anything like this before and not even sure how I would even start on this?
I attempted to find the Fourier transform using the equation as normal but it's not going anywhere.
Where would you even start on this?
Let's define the Fourier transform of $f$ as $$\mathcal F\{f(t)\}=F(\omega )=\int _{-\infty }^{\infty }f(t)e^{-i\omega t}\mathrm dt$$
and observe that the Fourier transform of a product of functions is the convolution of the Fourier transform of the functions $\mathcal F\{f(t)\cdot g(t)\}=F(\omega)*G(\omega)$.
Observing that using the rect function, we have $$ \mathrm{rect}\left(\frac{t}{T}\right)=H\left(t+\frac{T}{2}\right) - H\left(t- \frac{T}{2}\right) $$ and $$ f(t)=\cos(\omega_0 t)\cdot \mathrm{rect}\left(\frac{t}{T}\right) $$ So we have $$ \mathcal F\left\{ f(t)\right\}=\mathcal F\left\{ \cos(\omega_0 t)\cdot \mathrm{rect}\left(\frac{t}{T}\right)\right\}=\mathcal F\left\{ \cos(\omega_0 t)\right\}*\mathcal F\left\{ \mathrm{rect}\left(\frac{t}{T}\right)\right\} $$ Observing that $$\mathcal F\left\{ \cos(\omega_0 t)\right\}= \pi\left[\delta(\omega-\omega_0)+\delta(\omega+\omega_0)\right]$$ and $$ \mathcal F\left\{ \mathrm{rect}\left(\frac{t}{T}\right)\right\}=T\cdot\mathrm{sinc}\left(\frac{\omega}{2\pi/T}\right) $$ we have $$ F(\omega)=\pi T\left[\mathrm{sinc}\left(\frac{\omega-\omega_0}{2\pi/T}\right)+\mathrm{sinc}\left(\frac{\omega+\omega_0}{2\pi/T}\right)\right] $$