I'm teaching differential equations this coming semester and find myself curious about this. The standard techniques to obtaining the solution $x^{-\frac{1}{2}} e^{\pm ix}$ to the Bessel differential equation
$$ x^2 f''(x) + x f'(x) + (x^2 - \nu^2)f(x) = 0 $$
for $\nu = \frac{1}{2}$ involve either series approaches or a substitution of the form $f(x) = x^{-\frac{1}{2}} g(x)$ and a subsequent reduction to the usual oscillator ODE
$$ g''(x) + g(x) = 0 $$
which has as solutions $g(x) = Ae^{\pm ix}$.
While this is a very simple approach, it also requires recognizing a "change of function" that is not trivial for students to anticipate. I am hoping to have an approach that students can discover themselves that does not feel like magic and does not rely on series. (I want to cover this example prior to series if possible and return to it later.)
Are there any more elementary methods to get to the solution in this special case (and subsequent special cases of half integers via Bessel function properties)? Obviously the general case leads to Bessel functions so there is no hope of getting the solution via elementary means in general. Many of the ODEs with elementary function solutions can be solved via operator factorization techniques (including a very significant portion of solvable second order ODEs), but I have come up quite short on this front in this example.
This may not be what you are looking for, but I'm pretty sure your substitution example $f(x) = x^{-\frac{1}{2}} g(x)$ is able to be generalized for equations of the form $$y''(x) + y'(x) f(x) + y(x) g(x) + h(x) = 0$$ (for "non-exotic" functions $f, g$, and $h$) where the generalized substitution $$y(x) \mapsto u(x) \implies y(x) = \exp\left( \int\frac{-f(x)}{2} \text{ d}x\right) u(x)$$ will eliminate the first order term (the integration constant is chosen as $0$). With this first order term eliminated, the equation is then sometimes solvable, which for the purposes for a class should be pretty much always.
@Ninad Munshi provides some motivation for this type of substitution so perhaps you can have your students derive this to an extent and then maybe memorize or at least have this type of substitution in mind?