Every derivation of spherical harmonics seems to tell me that $e^{im\phi}$ is the most obvious solution in the world to $\frac{\partial^2 f}{\partial \phi^2} = -m^2f$. But what about $Ae^{im\phi} + Be^{-im\phi}$ ? Isn't that a more general, more "correct" solution? Whether it's spherical harmonics or particle on a ring, I always run into $e^{im\phi}$ and $e^{-im\phi}$ as separate solutions. But why, when the general form involves writing them as a linear combination?
I think at the heart of it is their orthogonality, and in physics the subspace formed by the degeneracy of $m$ and $-m$, as well as the connection to the angular momentum operator $L_z$. But I can't really unpack it into a strictly mathematical explanation for why in none of the derivations they are ever presented initially as a linear combination. I feel like the derivation should at least begin there, before separating the two terms into distinct solutions. Or am I missing something, and is there a good reason why they are treated as separate from the start?
Maybe the "extra seasoning" that you need is that the solutions must be periodic:
$$f(\phi) = f(2 \pi m + \phi).$$
This is what forces $m$ to be an integer, and then leads to the general solution
$$f(\phi) = Ae^{im \phi} + Be^{-im \phi}.$$