# Don't understand critical part of derivation in textbook.

1. Dec 2, 2012

### Gibby_Canes

I've been working my way through Intro to Electrodynamics (Griffiths), and in Chapter 3, one of the derivations comes out to

∫sin(n$\pi$y/a) sin(n'$\pi$y/a) dy ={ 0 if n'$\neq$n
a/2 if n'=n

where the function is integrated from 0 to a.

I assume there is some logical interpretation that allows me to reduce the answer down to just those two cases, but for the life of me I cannot figure out how. He skips over it as if it were trivial. Maybe it is supposed to be, but I didn't have any issues with all of the PDE's, so I find it frustrating that this is causing such a gap in my understanding.

If it is of any help, that answer I got is :

(an*sin($\pi$m)cos($\pi$n)-am*cos($\pi$m)sin($\pi$n)
/($\pi$(m^2-n^2))

edit: if anyone has the book, it is possible that I'm just no seeing a previous relation that simplifies this, so it may help to look

Last edited: Dec 2, 2012
2. Dec 2, 2012

### DonAntonio

$$\sin a\sin b=\frac{1}{2}\left(\cos(a-b)-\cos(a+b)\right)\Longrightarrow\int_0^a\sin\frac{n\pi y}{a}\sin\frac{n'\pi y}{a}\,dy\Longrightarrow\frac{1}{2}\int_0^a\left(\cos\left[(n-n')\frac{\pi y}{a}\right]-cos\left[(n+n')\frac{\pi y}{a}\right]\right) dy=$$

$$=\left.\frac{1}{2}\frac{a}{(n-n')\pi}\sin\left[(n-n')\frac{\pi y}{a}\right]\right|_0^a-\left.\frac{1}{2}\frac{a}{(n+n')\pi}\sin\left[(n+n')\frac{\pi y}{a}\right]\right|_0^a=0\,\,\,,\,\text{if}\,\,\,n\neq n'$$

since we get to evaluate above the function sine in integer multiples of $\,\pi\,$.

OTOH, if $\,n=n'\,$ , then we get:

$$\int_0^a\sin^2\frac{n\pi y}{a}dy=\left.\frac{a}{2\pi n}\left(\frac{n\pi y}{a}-\sin \frac{n\pi y}{a}\cos\frac{n\pi y}{a}\right)\right|_0^a=\frac{a}{2\pi n}(n\pi)=\frac{a}{2}$$

3. Dec 2, 2012

### Gibby_Canes

Ah, I see. I didn't realize that you were supposed to redo the entire integral after substituting for n' = n. I thought you were supposed to be able to infer the answer from the result of the first calculation. Thank you, the first 2/3 of your work looks very similar to mine.

kind of feel like a dufus, but I don't think I'd have ever though of that solution

4. Dec 2, 2012

### Studiot

It would have been really helpful if you had provided the full reference to Griffiths.

However I always cringe when posters bring this book up it seems to generate more than its share of queries.

I assume you are trying to proceed from equations 3.30 / 3.31 page 130.

Here is an extended derivation.

Apply the boundary condition V=1 at x=0.

$$1 = {C_1}\sin \frac{{\pi y}}{a} + {C_2}\sin \frac{{2\pi y}}{a} + {C_3}\sin \frac{{3\pi y}}{a}.........$$

This is a standard Fourier sine series which may be treated as follows

Consider the Fourier sine expansion of f(by)

$$f(by) = {a_1}\sin by + {a_2}\sin 2by + {a_3}\sin 3by...... + {a_n}\sin nby$$

Where the an are given by

$${a_{{n_n}}} = \frac{2}{\pi }\int\limits_0^\pi {f(by)\sin n(by)} d(by)$$

In this series if f(by) = 1 then

$${a_n} = \left[ {\begin{array}{*{20}{c}} {\frac{4}{{n\pi }},\;n\;odd} \\ {0,\;n\;even} \\ \end{array}} \right]$$

and

$$f(by) = 1 = \frac{4}{\pi }\left( {\sin by + \frac{1}{3}\sin 3by + \frac{1}{5}\sin 5by.....} \right)$$

Comparing this with the original series above leads to

$${C_1} = \frac{4}{\pi },\quad {C_2} = 0,\quad {C_3} = \frac{4}{{3\pi }},\quad {C_4} = 0,\quad {C_5} = \frac{4}{{5\pi }}$$

Does this help?

Last edited: Dec 2, 2012
5. Dec 2, 2012

### Gibby_Canes

It does help, though this is later in the derivation. Sorry I didn't include the full reference.

The part that was giving me grief has been dealt with. I appreciate the extra info on the Fourier bit though. I still need to get more comfortable with that.