The integral is studied in On Certain Indefinite Integrals Involving Bessel Functions (1958).
(The $i=0$ integral is $g(a,0,x)$ in the notation of that paper, and as Robert Israel points out, the $i=1$ integral is simply related.)
The paper is behind a paywall, so I have not studiedread it.
And then there is Tables of some indefinite integral of Bessel functions of integer order (2017), which examines the $i=0$ integral in great detail and gives several series expansions, see pages 87 and following.
I reproduce one such formula: