I'm reading 2nd edition of Merzbacher's Quantum Mechanics, and am having trouble following a step in his derivation of some formulas related to the Wentzel–Kramers–Brillouin approximation. On p. 118, the author gives as the WKB approximation to the wave function
\begin{equation*} \psi(x) \approx \frac{1}{\sqrt{k(x)}}\exp\left[\pm i\int_{}^{x}{k(x)\,\mathrm{d}x}\right] \end{equation*}
where I think the lower bound being blank implies that it is a constant, and where
\begin{equation*} k(x) = \left[\frac{2\mu}{\hbar^{2}}\left[E-V(x)\right]\right]^{1/2} \end{equation*}
if $E>V(x)$, and $k(x) = -ik(x)$ if $E<V(x)$. In order to derive the "connection formulas" at the boundary, the author suggests making the substitutions
\begin{equation*} v(x) = \sqrt{k(x)}\psi(x)\hspace{1pc}\mbox{ and }\hspace{1pc}y = \int_{}^{x}{k(x)\,\mathrm{d}x}. \end{equation*}
Then he says "by a little manipulation, we obtain instead of the Schrödinger equation"
\begin{equation*} \frac{\mathrm{d}^{2}v}{\mathrm{d}y^{2}} + \left[\frac{1}{4k^{2}}\left(\frac{\mathrm{d}k}{\mathrm{d}y}\right)^{2} - \frac{1}{2k}\frac{\mathrm{d}^{2}k}{\mathrm{d}y^{2}}+1\right]v = 0. \end{equation*}
I'm not sure what manipulations he means, though. I've tried just taking the second derivative of $v$ with respect to $y$, which goes something like
\begin{align*} \frac{\mathrm{d}^{2}v}{\mathrm{d}y^{2}} &= \frac{\mathrm{d}}{\mathrm{d}y}\left[\frac{\mathrm{d}v}{\mathrm{d}y}\right]\\ &= \frac{\mathrm{d}}{\mathrm{d}y}\left[\frac{\mathrm{d}x}{\mathrm{d}y}\left(\frac{\mathrm{d}}{\mathrm{d}x}\left[\sqrt{k(x)}\psi(x)\right]\right)\right]\\ &= \frac{\mathrm{d}}{\mathrm{d}y}\left[\frac{\mathrm{d}x}{\mathrm{d}y}\left(\frac{1}{2\sqrt{k(x)}}\frac{\mathrm{d}k}{\mathrm{d}x}\psi(x) + \sqrt{k(x)}\frac{\mathrm{d}\psi}{\mathrm{d}x}\right)\right]\\ &=\cdots \end{align*}
Does this seem like the right way to derive the differential equation? Incidentally, since $k(x)>0$, is it safe to write
\begin{equation*} \frac{\mathrm{d}x}{\mathrm{d}y} = \frac{1}{k(x)}? \end{equation*}
Is the right way to go then to plug in the WKB approximation to $\psi$ and the explicit definition of $k(x)$?
You may be overthinking it, standing on your head. Note that, in natural units, y is dimensionless, and v has units of $k^{3/2}$, while $\partial_x= k\partial_y$. You then have the Schroedinger equation $$ \partial_x^2 \frac{v}{\sqrt k} + k^{3/2} v=0 \leadsto \\ k\partial_y \left (k\partial_y \frac{v}{\sqrt k}\right ) + k^{3/2} v=0 \leadsto \\ \partial_y\left (\sqrt{k} \partial_y v -\frac{\partial_yk~v}{2\sqrt{k}}\right )+ \sqrt{k} v=0 \leadsto \\ \partial_y^2 v+\frac{1}{k^2} (\partial_yk)^2 v -\frac{1}{2k}\partial_y^2k~~v +v=0, $$ all dimensionally consistent.