41.29 Problem number 124

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

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

command

integrate(x*fresnel_cos(b*x+a)*sin(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 \cos \left (b x + a\right )}{b} - \frac {\sin \left (b x + a\right )}{b^{2}}\right )} \operatorname {Ci}\left (b x + a\right ) + \frac {2 \, b x \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - 2 \, a \log \left ({\left | b x + a \right |}\right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} + \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} - 2 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x\right )^{2} \tan \left (a\right )^{2} + 2 \, b x \tan \left (b x\right )^{2} - 2 \, a \log \left ({\left | b x + a \right |}\right ) \tan \left (b x\right )^{2} - a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} - a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} + 2 \, b x \tan \left (a\right )^{2} - 2 \, a \log \left ({\left | b x + a \right |}\right ) \tan \left (a\right )^{2} - a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (a\right )^{2} - a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (a\right )^{2} - \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (b x\right )^{2} + \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (b x\right )^{2} - 2 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (b x\right )^{2} - 2 \, \tan \left (b x\right )^{2} \tan \left (a\right ) - \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) \tan \left (a\right )^{2} + \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) \tan \left (a\right )^{2} - 2 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) \tan \left (a\right )^{2} - 2 \, \tan \left (b x\right ) \tan \left (a\right )^{2} + 2 \, b x - 2 \, a \log \left ({\left | b x + a \right |}\right ) - a \Re \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) - a \Re \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) - \Im \left ( \operatorname {Ci}\left (2 \, b x + 2 \, a\right ) \right ) + \Im \left ( \operatorname {Ci}\left (-2 \, b x - 2 \, a\right ) \right ) - 2 \, \operatorname {Si}\left (2 \, b x + 2 \, a\right ) + 2 \, \tan \left (b x\right ) + 2 \, \tan \left (a\right )}{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 )}} \]