Please follow the link to install MaTeX and required packages. In general you do not need that to run the code because I only use it to display large formula and no computation depends on it.
This is a very tricky integral with very specific strategy not included in automation. Typically breaking down domain for integration to (b^(k+1),b^k) is quite unusual and probably not used anywhere else
Ok thanks.
Mariusz,
For the first problem MaTeXInstall. Then
MaTeXInstall
Needs["MaTeX`"]