Notation: $j_l(x)$ and $y_l(x)$ denote spherical Bessel functions of the first and second kind, respectively.
I need a closed-form expression for the following indefinite integral: $$\int{x^2j_l(x)y_l(x)dx}$$ What I have tried: using the spherical Bessel differential equation: \begin{equation} x^2\frac{d^2j_l}{dx^2} + 2x\frac{dj_l}{dx} - \left(l\left(l+1\right)\right)j_l = -x^2j_l \end{equation} \begin{equation} x^2\frac{d^2y_l}{dx^2} + 2x\frac{dy_l}{dx} - \left(l\left(l+1\right)\right)y_l = -x^2y_l \end{equation} Multiplying the first by $y_l$, second by $j_l$, taking integral on both sides, adding and applying product rule on the left-most integral:
\begin{equation} x^2(j_ly_l)'|_{x_1}^{x_2} - 2\left(l\left(l+1\right)\right)\int j_ly_ldx= -2\int x^2j_ly_ldx \end{equation}
So I now need to know: $$\int j_ly_ldx $$ which I don't know how to proceed with and could find no references. Could someone please help me with the integral? Thank you.
We can use this gadget to compute the integral, although we have to set it up carefully: $j_l(sx)$ and $y_l(sx)$ satisfy the Sturm–Liouville equation $$ -\frac{d}{dx} \left( x^2 \frac{dy}{dx} \right) +l(l+1)y = s^2x^2 y, $$ so the gadget gives $$ \int x^2 j_l(sx)y_l(x) \, dx = -x^2\frac{j_l'(sx)y_l(x)-j_l(sx)y_l'(x)}{s^2-1} + C.$$
To find the integral when $s = 1$, we have to take the limit. The series expansion about $s=1$ can be computed using the Taylor expansions to be $$ \frac{x^2(j_l'(x)y_l(x)-j_l(x)y_l'(x))}{2(s-1)} + \frac{x^2}{4} (j_l'(x)y_l(x)-j_l(x)y_l'(x)) + \frac{x^3}{4}\big(j_l''(x)y_l(x)-j_l'(x)y_l(x)\big) + O(s-1) $$ However, the first terms are just constant because the Wronskian of $j_l(x)$ and $y_l(x)$, $W = j_l'(x)y_l(x)-j_l(x)y_l'(x)$, is proportional to $1/x^2$, so we can subtract off a function of $s$ so that the indefinite integral is continuous in $s$ at $s=1$. We hence obtain $$ \int x^2 j_l(sx)y_l(x) \, dx = \frac{x^3}{4}\big(j_l''(x)y_l(x)-j_l'(x)y_l(x)\big) + C', $$ which we can rewrite by using the recurrence relations and the differential equation if desired.