The solution for $\left| s\right| \geq \left| d\right|$ have already been derived as stated in question. It has the following form
Tas901=(1/(2 Sqrt[\[Pi]]))(-a^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},a k,1/2]+b^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},b k,1/2]) (\[Piecewise] -1 Mod[d+3 s,4]<=1
1 True
)
Using the relation from http://functions.wolfram.com/03.03.26.0026.01
$Y_{\mu }\left(\sqrt{z}\right) J_{\nu }\left(\sqrt{z}\right)+J_{\mu }\left(\sqrt{z}\right) Y_{\nu }\left(\sqrt{z}\right)=-\frac{2 G_{2,4}^{3,0}\left(z\left|
\begin{array}{c}
0,\frac{1}{2} \\
\frac{\mu -\nu }{2},\frac{\nu -\mu }{2},\frac{\mu +\nu }{2},\frac{1}{2} (-\mu -\nu ) \\
\end{array}
\right.\right)}{\sqrt{\pi }}$
we can swap the orders of Bessel functions. Let us apply this rule to the integrand:
Expand[r*BesselJ[s, k*r]*BesselY[d, k*r] /.
HoldPattern[
BesselJ[\[Nu]_, z_]*BesselY[\[Mu]_, z_]] :> -((
2 MeijerG[{{}, {0, 1/2}}, {{(\[Mu] + \[Nu])/2, (\[Mu] - \[Nu])/
2, (\[Nu] - \[Mu])/2}, {-(1/2) (\[Mu] + \[Nu])}}, z^2])/
Sqrt[\[Pi]]) - BesselJ[\[Mu], z]*BesselY[\[Nu], z]]
As a result we obtain two summands, which need to be integrated
-r BesselJ[d, k r] BesselY[s, k r] - (
2 r MeijerG[{{}, {0, 1/2}}, {{(d - s)/2, 1/2 (-d + s), (d + s)/
2}, {1/2 (-d - s)}}, k^2 r^2])/Sqrt[\[Pi]]
The first one is already solved. Fortunately, the second summand can be integrated by Mathematica without any problems.
tmp = Integrate[-((
2 r MeijerG[{{}, {0, 1/2}}, {{(d - s)/2, 1/2 (-d + s), (d + s)/
2}, {1/2 (-d - s)}}, k^2 r^2])/Sqrt[\[Pi]]), r]
(* -(MeijerG[{{1}, {1, 3/2}}, {{1/2 (2 + d - s), 1/2 (2 - d + s),
1/2 (2 + d + s)}, {0, 1/2 (2 - d - s)}}, k^2 r^2]/(
k^2 Sqrt[\[Pi]])) *)
Then we use the solution for $\left| s\right| \geq \left| d\right|$ for derivation of solution for $\left| s\right| <\left| d\right|$ (expression correspond to above expanded integrand):
Tas902 = (((-Tas901 /. s -> sTemp) /. d -> s) /.
sTemp -> d) + ((tmp /. r -> b) - (tmp /. r -> a))
Gathering integration results for two pieces of domain
Tas9=
Piecewise[{{Tas901, Abs[s] >= Abs[d]}, {Tas902,
Abs[s] < Abs[d]}}]
we can express the solution to the integral in question as follows:
\[Piecewise] (1/(2 Sqrt[\[Pi]]))(-a^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},a k,1/2]+b^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},b k,1/2]) (\[Piecewise] -1 Mod[d+3 s,4]<=1
1 True
) Abs[s]>=Abs[d]
(1/(2 k^2 Sqrt[\[Pi]]))(2 MeijerG[{{1},{1,3/2}},{{1/2 (2+d-s),1/2 (2-d+s),1/2 (2+d+s)},{0,1/2 (2-d-s)}},a^2 k^2]-2 MeijerG[{{1},{1,3/2}},{{1/2 (2+d-s),1/2 (2-d+s),1/2 (2+d+s)},{0,1/2 (2-d-s)}},b^2 k^2]+k^2 (a^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},a k,1/2]-b^2 MeijerG[{{0,1/2 Mod[d+s,2]},{1/2 Boole[Mod[d+s,2]==0]}},{{1/2 (Abs[d]+Abs[s]),1/2 Abs[Abs[d]-Abs[s]]},{-1,1/2 (-Abs[d]-Abs[s]),-(1/2) Abs[Abs[d]-Abs[s]]}},b k,1/2]) (\[Piecewise] -1 Mod[3 d+s,4]<=1
1 True
)) Abs[s]<Abs[d]
0 True
Comparison with numeric integration can be done for the equal precisions of computation results
Grid[Prepend[
Table[Flatten@{"d=" <> ToString@id,
Table[ruleSet = {s -> is, d -> id, k -> 1/7, a -> 1/8, b -> 1/4};
N[Tas9[s, d] /. ruleSet, 8] ==
NIntegrate[r*BesselJ[s, k*r]*BesselY[d, k*r] /. ruleSet,
Evaluate[{r, a, b} /. ruleSet], PrecisionGoal -> 8], {is, -4,
4}]}, {id, -5, 5}], Flatten@{"s=", Range[-4, 4]}],
Frame -> All, Background -> {{{White, Pink}}, {{Cyan, Yellow}}}]
The result of comparison
$\begin{array}{cccccccccc}
\text{s=} & -4 & -3 & -2 & -1 & 0 & 1 & 2 & 3 & 4 \\
\text{d=-5} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=-4} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=-3} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=-2} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=-1} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=0} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=1} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=2} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=3} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=4} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\text{d=5} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} & \text{True} \\
\end{array}$
shows that solution is valid for any integer orders s
and d
.
Concluding the above stated, I have to avow, that the solution procedure is irrational and was found by the merest chance. A more systematic approach to solution of integrals with integer orders of Bessel functions is still required.
f[r_, d_, s_, k_] = Integrate[r*BesselJ[s, k*r]*BesselY[d, k*r], r]
, the plotPlot[f[3.2, d, 3.6, 1], {d, 0, 10}]
seems "fine" for integer values ofd
. Maybe the solution is always correct, but its evaluation is only generically correct. $\endgroup$Plot[f[3.2, d, 2, 1], {d, 0, 10}]
. $\endgroup$