enter image description hereenter image description hereI have to find Fourier coefficients of $x(t) = |A \cos (2 \pi f t )|$. The problem also give me $y(t) = |x(t)|$. To find Fourier coefficients I wrote

$$ \frac{1}{T_0} \int_{0}^{T_0} |A \cos (2 \pi f t )| e^{2 \pi k f t}$$

Solving this I found that $k$ should be equal to $1$ or $-1$. First I assume that $=1$ and I found the result $A/2 $ but on the book should be $2A/3\pi$. $$ T=\frac{T_0}{2} $$ Can someone help me?

  • $\begingroup$ Your formula is actually wrong. Please reconsider it and show the steps you have performed. $\endgroup$
    – Fat32
    Jan 1, 2020 at 19:22
  • 1
    $\begingroup$ the latex formula is wrong please edit that. $\endgroup$
    – Fat32
    Jan 1, 2020 at 19:39
  • $\begingroup$ I'm sorry for repeating myself but your first latex formula is wrong, and in this state it seems you don't know what you are doing or don't want to tell us about it... $\endgroup$
    – Fat32
    Jan 1, 2020 at 19:59
  • $\begingroup$ photo of math is not as good to read as is $\LaTeX$ markup. $\endgroup$ Jan 1, 2020 at 20:05
  • 1
    $\begingroup$ @ElenaMartini your Fourier transform formula is still fundamentally wrong, so let's fix that first: 1. you're missing the $\,dt$ or $\,df$, without which it's not clear which transform you want to do. 2. the $f$ in $\cos(2\pi ft)$ mustn't be the same variable you use in your $e^{j2pi ft}$; it's a constant! I recommend calling that cosine's $f$ something like $f_0$. Maybe that simplifies your calculations significantly. 3. Um, how can you already restrict the integral to $[0,T_0]$ at this point? $\endgroup$ Jan 2, 2020 at 0:08

2 Answers 2


Sketching the signal always helps in such cases. Let's consider a cosine of period $T_0$, that is, of fundamental frequency equal to $f_0=1/T_0$. That is the signal on the left.

Cosine and |Cosine|

As you can see on the right, $|A\cos(2\pi f_0 t)|$ does not share the same period with $A\cos(2\pi f_0 t)$. The period of the signal you are looking for is $T_0^{\prime}=T_0/2$ and its fundamental frequency is $f_0^{\prime} = 2f_0 = \frac{2}{T_0}$.

Assuming that you're looking for the exponential Fourier Series, the coefficients should be $$X_k = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)e^{-j2\pi kf_0^{\prime}t}dt$$ and for $k=0$, which is usually calculated seperately, it is $$X_0 = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)dt$$

Notice that you can integrate over any time interval of duration equal to $T_0^{\prime}=T_0/2$. I will pick $[-T_0/4, T_0/4]$ since the cosine is always positive in this interval and thus removing the $|\cdot|$ is trivial.

I will help with $X_0$ and you can do the $X_k$s. It is:

$$\begin{align} X_0 &= \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)dt = \frac{2}{T_0}\int_{-T_0/4}^{T_0/4}A\cos(2\pi f_0t) dt \\ &= \frac{2}{T_0}\frac{A}{2\pi f_0}\sin(2\pi f_0 t)\Big]_{-T_0/4}^{T_0/4} = \frac{2A}{2\pi f_0T_0}\Big(\sin\Big(\pi f_0\frac{T_0}{2}\Big) -\sin\Big(-\pi f_0\frac{T_0}{2}\Big)\Big) \end{align}$$

We know that $T_0 = 1/f_0 \Longrightarrow f_0T_0=1$ and that $\sin(-x)=-\sin(x)$. Simplifying:

$$\begin{align} X_0 &= \frac{A}{\pi}\Big(\sin\Big(\frac{\pi}{2}\Big) + \sin\Big(\frac{\pi}{2}\Big)\Big) = \frac{2A}{\pi} \end{align}$$

Now for the $X_k$s, I've already mentioned that you have to use $$X_k = \frac{1}{T_0^{\prime}}\int_{T_0^{\prime}}x(t)e^{-j2\pi kf_0^{\prime}t}dt$$ You can use the same interval for your integration, keep in mind that $f_0T_0=1$ to simplify your expressions, and treat $k$ as a constant until the end. Judging from your question, you should get something that includes $\frac{2A}{(2k+1)\pi}$.

  • $\begingroup$ Thank you so much ! I post a pic of what I wrote using your advices, I hope you can take a look. I promise I’ll rewrite all in latex formula ! $\endgroup$ Jan 2, 2020 at 21:22
  • 1
    $\begingroup$ Before I do take a thorough look (a first quick look shows that it's probably correct so far), there's one more thing you can use to simplify your result: Euler's identities: $$\cos(x) = \frac{1}{2}e^{jx} + \frac{1}{2}e^{-jx}$$ and $$\sin(x) = \frac{1}{2j}e^{jx} - \frac{1}{2j}e^{-jx}$$ It's like the Gospel of Fourier Analysis :) Try to simplify your last expression a bit more using these. $\endgroup$
    – GKH
    Jan 2, 2020 at 22:14
  • $\begingroup$ $$ \frac{A}{T_0} \left ( \frac{1}{\pi f_0i(1-2k)}(\frac{e^ {\pi i (1-2k)}}{2}- \frac{e^ {-\pi i (1-2k)}}{2}) -\frac{1}{\pi f_0 i (1+2k)}(\frac{-e^ {-\pi i (1+ 2k)}}{2}+\frac{e^{ki(1+2k)}}{2}) \right ) $$ $$ \frac{A}{T_0} \left ( \frac{1}{\pi f_0i(1-2k)}(\sin(\pi(1-2k))) -\frac{1}{\pi f_0 i (1+2k) } \sin(\pi(1+2k))) \right ) $$ $$ \frac{A}{\pi i } \left ( \frac{1}{(1-2k)}(\sin (\pi(1-2k))) -\frac{1}{(1+2k) } \sin(\pi(1+2k))) \right ) $$ $\endgroup$ Jan 3, 2020 at 14:40
  • 1
    $\begingroup$ First of all, it's a $+$ sign between the two terms. Second, $$\frac{1}{2}e^{ix} - \frac{1}{2}e^{-ix} = i\sin(x)$$ so the denominator $\pi i$ is just $\pi$. Finally, exponentials should be like $$e^{\pm i\frac{\pi}{2}(1\pm 2k)}$$ So, carefully check once again your solution, one line at a time. Fourier Series requires practice! :) $\endgroup$
    – GKH
    Jan 3, 2020 at 23:16
  • $\begingroup$ Thank you so so much !!!! Now I obtained the same results of my book!!now I have to do a lot of practice 🙈 $\endgroup$ Jan 6, 2020 at 14:34

If you are interested one more step into transform theory, I suggest you to go through Exponential Fourier series where the basis functions are complex exponentials, unlike sine and cosine as in Trigonometric Fourier series.

I will make an attempt to find the Fourier spectrum of $x(t) = A \cos (2\pi f_0 t)$ using Exponential FS and its properties(let me take $\omega = 2\pi f$):

$$\cos (\omega_0 t) = \dfrac{e^{j \omega_0 t}+e^{-j\omega_0 t}}{2}$$ Also it is quite easy to conceive the idea that FT of a signal that is spread over time will be concentrated in frequency domain. For e.g., $\mathcal{F}[1] = 2\pi \delta (\omega)$

Using frequency shift property of Exponential Fourier, $$\mathcal{F}[e^{j\omega_0 t}\times 1] = 2\pi \delta (\omega - \omega_0)$$ and $$ \mathcal{F}[e^{-j\omega_0 t}\times 1] = 2\pi \delta (\omega + \omega_0)$$

Therefore $$\mathcal{F}[\cos (\omega_0 t)] = \pi \delta (\omega - \omega_0) + \pi \delta (\omega + \omega_0)$$

The Fourier spectrum of this signal denoted by $X(j\omega)$ is shown in the figure below: Fourier spectrum

This figure clearly indicates that a Cosine signal possesses only one frequency component at $\omega = \omega_0$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.