# Why is $2\sin{(akx)}\sin{(bkx)}=\cos{((a-b)kx)}-\cos{((a+b)kx)}$?

I am learning introductory quantum mechanics from the Introduction to Quantum Mechanics by David J. Griffiths.

I stumbled upon this proof for orthogonality of two different solutions regarding the infinite well problem on the page 33:

I have some problems understanding the passage from the first line to the second line. Why is $$\frac{2}{a}\sin{\left(\frac{m\pi}{a}x\right)}\sin{\left(\frac{n\pi}{a}x\right)}=\frac 1 a \cos{\left(\frac{m-n}{a}\pi x\right)}-\cos{\left(\frac{m+n}{a}\pi x\right)}$$ true? I haven't yet found any way to solve it using trigonometric identities.

There are lots of physics variables here, but this is Mathematics Stack Exchange. That's why I can ask it in the generalised way:

In general, why is $$2\sin{(akx)}\sin{(bkx)}=\cos{((a-b)kx)}-\cos{((a+b)kx)}$$ true?

Refer to product to sum identity

$$2\sin \theta \sin \varphi = {{\cos(\theta - \varphi) - \cos(\theta + \varphi)} }$$

which can be proved by angle sum and difference identities.

Refer to the related

• Oh, there's a theorem about it. (BTW, I just wanted to ask how it is proved, and you had already added the insight of the proof : ) Commented Oct 11, 2021 at 20:58
• See en.wikipedia.org/wiki/… especially the figures next to that paragraph Commented Oct 11, 2021 at 20:58
• Thank you for the theorem. I think there just can't be a better answer and this answers it perfectly. That's why I am going to accept it as soon as I can do it. Commented Oct 11, 2021 at 21:00
• @User123 I've added a reference with the proof.
– user
Commented Oct 11, 2021 at 21:01