How to integrate a function that has no exact integration and cannot be expanded by a Taylor series Today I posted a question about the integral
$$\int\frac{(\cos{c x})^2}{a+bx}dx$$
for which a Taylor series can be built and the integral solved for the desired approximation.
Another term in the stiffness matrix has the integral:
$$\int\frac{x^2(\cos{c x})^2}{a+bx}dx$$
whose Taylor series cannot be used since it does not converge:
$$x^4 \left(\frac{b^2}{a^3}-\frac{c^2}{a}\right)-\frac{b x^3}{a^2}+x^6 \left(\frac{b^4}{a^5}-\frac{b^2 c^2}{a^3}+\frac{c^4}{3 a}\right)+x^5 \left(\frac{b c^2}{a^2}-\frac{b^3}{a^4}\right)+\frac{x^2}{a}+O[x]^7$$
In this case, which method could be used to calculate the integral?

Maple finds a closed form for your antiderivative:
$$ 1/4\,{\frac {x\sin \left( 2\,cx \right) }{bc}}+1/8\,{\frac {\cos
 \left( 2\,cx \right) }{{c}^{2}b}}-1/4\,{\frac {a\sin \left( 2\,cx
 \right) }{c{b}^{2}}}+1/2\,{a}^{2}{\it Si} \left( 2\,cx+2\,{\frac {ac}
{b}} \right) \sin \left( 2\,{\frac {ac}{b}} \right) {b}^{-3}\\+1/2\,{a}^
{2}{\it Ci} \left( 2\,cx+2\,{\frac {ac}{b}} \right) \cos \left( 2\,{
\frac {ac}{b}} \right) {b}^{-3}+1/4\,{\frac {{x}^{2}}{b}}-1/2\,{\frac 
{ax}{{b}^{2}}}+1/2\,{\frac {{a}^{2}\ln  \left( bcx+ac \right) }{{b}^{3
}}}
$$
where Si and Ci are the Sine-integral and Cosine-integral functions.
