Gradshteyn&Ryzhik 6.635.3 provides the following integral, with the usual constraints on $\nu,\alpha,\beta$, $$\int\limits_0^\infty \exp\left(-\frac{\alpha}{x}-\beta x\right)J_\nu(\gamma x)\frac{\mathrm{d}x}{x}= 2J_\nu\left(\sqrt{2\alpha(\sqrt{\beta^2+\gamma^2}-\beta)}\right) K_\nu\left(\sqrt{2\alpha(\sqrt{\beta^2+\gamma^2}+\beta)}\right).$$ The two previous equations give the integral $$\int\limits_0^\infty \exp\left(-\frac{\alpha}{x}\right)J_\nu(\beta x)\frac{\mathrm{d}x}{x}= 2J_\nu\left(\sqrt{2\alpha\beta}\right) K_\nu\left(\sqrt{2\alpha\beta}\right)$$ and the same integral with $J_\nu(...)$ replaced by $Y_\nu(...)$ on both sides of the equation (Bessel function of the first kind replaced by the second kind). The same simple substitution sometimes works and sometimes doesn't work in other integrals in Gradshteyn&Ryzhik. Is there a general rule as to when this simple substitution works, and in particular does it work for the first integral given above, 6.635.3? Alternatively, how can a computation of the above integral (with the Bessel function of the second kind) be approached? [I would prefer to understand this better than just to know what answer Mathematica gives. To save anyone the trouble, Wolfram definite integral balks at it.]
It's a more involved question, but is there a more interesting way to understand the connection between $\exp\left(-\frac{\alpha}{x}-\beta x\right)$ and the Bessel functions that is reflected by the integrals above and by Gradshteyn&Ryzhik 3.471.9, $$\int\limits_0^\infty x^{\nu-1}\exp\left(-\frac{\alpha}{x}-\beta x\right)\mathrm{d}x= 2\left(\frac{\alpha}{\beta}\right)^{\frac{\nu}{2}} K_\nu(2\sqrt{\alpha\beta})$$ than the bare statement that this integral is a Mellin transform?
[As may be obvious, I learned what was necessary to formulate the second question while formulating the first. This question is related to a question about quantum field theory on physics.SE. Thanks in advance.]
EDIT: For the first question, because of the definition $Y_\nu(z)=\frac{cos(\nu\pi) J_\nu(z)-J_{-\nu}(z)}{sin(\nu\pi)}$, for noninteger $\nu$, $|\arg(z)|<\pi$, and because of the identity $K_{-\nu}(z)=K_\nu(z)$, the noninteger case is embarrassingly obvious, then continuity of the Bessel functions w.r.t. order is enough (for me) for the integer case, $$\int\limits_0^\infty \exp\left(-\frac{\alpha}{x}-\beta x\right)Y_\nu(\gamma x)\frac{\mathrm{d}x}{x}= 2Y_\nu\left(\sqrt{2\alpha(\sqrt{\beta^2+\gamma^2}-\beta)}\right) K_\nu\left(\sqrt{2\alpha(\sqrt{\beta^2+\gamma^2}+\beta)}\right).$$ Those observations seem to be enough to give a reasonable idea of when it's straightforward to replace $J_\nu(...)$ by $Y_\nu(...)$ (not often, ultimately). Of course all such integral equivalences eventually derive from the differential equations and the boundary conditions satisfied by the Bessel functions of various orders. The second question, still open, clearly needs considerably more knowledge and, I take it, a more abstract mindset.