# What is the Fourier transform of a multiplied cosine signal with rect?

I tried to find the Fourier transform for this signal, but I have some doubt about the result:

$$g(t) = \cos\left(\pi\Delta{f}t\right) \text{rect}\left(\frac{t-\frac T2}{T}\right)$$

My calculation is:

$$\bigg \lvert G(f) \bigg \rvert = \frac{1}{\pi}\bigg(\frac{2f\sin(\pi Tf)\cos(\pi T\Delta f/2)-\Delta f\cos(\pi Tf)\sin(\pi T\Delta f /2)}{4f^2-\Delta f^2}\bigg)$$

Could you please tell me is there any coeff. of $T$ at amplitude of the final result?

• so, what is your result that you have doubts about? This reads like you're trying to use us to cheat on your homework :) – Marcus Müller Nov 5 '16 at 15:31
• much better now! – Marcus Müller Nov 5 '16 at 15:38
• @MarcusMüller, before prejudgment, try to be sure about correctness of your info! – Amin Nov 5 '16 at 15:38
• Why don't you add the steps that lead to that result, so we can see if and where you went wrong. What you basically ask is that we should solve the problem and tell you the solution. What if you check your own calculations (which we can't do because we don't see them)? Who tells you that we wouldn't make the same mistake (or others)? – Matt L. Nov 5 '16 at 16:20
• It is often useful to have a "back of the envelope" or intuitive expectation of what the answer should look like. Here, from Fourier transform pair tables, you know what the FT of the rect looks like. From the modulation theorem, you know what happens to a signal's spectrum when it is multiplied by a cosine. In this way, you have a mental image of what the answer should look like. – MBaz Nov 5 '16 at 16:35

I think the only point in answering such overly specific questions is to give a more general view of how to approach such basic problems. So this is what I'll try to do here.

First of all, one should be able to recognize that the given signal can be viewed as an amplitude modulated rectangular signal. One should also know that a rectangular function in one domain of the Fourier transform is a sinc-function in the other domain. So from a first glance we should be able to tell that the resulting spectrum is composed of two sinc-functions, one shifted to the positive and the other to the negative frequency of the cosine. Finally, it should be observed that the frequency of the cosine is $\Delta f/2$ (not $\Delta f$). So we have two sinc-functions centered at $\pm\Delta f/2$. I strongly believe that such a qualitative analysis should always be done before trying to solve the problem in more detail.

Another global check reveals that the given result cannot be correct because it is real-valued. The true result cannot be real-valued since the given time-domain signal is not symmetric.

[EDIT: after I wrote this answer, the formula in the question was changed from $G(f)=\ldots$ to $|G(f)|=\ldots$. Now it's of course OK for the result to be real-valued, but note that it can still become negative, which it shouldn't if it were a valid expression for the magnitude of the Fourier transform.]

After all these sanity checks we might be interested in knowing the exact expression of the transform. This should be possible even without consulting a Fourier transform table. Since from the qualitative analysis we already know what the spectrum looks like, we only need to find the Fourier transform of the rectangular pulse, and then shift it appropriately. The Fourier relation $\text{rect}\Longleftrightarrow\text{sinc}$ is a very basic transform pair, and I think any DSP student or engineer should be able to get it right, including all necessary constants. One easy way to remember the correct relation is to memorize that a centered rectangular pulse of width $W$ and height $1$ in one domain corresponds to $W$ times a $\text{sinc}$-function with argument $W\cdot\text{variable}$ in the other domain, where "variable" is either $t$ or $f$:

\begin{align}\text{rect}(t/T)&\Longleftrightarrow T\,\text{sinc}(Tf)\\\text{rect}(f/B)&\Longleftrightarrow B\,\text{sinc}(Bt)\end{align}\tag{1}

where we need to use the definition $\text{sinc}(x)=\sin(\pi x)/(\pi x)$ (instead of the other common definition $\text{sinc}(x)=\sin(x)/ x$). Note that the relation $(1)$ is totally symmetric with respect to time and frequency, which is one advantage of using $f$ here instead of $\omega=2\pi f$.

Knowing $(1)$, we can immediately write down the transform of the given rectangular pulse:

$$\text{rect}\left(\frac{t-T/2}{T}\right)\Longleftrightarrow T\,\text{sinc}(Tf)e^{-j\pi Tf}\tag{2}$$

where the phase factor in $(2)$ comes from the shift by $T/2$.

From $(2)$ the final result is easily obtained by remembering the shifting property of the cosine (and the factor $\frac12$ that it introduces):

$$G(f)=\frac{Te^{-j\pi Tf}}{2}\left[\text{sinc}\left(T\left(f-\frac{\Delta f}{2}\right)\right)e^{j\pi T\Delta f/2}+\ldots\\\text{sinc}\left(T\left(f+\frac{\Delta f}{2}\right)\right)e^{-j\pi T\Delta f/2}\right]\tag{3}$$

I leave any final cosmetic operations on this result up to you.