41.24 Problem number 119

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

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

command

integrate(x^2*fresnel_cos(b*x)*cos(b*x),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

\[ {\left (\frac {2 \, x \cos \left (b x\right )}{b^{2}} + \frac {{\left (b^{2} x^{2} - 2\right )} \sin \left (b x\right )}{b^{3}}\right )} \operatorname {Ci}\left (b x\right ) - \frac {5 \, b x \tan \left (b x\right )^{2} - 2 \, \Im \left ( \operatorname {Ci}\left (2 \, b x\right ) \right ) \tan \left (b x\right )^{2} + 2 \, \Im \left ( \operatorname {Ci}\left (-2 \, b x\right ) \right ) \tan \left (b x\right )^{2} - 4 \, \operatorname {Si}\left (2 \, b x\right ) \tan \left (b x\right )^{2} + 3 \, b x - 2 \, \Im \left ( \operatorname {Ci}\left (2 \, b x\right ) \right ) + 2 \, \Im \left ( \operatorname {Ci}\left (-2 \, b x\right ) \right ) - 4 \, \operatorname {Si}\left (2 \, b x\right ) + 5 \, \tan \left (b x\right )}{4 \, {\left (b^{3} \tan \left (b x\right )^{2} + b^{3}\right )}} \]