\[ \int x \cos (a+b x) \text {CosIntegral}(a+b x) \, dx \]
Optimal antiderivative \[ -\frac {\cosineIntegral \! \left (2 b x +2 a \right )}{2 b^{2}}+\frac {\cosineIntegral \! \left (b x +a \right ) \cos \! \left (b x +a \right )}{b^{2}}+\frac {\cos \! \left (2 b x +2 a \right )}{4 b^{2}}-\frac {\ln \! \left (b x +a \right )}{2 b^{2}}+\frac {a \sinIntegral \! \left (2 b x +2 a \right )}{2 b^{2}}+\frac {x \cosineIntegral \! \left (b x +a \right ) \sin \! \left (b x +a \right )}{b} \]
command
integrate(x*fresnel_cos(b*x+a)*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
\[ {\left (\frac {x \sin \left (b x + a\right )}{b} + \frac {\cos \left (b x + a\right )}{b^{2}}\right )} \operatorname {Ci}\left (b x + a\right ) + \frac {a \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - a \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} + 2 \, a \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - 2 \, \log \left ({\left | b x + a \right |}\right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} + a \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} - a \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} + 2 \, a \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x\right )^{2} + a \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (a\right )^{2} - a \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (a\right )^{2} + 2 \, a \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (a\right )^{2} + \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - 2 \, \log \left ({\left | b x + a \right |}\right ) \tan \left (b x\right )^{2} - \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} - \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} - 2 \, \log \left ({\left | b x + a \right |}\right ) \tan \left (a\right )^{2} - \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (a\right )^{2} - \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (a\right )^{2} + a \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) - a \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) + 2 \, a \operatorname {Si}\left (2 \, b x + 2 \, a\right ) - \tan \left (b x\right )^{2} - 4 \, \tan \left (b x\right ) \tan \left (a\right ) - \tan \left (a\right )^{2} - 2 \, \log \left ({\left | b x + a \right |}\right ) - \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) - \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) + 1}{4 \, {\left (b^{2} \tan \left (b x\right )^{2} \tan \left (a\right )^{2} + b^{2} \tan \left (b x\right )^{2} + b^{2} \tan \left (a\right )^{2} + b^{2}\right )}} \]