In my textbook (Introduction to Electrodynamics, D. Griffiths), we derive the equation for some strange potential function. Eventually, we get to this (for $n \in \mathbb{Z}^+$):

$$ V_0(y) = \sum_{n=0}^{\infty} C_n\sin{\frac{n\pi}{a}y} \tag{3.31}$$

Here's where things go awry for me.

... how do we actually determine the coefficients $C_n$, buried as they are in that infinite sum? The device for accomplishing this is so lovely it deserves a name—I call it Fourier's trick, though it seems Euler had used essentially the same idea somewhat earlier. Here's how it goes: Multiply Eq. 3.31 by $\sin{n'\pi y/a}$ (where $n'$ is a positive integer), and integrate from 0 to a:

$$ \displaystyle \sum_{n=0}^{\infty} C_n \int_0^a\sin{\frac{n\pi}{a}y} \sin{\frac{n'\pi}{a}y} dy ~~~=~~~ \int_0^a V_0(y)\sin{\frac{n'\pi}{a}y} dy$$

The answer understandably comes out to something very nice and convenient. But... why is this something you can do? There's no obvious reason for why that doesn't intrinsically change the problem (in the same way that I can say "Multiply both sides by $0$. You've successfully reduced the problem to zero. Well done!)

(While typing out the above, I suspect that it has something to do with the inner product of a function and an orthonormal basis? The infinite $\sin$ functions create an orthonormal basis, and taking that integral over all possible values effectively extracts the coefficients for each basis function. When it is suggested that we multiply by $\sin{\frac{n'\pi}{a}y}$ and integrate, this isn't changing the basis at all, it's just (sneakily) extracting the coefficients, which only exist when $n = n'$ (because the $\sin$ functions are all orthogonal). It's like taking the coefficients of a basis with itself... right?

I think this may be one of those cases where, in the process of asking the question, I figure out the answer—but this is all fairly new to me, and I'd like to ask it anyway for confirmation and, possibly, a clearer explanation).

  • 4
    $\begingroup$ Multiplying both sides of an equation by $0$ is perfectly valid, but the resulting equation $0 = 0$ isn't helpful. With Fourier's trick, we multiply both sides by something non-zero, then integrate both sides, and obtain a result which is helpful. $\endgroup$
    – littleO
    Mar 9, 2014 at 9:15
  • $\begingroup$ I know you can do whatever you want to both sides of an equation, but you're still multiplying a lot of the terms by zero here (which is why so many of them drop out). There are a lot of $C_n$ terms there (infinite); the part about orthogonal basis was meant to explain why you're not losing any information when you multiply those terms by zero. Is it an accurate explanation? $\endgroup$ Mar 9, 2014 at 9:21
  • 1
    $\begingroup$ @AmagicalFishy you are not multiplying by zero , the function which you are multiplying when integrated makes all but one term zero. $\endgroup$
    – happymath
    Mar 9, 2014 at 9:22
  • 1
    $\begingroup$ I know what the function does—but I still don't understand why this is considered "not multiplying by zero". It just seems like a neat way of selectively multiplying by zero. $\endgroup$ Mar 9, 2014 at 9:26
  • 2
    $\begingroup$ What do you mean when you say we're multiplying "a lot" of the terms by zero? All the terms are getting multiplied by the same thing. Then, we integrate, and it turns out that all but one of the integrals on the left are equal to $0$. $\endgroup$
    – littleO
    Mar 9, 2014 at 9:28

2 Answers 2


It might help to break this up into smaller steps.

\begin{align*} &V_0(y) = \sum_{n=1}^{\infty} C_n \sin \left(\frac{n \pi y}{a} \right) \\ \implies & V_0(y) \sin \left(\frac{n' \pi y}{a} \right) = \sum_{n=1}^{\infty} C_n \sin \left(\frac{n \pi y}{a} \right)\sin \left(\frac{n' \pi y}{a} \right) \\ \implies & \int_0^a V_0(y) \sin \left(\frac{n' \pi y}{a} \right) \, dy = \sum_{n=1}^{\infty} C_n \int_0^a \sin \left(\frac{n \pi y}{a} \right)\sin \left(\frac{n' \pi y}{a} \right) \, dy = \frac{a}{2} C_{n'}. \end{align*}

We now solve for $C_{n'}$ to obtain \begin{equation*} C_{n'} = \frac{2}{a} \int_0^a V_0(y) \sin \left(\frac{n' \pi y}{a} \right) \, dy. \end{equation*}


Your suspicion about inner product is entirely correct. The trigonometic polynomials $\{\sin(nx), \cos(mx)\}$ (possibly translated and scaled) are known to form an orthogonal system with respect to the scalar product given by $\langle f, g\rangle:=\int fg$, and if you choose the function space correctly (usually one uses a space called $L^2$) and use properly chosen norming factors then one can show they actally form a complete orthonormal system $e_k$, which simply means you can express any function in that space as $$ f = \sum_k\langle f, e_k \rangle e_k$$ (where convergence is to be understood in that space wrt the norm derived from the scalar product). The coefficients in that sum are what you are looking at. You may know that kind of representation from the finite dimensional case.

I deliberately did not specify the constants which make the orthogonal system orthonormal, nor an interval as domain of definition -- by translation and scaling you can do something like that on any bounded interval in $\mathbb{R}$ There is also a complex version of this, in which case one would use the scalar product $\int f\bar{g}$, and $\{e^{ikx}\}$ as orthogonal system.

If you want to look up the details, then most introductions to real analysis will have a section on that topic. Rudin's books, for example do explain this.

  • $\begingroup$ Awesome! I will do that (look up the details, that is). Thanks very much. $\endgroup$ Mar 9, 2014 at 18:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.