1
$\begingroup$

I was trying to express the following periodic function:

$$ f(x) = \max \left( 0, \sqrt{1 - \cos{x}} - \frac{\sqrt{2}}{2} \right)$$

as a summation of cosines and sine waves $f(x) \approx a_0 + \sum^N_{n=1} a_n \cos(\frac{n \pi}{L} x) + b_n \sin(\frac{n \pi}{L}x) $.

However, I found that I couldn't even express $a_0$ in closed form and I wasn't sure why. My coefficients seem to explode to infinity. Intuitively, that seems wrong to me since the function is clearly bounded and periodic, so I would have expected its Fourier series to be well behaved. It doesn't have any discontinuities and it looks as follows:

enter image description here

further worrying me why my calculations are incorrect for its Fourier coefficients.

Anyway, first I tried the simplest first step and try to get a closed expression for $a_0$:

$$ a_0 = \frac{1}{2L} \int^{L}_{-L} f(x) dx $$

One can notice that the function has a period of $2 \pi$. Hence:

$$ a_0 = \frac{1}{2 \pi} \int^{\pi}_{-\pi}\max \left( 0, \sqrt{1 - \cos{x}} - \frac{\sqrt{2}}{2} \right) \mathrm{d}x $$

let $x_0 = \arccos \left( \frac{\sqrt{2}}{2} \right)$. So the integral becomes (due to symmetry and integrating zero):

$$ \frac{1}{\pi} \int^{\pi}_{x_0} \sqrt{1 - \cos{x}} - \frac{\sqrt{2}}{2} \, \mathrm{d}x $$

But the interesting part is integrating $\int^{\pi}_{x_0} \sqrt{1 - \cos{x}} \, \mathrm{d}x$. The indefinite integral of $\int^{\pi}_{x_0} \sqrt{1 - \cos{x}} \, \mathrm{d}x $ is (according to wolfram alpha, I believe they start of with the half angle identity):

$$\int \sqrt{1 - \cos{x}} \, \mathrm{d}x = -2 (\sqrt{ 1 - \cos x}) \cot \left( \frac{x}{2} \right) $$

so to evaluate it I proceed to do:

$$\int^{\pi}_{x_0} \sqrt{1 - \cos{x}} \, \mathrm{d}x = \left[ -2 (\sqrt{ 1 - \cos x}) \cot \left( \frac{x}{2} \right) \right]^{\pi}_{x_0}$$

$$ -2 (\sqrt{ 1 - \cos \pi}) \cot \left( \frac{\pi}{2} \right) - (-2 (\sqrt{ 1 - \cos x_0}) \cot \left( \frac{x_0}{2} \right) )$$

however the issue I am facing is that:

$$\cot \pi = \frac{1}{\tan \pi} = \frac{1}{0}.$$

So I wasn't too sure what I was doing wrong. I suspect that either I have the period of the function wrong or the integral is incorrect. However, it seems both are correct so I wasn't sure what was wrong.

I suspect the period is not incorrect because a periodic function has the property:

$$ f(x + L) = f(x)$$

and since:

$$ \cos(2 \pi + x) = \cos(x) \implies \sqrt{1 - \cos({2 \pi + x})} = \sqrt{1 - \cos(x)}.$$

So maybe this function can't be expressed as a Fourier series?

$\endgroup$
  • $\begingroup$ $\cot \frac{\pi}{2}=0.$ $\endgroup$ – Math-fun Jun 28 '15 at 19:50
  • $\begingroup$ @Math-fun yes I see duh. $\endgroup$ – Charlie Parker Jun 28 '15 at 20:01
  • $\begingroup$ You could use a little simplification: $2 \sin ^2 \frac x 2 = 1 - \cos x$, so $f(x) = \frac 1 {\sqrt 2} \max (0, 2 |\sin \frac x 2 | - 1)$. $\endgroup$ – Alex M. Jun 28 '15 at 20:07
  • $\begingroup$ Use the fact that your $f(x)$ is the same thing as $\frac{1}{2}(\sqrt{1-\cos{x}} - \frac{\sqrt{2}}{2} + |\sqrt{1-\cos{x}} - \frac{\sqrt{2}}{2}|)$, and then proceed as usual. $\endgroup$ – DaveNine Jul 2 '15 at 6:50
  • $\begingroup$ You can also expect your $b_n$'s to be zero since your function is even. $\endgroup$ – DaveNine Jul 2 '15 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.