2

I'm trying to find the complex fourier coefficient of cos(ax) with $a \in \mathbb{Z}$

The formula is given by

$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi f(x) \cdot e^{-inx} \, dx $$

I know that I can write cos(ax) as

$$\frac{e^{iax} - e^{-iax}}{2}$$

This gives me

$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi \frac{e^{iax} - e^{-iax}}{2} \cdot e^{-inx} \, dx $$

$$c_n = \frac{1}{2} \cdot \pi \int_{\pi}^\pi \frac{e^{iax - inx} - e^{-iax -inx}}{2} \, dx $$

Antidervivative with $\pi$ yields: $$ \frac{\pi}{4} \cdot \left(\frac{e^{ia\pi - in\pi}}{ (ia-in)} - \frac{e^{-ia\pi -in\pi}}{(-ia-in)}\right) $$

Antidervivative with -$\pi$ yields: $$ \frac{\pi}{4} \cdot \left(\frac{e^{-ia\pi + in\pi}}{ (ia-in)} - \frac{e^{ia\pi +in\pi}}{(-ia-in)} \right) $$

How can I simplify this any further?

GEdgar
  • 111,679

2 Answers2

3

For further simplification, note that $e^{i n \pi} = (-1)^n$.

GEdgar
  • 111,679
3

If you are in $L^2([-\pi,\pi],2\pi)$ with inner product $$(f,g)=\frac{1}{2\pi}\int_{-\pi}^{\pi}\overline{f(x)}\cdot g(x)dx$$ remember that $\exp(ikx)=\cos(kx)+i\sin(kx)$, so the basis $\{\exp(ikx)\}_{k\in\mathbb Z}$ is equivalent to the basis $\left\{\dfrac{1}{\sqrt2},\cos(kx),\sin(kx)\right\}_{k\ge 1}$ and you have the relations $$(\cos(kx),\sin(mx))=0\\(\cos(kx),\cos(mx))=\delta_{km}\\(\sin(kx),\sin(mx))=\delta_{km}.$$ Instead of $L^2([-\pi,\pi],w(x)=1/2\pi)$ you can consider $L^2[-\pi,\pi]$ with the normalized basis $\left\{\dfrac{\exp(ikx)}{\sqrt{2\pi}}\right\}_{k\in\mathbb Z}$ or equivalently $\left\{\dfrac{1}{\sqrt{2\pi}},\dfrac{\cos(kx)}{\sqrt{\pi}},\dfrac{\sin(kx)}{\sqrt{\pi}}\right\}_{k\ge 1}$.

Vajra
  • 2,725