2
$\begingroup$

I have been studying Griffith's Intro to Electrodynamics. I am studying differential equations and Fourier series. I am studying the problem discussed here: Why is this allowed? ("Fourier's Trick"; finding the coefficients in a Fourier Series).

I have tried to compute the integral with the two sine functions a number of times using different methods (integration by parts, Euler's method, trig identities) but I always get $0$ instead of:

  • $0$ if $n$ not equal to $n'$

  • $\frac{a}{2}$ for $n = n'$

Can someone please show me how to evaluate this integral correctly. It's driving me crazy.

$\endgroup$
  • $\begingroup$ As far as I remember, this calculation is shown in the book, no? If so, perhaps you could point out which step you didn't understand. Sorry if I remember incorrectly. $\endgroup$ – Bobson Dugnutt Feb 11 '16 at 22:11
  • $\begingroup$ The actual integral is left for the reader to do; he just shows the answer. I'm having issues when I actually compute ∫sin(npiy/a)sin(n'piy/a)dy. No matter what I do all the terms end up vanishing and the integral ends up being zero. $\endgroup$ – user2216571 Feb 11 '16 at 22:19
  • $\begingroup$ The integral can be performed most easily by using Euler's formula: $sin(x) = [exp(ix)-exp(-ix)]/(2i)$. $\endgroup$ – M. Wind Feb 11 '16 at 23:33
  • $\begingroup$ I tried using Euler's formula and got 0 at all times. Do you think you could show the computation here so I can see if I got anything wrong? $\endgroup$ – user2216571 Feb 12 '16 at 0:23
0
$\begingroup$

Edited massively to provide a full answer:

The integration in question is $$S=\int_0^a \sin (n \pi x/a) \sin(n' \pi x/a) dx$$ (taken from p. 134 the Int. 4th ed. of Griffiths' EM)

First use the trigonometric identity $\sin(A)\sin(B)=\frac{1}{2}[\cos (A-B)-\cos(A+B)]$ to get $$S=\frac{1}{2} \int_0^a \cos \left( \frac{n-n'}{a} \pi x \right)-\cos \left( \frac{n+n'}{a} \pi x \right) dx$$

This, when evaluated in the case of $n \not = n'$, gives $$S_{n \not =n'} = \frac{a}{2\pi(n'-n)} \sin ((n'-n)\pi) - \frac{a}{2\pi(n'+n)} \sin ((n'+n)\pi)$$

But since $\sin(k\pi)=0$ for any $k \in \mathbb{N}$, these terms vanish, so $S_{n \not =n'}=0$.

In the case of $n =n'$, the first term in the integral with the $\cos$'s is $1$, so the integral, when evaluated is $$S_{n =n'}=\frac{a}{2}-\frac{a}{2\pi(n'+n)} \sin ((n'+n)\pi)$$ but for the same reasons as before, the sine vanishes, and we're left with the desired $S_{n =n'}=\frac{a}{2}$.

More generally speaking, one could also argue that sines of this sort where the factors in the argument $n \not = n'$ are being integrated over must give $0$ because they form a complete basis and are therefore mutually orthogonal... but that's linear algebra and is perhaps better suited for another question.

$\endgroup$
  • $\begingroup$ This is the particle in the box if I'm not mistaken. I guess I am having trouble understanding the other case where m=n and at the end one would have a denominator equal to 0. I hope you see what I mean. $\endgroup$ – user2216571 Feb 11 '16 at 23:00
  • $\begingroup$ @user2216571 As far as I remember, I was (after some thought) able to "spot the point at which it fails", but I don't have time to it now, unfortunately. I will come back tomorrow. Good luck! $\endgroup$ – Bobson Dugnutt Feb 11 '16 at 23:24
  • $\begingroup$ Okay I hope you'll be able to show me tomorrow. Thanks! $\endgroup$ – user2216571 Feb 12 '16 at 1:10
  • $\begingroup$ Were you able to have a crack at it and find the problem? $\endgroup$ – user2216571 Feb 13 '16 at 16:25
  • $\begingroup$ @user2216571 Yep, here you go! $\endgroup$ – Bobson Dugnutt Feb 13 '16 at 17:21

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.