0

In our textbook the given example-question is as follows (written in bold):

Find a fourier series to represent $x-x^2$ from $x= -\pi$ to $x= \pi$

But the function given $x-x^2$ is non periodic, what does it mean to have a fourier series for it, and why fourier series have a interval associated with it?

Any help is appreciated.... Thank you in advance.

DominikS
  • 2,585
  • 1
    Consider a periodic function $f$ with period length of $2\pi$. Then it is sufficient to define it on $[-\pi, \pi]$ (or any other interval of that length). In your case, $f(x)=x-x^2$ on $[-\pi, \pi]$ (this restriction is crucial). Outside, it is repeated periodically. – DominikS Dec 04 '23 at 10:50
  • 1
    Regarding your other question "Why do F-series have an interval associated with them?": This is part of the definition of Fourier-series, and should be contained in your textbook. – DominikS Dec 04 '23 at 11:12

2 Answers2

0

You can find the Fourier series of a function $f$ defined on a closed interval $[a,b]$ where $f(a) = f(b)$. Just use the definition that you have learned in class or in your book, and take the period length $b - a$. You can view this as extending the function periodically outside of $[a,b]$, or you can view the function as defined on the interval $[a,b]$ with the end points glued together.

This works also in many cases when the function so constructed is not continuous, as in your case when $f(x) = x - x^2$ does not satisfy $f(-π) = f(π)$. Just plug the values at the end points into the integral and it will work nicely.

  • The function is continuous, but the problem is it is not periodic. So is fourier series on it still valid? – Sourjya Bose Dec 04 '23 at 15:25
  • The function is not continuous when defined on the space $[-π,π]$ where we identify $-π$ and $π$. As one approaches this point from above, the function value approaches $-π - π^2$, while when one approaches this point from below it grows close to $π - π^2$. Periodicity is automatic (or indeed equivalent) when the function is defined on a closed interval with the end points identified. – Aksel Bergfeldt Dec 04 '23 at 15:32
  • I know I am being stupid here but, I dont get this :Periodicity is automatic (or indeed equivalent) when the function is defined on a closed interval with the end points identified. Could you please explain this with an elaborate example. – Sourjya Bose Dec 04 '23 at 15:40
  • The discontinuity is also evident if one uses the viewpoint that the function should be extended periodically with period $b - a$, that is $π - (-π) = 2π$. Again, when one approaches $π$ from below the function value approaches $π - π^2$, while when we approach $π$ from above the function value grows close to $-π - π^2$. When we approach from above, we must in this case use the periodicity property that $f(x) = f(x - 2π)$. – Aksel Bergfeldt Dec 04 '23 at 15:40
  • You are not being stupid - I am using very few words to explain this. What I meant is that if one glues the domain in the end points, the function becomes periodic in a sense, because we can keep going in a circle in the domain. Take the interval $[-π, π]$, bend it and connect $-π$ with $π$! – Aksel Bergfeldt Dec 04 '23 at 15:42
  • Thank you very much sir – Sourjya Bose Dec 04 '23 at 15:45
  • You are welcome! And yes, the Fourier series is amazingly still valid, meaning that it will converge to the same function everywhere except for the point of discontinuity. – Aksel Bergfeldt Dec 04 '23 at 15:54
0

For representing a non-periodic function on the interval $[-L,L]$, we use \begin{equation*} f(x)=k_1+\frac{k_2x}{L}+\sum_{n=1}^{\infty} \left(A_n\cos\frac{n\pi x}{L}+B_n\sin\frac{n\pi x}{L}\right). \end{equation*} By evaluating the above series at $x=-L,L$, we get \begin{equation*} k_2=\frac{f(L)-f(-L)}{2}. \end{equation*} Let \begin{equation*} \tilde{f}(x)=f(x)-\frac{k_2x}{L}. \end{equation*} Then using the orthogonality of the sine and cosine functions, we get \begin{align*} k_1&=\frac{1}{2L}\int_{-L}^L \tilde{f}(\hat{x})\,d\hat{x}, \\ A_n&=\frac{1}{L}\int_{-L}^L \tilde{f}(\hat{x})\cos\frac{n\pi\hat{x}}{L}\,d\hat{x}, \\ B_n&=\frac{1}{L}\int_{-L}^L \tilde{f}(\hat{x})\sin\frac{n\pi\hat{x}}{L}\,d\hat{x}. \end{align*} For your function $x-x^2$, and with $L=\pi$, we get \begin{equation*} x-x^2=x-\frac{\pi^2}{3}+\sum_{n=1}^{\infty}\frac{4(-1)^{n+1}\cos(nx)}{n^2}. \end{equation*}

For why the $x$ term should be present while representing non-periodic functions, see https://www.awesomemath.org/wp-pdf-files/math-reflections/mr-2022-03/mr_3_2022_fourier.pdf.

In your function, since an `$x$' was present, it again appears on the right hand side also.

Note that the above series is valid over the entire range $[-\pi,\pi]$ (no Gibb's phenomenon!). By substituting special values of $x$, you can get interesting identities. For example, for $x=0$ and for $x=\pi$, we get \begin{align*} &\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^2}=\frac{\pi^2}{12}, \\ &\sum_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6}, \end{align*} the latter of which is the solution to the Basel problem!

Jog
  • 804