Take the 2-minute tour ×

I was asked to compute the Fourier series for $\sin^2(x)$ on $[0,\pi]$. Now this is what I did and I'd like to know if I'm right. $\sin^2(x)=\frac12-\frac12\cos(2x)$ . I got the right hand side using trig identities. I'm wondering If I can do this without using the formulas. Thanks.

share|improve this question
That's a perfectly valid derivation and probably the quickest one. Alternatively, you can take inner products with the sin and cos functions with different periods to determine their coefficients in the expansion. That is the more general method. But in this particular case, what you did is the more clever way to go about it. –  Alex B. Dec 15 '10 at 6:49
To add to Alex's comment: if you go the long way and do the inner products anyway, you'll find that you'll need to convert $\sin^2(x)$ to that form you derived to do the required integrations, and you'll easily see that all the expected higher terms zero out. –  Ｊ. Ｍ. Dec 15 '10 at 9:12
add comment

4 Answers

One small point...

The way the question is stated, there may be a slight ambiguity. One way (and almost certainly the intended way) to read the question is: given the (periodic) function $\sin^2(x)$, find its Fourier series on the interval $[0, \pi]$. In this case, $(1 - \cos(2x))/2$ is correct.

However, we could also read it as follows: given the function $\sin^2(x)$ defined on the interval $[0, \pi]$, find its Fourier series. In this case, we must first decide how to extend the function to be periodic. Of course the natural choice is to extend it to equal $\sin^2(x)$ for all $x$. Again, the cosine series is correct.

But... we do have the freedom to extend $\sin^2(x)$ to an odd function on $[-\pi, \pi]$ instead, in which case the Fourier series will contain only sine functions (with the coefficients computed in the usual way). The point being that there is in fact another series, featuring only sines, that converges to $\sin^2(x)$ on the interval $[0, \pi]$. Of course, the convergence isn't as fast ;-).

share|improve this answer
+1 for thinking about alternative interpretations. Good practice. –  Ross Millikan Dec 16 '10 at 5:27
add comment

Sure. That is the Fourier series for the function.

share|improve this answer
@TLC @Alex. Thanks very much. –  Jack Dec 15 '10 at 7:16
@Jack: But how do you prove that? –  AD. Dec 15 '10 at 7:23
@AD: I'm not sure I understand your question. –  Jack Dec 15 '10 at 7:52
@Jack: How do you know this is the Fourier expansion? In general the Fourier series is an infinite series (see the above comment of Alex, later you learn about the uniqueness theorem for Fourier series). –  AD. Dec 15 '10 at 7:59
@AD. Uniqueness of the expansion follows from orthogonality of the sin and cos functions and is a general fact about orthogonal sets in inner product spaces. Concretely, take two Fourier expansions and take the inner product with some sin$(n\pi x)$. That will single out the coefficient of that particular sin in the decomposition. –  Alex B. Dec 15 '10 at 8:48
show 3 more comments


Even though the question has been answered... the Fourier expansion is:

$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left[a_n\cos(nx) + b_n\sin(nx)\right]$

which is a decomposition over the set of orthogonal trigonometric functions $\{1, \sin(kx), \cos(kx)\}, \forall k \in \mathbb{Z}$.

So, that means that really the Fourier expansion of a function is unique. And so, simply by identifying $a_0 = \frac{1}{2}$, $a_2 = -\frac{1}{2}$ and all of the other coefficients 0, we find a pairing that has the desired form of a Fourier Series, and which therefore is the Fourier expansion of $f(x)$.

share|improve this answer
You meant $b_n\sin(nx)$, no? –  Asaf Karagila Dec 15 '10 at 8:37
Yes, of course. My bad. –  Dan-George Filimon Dec 15 '10 at 9:07
Please see my answer where I explain what I mean. –  AD. Dec 15 '10 at 19:58
add comment

Regarding the uniqueness theorem for Fourier series.

I felt the obligation to say something due to all comments and the directed answer. What I meant is that it is in general one can not just say that a trigonometric expansion is a Fourier expansion, you must relay on something (for example that you have a trigonometric polynomial of basis elements, hence it is the Fourier series of the function).

If we look at $I=(0,2\pi)$, then $\Sigma=\{1,\sin(nx),\cos(nx)\}$ makes up an orthonormal basis for $L^2(I)$ (or piecewise continuous complex valued functions on $I$ below denoted by $C_p(I)$) in the sense $$(1)\qquad\langle e,f\rangle=0$$ for all $e_1,e_2\in\Sigma$ where $e_1\ne e_2$, and if $f\in L^2(I)$ (or $f\in C_p(I)$ satisfy) $$(2)\qquad \langle e,f\rangle=0$$ for all $e\in\Sigma$ then $f=0$. Here $$ \langle e,f\rangle =\frac{1}{\pi}\int_0^{2\pi}e(x)\bar{f(x)}dx.$$

The property (2) is called the uniquness of Fourier expansion for $L^2(I)$ (or $C_p(I)$) and is a cosecuence of the more general statement

Theorem. If $f\in L^1(I)$ then $\langle f,e\rangle=0$ for all $e\in\Sigma$ if and only if $f=0$.

The theorem disurves some comment even though it seams easy. Let us write $$ a_n=\frac{1}{2\pi}\int_0^{\pi}f(x)\cos(nx)dx\qquad\text{and}\qquad b_n=\frac{1}{\pi}\int_0^{2\pi}f(x)\sin(nx)dx.$$ The difficult part of the theorem is that in general we do not know if the Fourier series $\frac{a_0}{2}+\sum_k=1^\infty a_n\cos(nx)+b_n\sin(nx)$ converges to $f$, and also if it is not obvious that it is it possible to interchange integration and summation like this $$\int_0^{2\pi}f(x)\sin(kx)dx=\int_0^{2\pi}(\frac{a_0}{2}+\sum_{k=1}^\infty a_n\cos(nx)+b_n\sin(nx))\sin(kx)dx =$$ $$\qquad\sum_{k=1}^\infty \int_0^{2\pi}(a_n\cos(nx)+b_n\sin(nx))\sin(kx).$$ Also, there are convergent trigonometric series that are not Fourier series an example is (see Katznelson, Yitzhak (1976) An introduction to harmonic analysis.) $$\sum_{k=2}^\infty \frac{\sin(nx)}{\log n}$$ A way to prove the theorem is to use that $K_n*f\to f$ in $L^1$-norm where $K_n$ is a trigonometric summation kernel such as the Fejér kernel.

share|improve this answer
add comment

Your Answer

