For a class of Physics I need to compute the following integral:
$$\int_{-L}^{L}\mathrm{d}q\dfrac{\theta(\epsilon-bq)}{\sqrt{(\epsilon-bq)}}$$
and I truly have no idea on how to proceed. Note $\theta(\cdot)$ is Heaviside step function. Also, is there any systematic approach to solving this kind of integrals involving the $\theta$ function?
Since Heaviside function is a piecewise function: $$ \theta(x)=\begin{cases}1&x\ge0,\\0&x<0.\end{cases} $$ and composition of functions involving piecewise functions is also a piecewise function, you can rewrite you integral as (assuming $b>0$): $$ \int_{-L}^{L}dq\begin{cases}0&\epsilon-bq <0,\\\frac1{\sqrt{\epsilon-bq}}&\epsilon-bq \ge 0,\end{cases} = \int_{-L}^{L}dq\begin{cases}0&q > \epsilon/b,\\\frac1{\sqrt{\epsilon-bq}}&q \le\epsilon/b.\end{cases} $$ Finally integral of piecewise function can be seen as a sum of integrals of each piece. If the integral is definite, you also want to keep in mind that the transition of piecewise function may happen outside the bounds of integration: $$ \begin{cases} \int_{-L}^{L} \frac{dq}{\sqrt{\epsilon-bq}} &L \le\epsilon/b, \\ \int_{-L}^{\epsilon/b} \frac{dq}{\sqrt{\epsilon-bq}}+\int_{\epsilon/b}^L 0dq &-L \le\epsilon/b<L,\\ \int_{-L}^L 0\,dq & \epsilon/b<-L \end{cases} $$