1

Consider the function $f \in C_{st}$ which on the interval $-]\pi, \pi[$ is equal to the fucntion $x \mapsto x \cos(x)$. Then I have to find the Fourier coefficient $c_1$. I have tried to calculate it by using the indentity $cos(x) = \frac{e^{ix}-e^{-ix}}{2}$ and integration by parts $\int_a^b f(x)g(x) = \left[f(x)G(x)\right]_a^b - \int_a^b f'(x)G(x) dx$ to have that

\begin{align*} c_1 & = \frac{1}{2 \pi} \int_{- \pi}^{\pi} x \cos(x) e^{-ix} dx \\ & = \frac{1}{4 \pi} \int_{-\pi}^{\pi} x(1-e^{-2ix} dx \\ & = \frac{1}{4 \pi} \left( \left[x(x-\frac{1}{2}ie^{-2ix}) \right]_{x=-\pi}^{\pi} - \left[x-\frac{1}{2}ie^{-2ix} \right]_{x=-\pi}^{\pi} \right) \\ & = \frac{1}{4\pi} \left( \pi(\pi - \frac{1}{2}ie^{-2i\pi}) + \pi (-\pi - \frac{1}{2}ie^{2\pi}) -\left(\pi -\:\frac{1}{2}ie^{-2i\pi }-\left(-\pi -\frac{1}{2}ie^{2\pi }\right)\right)\right) \\ & = \frac{1}{4 \pi} \left( \pi^2 - \frac{1}{2}i\pi - \pi^2 - \frac{1}{2}i\pi -2\pi \right) \\ & = -\frac{i}{4} - \frac{1}{2} \end{align*} which does not give the right answer as I know th answer is just $-i/4$ where am I doing wrong?

Mathias
  • 917
  • 2
    $\cos{x}=\frac{1}{2}(e^{ix}+e^{-ix})$ – Paul May 15 '20 at 18:37
  • Oh. Is that where it just goes wrong? – Mathias May 15 '20 at 18:38
  • 1
    I don't know if that's the only mistake, but it's certainly an issue. – Paul May 15 '20 at 18:39
  • This is practically a duplicate of a question that was asked earlier today. – Prime Mover May 15 '20 at 18:49
  • I tried using $cos(x) = 1/2(e^{ix}+e^{-ix})$ but still dont get the right answer. Can anyone calculate it for me so I can see where it goes wrong. I really have no idea .. – Mathias May 15 '20 at 19:04
  • I managed to calculate it. Nvm. Thanks for helping though. – Mathias May 15 '20 at 19:36
  • So you caught the simplification error you made in $$\left(\pi -:\frac{1}{2}ie^{-2i\pi }-\left(-\pi -\frac{1}{2}ie^{2i\pi }\right)\right)?$$ Good. It would have been easier if you'd distributed $x$ earlier and broke up the integral:$$\int_{-\pi}^\pi x(1-e^{-2ix}),dx = \int_{-\pi}^\pi x, dx - \int_{-\pi}^\pi xe^{-2ix},dx$$ The first integral is easily $0$, and the second is a little simpler to do integrations by parts. – Paul Sinclair May 16 '20 at 03:03

0 Answers0