0
$\begingroup$

We have our function: $$f(x)=|\cos x|$$ We have to find the Fourier transformation for it:

Solution: First we have to find where it is defined. I think it is defined in $[-\dfrac{\pi}{2}, \dfrac{\pi}{2}]$. If I am wrong, where is it defined and why ?

Second we have to find a0:

$\displaystyle a_0=\dfrac{1}{\dfrac{\pi}{2}}\int_{}^{}\cos x\cos0 \,dx=2$ Right?

than for b0 we have:

$\displaystyle b_0=\dfrac{1}{\dfrac{\pi}{2}}\int_{}^{}\cos x\sin 0\,dx=0$ Right?

after that we have to find an:

$\displaystyle a_n=\dfrac{1}{\dfrac{\pi}{2}}\int_{}^{}\cos x\cos n\,dx$ which turned out to be very ugly as a result => I am making a mistake somewhere

My question is what have I mistaked so far and what do I have to do after

  • 0
    Are you trying to compute the Fourier Series of $\left | \cos(x) \right |$ or the Fourier Transform of $\left | \cos(x) \right |$ ?2017-01-14
  • 0
    well I need to know both of them so, I think both of them2017-01-14
  • 0
    You can just use the sum rule for cosine to perform the general integral for $a_n$ it will turn out to be a straightforward integral to do2017-01-14
  • 0
    this is the way to solve this problem and I am not allowed to think out of the box, also this problem is from textbook so if I get some ugly things, I have probably made a mistake2017-01-14

1 Answers 1

3

where is it defined and why ?

It's defined on the interval $[13, 42]$ because I decided so. This is an arbitrary choice: you pick an interval and restrict the function $\lvert\cos x\rvert$ to it.

But usually in exercises on Fourier series the interval is $[-\pi,\pi]$ so I'd stick with that by default.

Then you should calculate the coefficients. The function is even, so all sine coefficients are zeros. For cosine coefficients, we get
$$ a_n = \frac{1}{\pi} \int_{-\pi}^\pi \lvert\cos x\rvert\cos nx\,dx = \frac{2}{\pi} \int_{0}^\pi \lvert\cos x\rvert\cos nx\,dx $$ which can be evaluated by splitting the integral at $\pi/2$, where $\cos x$ changes sign: $$ a_n = \frac{2}{\pi} \int_{0}^{\pi/2} \cos x\cos nx\,dx - \frac{2}{\pi} \int_{\pi/2}^\pi \cos x\cos nx\,dx \\ = \frac{2}{\pi}\left( \frac{\cos(\pi n/2)}{1-n^2}- \frac{\cos(\pi n/2)}{n^2-1} \right) = \frac{4}{\pi}\frac{\cos(\pi n/2)}{1-n^2} $$ except for $n=1$, when the computation goes differently, producing $$a_1 = \frac{2}{\pi}\left( \frac{\pi}{4} + \frac{\pi}{4}\right) = 1$$