41.12 Problem number 87

\[ \int x^2 \text {CosIntegral}(a+b x) \, dx \]

Optimal antiderivative \[ \frac {a^{3} \cosineIntegral \! \left (b x +a \right )}{3 b^{3}}+\frac {x^{3} \cosineIntegral \! \left (b x +a \right )}{3}+\frac {a \cos \! \left (b x +a \right )}{3 b^{3}}-\frac {2 x \cos \! \left (b x +a \right )}{3 b^{2}}+\frac {2 \sin \! \left (b x +a \right )}{3 b^{3}}-\frac {a^{2} \sin \! \left (b x +a \right )}{3 b^{3}}+\frac {a x \sin \! \left (b x +a \right )}{3 b^{2}}-\frac {x^{2} \sin \! \left (b x +a \right )}{3 b} \]

command

integrate(x^2*fresnel_cos(b*x+a),x, algorithm="giac")

Giac 1.9.0-11 via sagemath 9.6 output

\[ \text {could not integrate} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \frac {1}{3} \, x^{3} \operatorname {Ci}\left (b x + a\right ) + \frac {a^{3} \cos \left (a\right )^{2} \operatorname {Ci}\left (b x + a\right ) + a^{3} \cos \left (a\right )^{2} \operatorname {Ci}\left (-b x - a\right ) + a^{3} \operatorname {Ci}\left (b x + a\right ) \sin \left (a\right )^{2} + a^{3} \operatorname {Ci}\left (-b x - a\right ) \sin \left (a\right )^{2} - 2 \, b^{2} x^{2} \sin \left (b x + a\right ) + 2 \, a b x \sin \left (b x + a\right ) - 4 \, b x \cos \left (b x + a\right ) - 2 \, a^{2} \sin \left (b x + a\right ) + 2 \, a \cos \left (b x + a\right ) + 4 \, \sin \left (b x + a\right )}{6 \, b^{3}} \]