# Orthogonality of Sinusoids

According to my textbook, the reason sinusoids are orthogonal is because the integrated product of them proves to be exactly zero, unless both sinusoids are equal:

My issue is that if you input two different sinusoids into Wolfram Alpha as according to said explanation, it turns out that it isn't zero: $$\int_0^l\sin(ax)\sin(bx)\text{d}x=\frac{b\sin(al)\cos(bl)-a\cos(al)\sin(bl)}{a^2-b^2}.$$ So, am I missing something silly, or is my textbook wrong?

• It is very common to misinterpret Wolfram Alpha results or Wolfram Alpha to misinterpret user input. What was your exact input? Also "different" means exactly what? Commented Jan 16, 2022 at 17:41
• Which textbook are you referring to? Commented Jan 16, 2022 at 17:41
• You're right, the integral you've written in your question is not zero. However, when $a,b$ are positive integers and $l=\pi$, then $$\int_0^\pi \sin(ax)\sin(bx)=\begin{cases} \pi/2 &a=b \\ 0 & a\neq b \end{cases}$$ Use the multiplication to addition formulae for trig functions to verify this. Commented Jan 16, 2022 at 18:44