3.1.72 \(\int x \text {CosIntegral}(b x) \, dx\) [72]

Optimal. Leaf size=35 \[ -\frac {\cos (b x)}{2 b^2}+\frac {1}{2} x^2 \text {CosIntegral}(b x)-\frac {x \sin (b x)}{2 b} \]

[Out]

1/2*x^2*Ci(b*x)-1/2*cos(b*x)/b^2-1/2*x*sin(b*x)/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {6639, 12, 3377, 2718} \begin {gather*} -\frac {\cos (b x)}{2 b^2}+\frac {1}{2} x^2 \text {CosIntegral}(b x)-\frac {x \sin (b x)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*CosIntegral[b*x],x]

[Out]

-1/2*Cos[b*x]/b^2 + (x^2*CosIntegral[b*x])/2 - (x*Sin[b*x])/(2*b)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 6639

Int[CosIntegral[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m + 1)*(CosIntegr
al[a + b*x]/(d*(m + 1))), x] - Dist[b/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(Cos[a + b*x]/(a + b*x)), x], x] /; F
reeQ[{a, b, c, d, m}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int x \text {Ci}(b x) \, dx &=\frac {1}{2} x^2 \text {Ci}(b x)-\frac {1}{2} b \int \frac {x \cos (b x)}{b} \, dx\\ &=\frac {1}{2} x^2 \text {Ci}(b x)-\frac {1}{2} \int x \cos (b x) \, dx\\ &=\frac {1}{2} x^2 \text {Ci}(b x)-\frac {x \sin (b x)}{2 b}+\frac {\int \sin (b x) \, dx}{2 b}\\ &=-\frac {\cos (b x)}{2 b^2}+\frac {1}{2} x^2 \text {Ci}(b x)-\frac {x \sin (b x)}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 35, normalized size = 1.00 \begin {gather*} -\frac {\cos (b x)}{2 b^2}+\frac {1}{2} x^2 \text {CosIntegral}(b x)-\frac {x \sin (b x)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*CosIntegral[b*x],x]

[Out]

-1/2*Cos[b*x]/b^2 + (x^2*CosIntegral[b*x])/2 - (x*Sin[b*x])/(2*b)

________________________________________________________________________________________

Maple [A]
time = 0.28, size = 32, normalized size = 0.91

method result size
derivativedivides \(\frac {\frac {b^{2} x^{2} \cosineIntegral \left (b x \right )}{2}-\frac {\cos \left (b x \right )}{2}-\frac {b x \sin \left (b x \right )}{2}}{b^{2}}\) \(32\)
default \(\frac {\frac {b^{2} x^{2} \cosineIntegral \left (b x \right )}{2}-\frac {\cos \left (b x \right )}{2}-\frac {b x \sin \left (b x \right )}{2}}{b^{2}}\) \(32\)
meijerg \(\frac {\sqrt {\pi }\, \left (\frac {\frac {b^{2} x^{2}}{2}+1}{2 \sqrt {\pi }}-\frac {b^{2} x^{2} \gamma }{2 \sqrt {\pi }}-\frac {b^{2} x^{2} \ln \left (2\right )}{2 \sqrt {\pi }}-\frac {b^{2} x^{2} \ln \left (\frac {b x}{2}\right )}{2 \sqrt {\pi }}-\frac {\cos \left (b x \right )}{2 \sqrt {\pi }}-\frac {b x \sin \left (b x \right )}{2 \sqrt {\pi }}+\frac {b^{2} x^{2} \cosineIntegral \left (b x \right )}{2 \sqrt {\pi }}+\frac {\left (2 \gamma -1+2 \ln \left (x \right )+2 \ln \left (b \right )\right ) x^{2} b^{2}}{4 \sqrt {\pi }}\right )}{b^{2}}\) \(124\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*Ci(b*x),x,method=_RETURNVERBOSE)

[Out]

1/b^2*(1/2*b^2*x^2*Ci(b*x)-1/2*cos(b*x)-1/2*b*x*sin(b*x))

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.48, size = 70, normalized size = 2.00 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {C}\left (b x\right ) - \frac {\sqrt {\frac {1}{2}} {\left (4 \, \sqrt {\frac {1}{2}} \pi b x \sin \left (\frac {1}{2} \, \pi b^{2} x^{2}\right ) - \left (i + 1\right ) \, \left (\frac {1}{4}\right )^{\frac {1}{4}} \pi \operatorname {erf}\left (\sqrt {\frac {1}{2} i \, \pi } b x\right ) + \left (i - 1\right ) \, \left (\frac {1}{4}\right )^{\frac {1}{4}} \pi \operatorname {erf}\left (\sqrt {-\frac {1}{2} i \, \pi } b x\right )\right )}}{4 \, \pi ^{2} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*fresnel_cos(b*x),x, algorithm="maxima")

[Out]

1/2*x^2*fresnel_cos(b*x) - 1/4*sqrt(1/2)*(4*sqrt(1/2)*pi*b*x*sin(1/2*pi*b^2*x^2) - (I + 1)*(1/4)^(1/4)*pi*erf(
sqrt(1/2*I*pi)*b*x) + (I - 1)*(1/4)^(1/4)*pi*erf(sqrt(-1/2*I*pi)*b*x))/(pi^2*b^2)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 51, normalized size = 1.46 \begin {gather*} \frac {\pi b^{3} x^{2} \operatorname {C}\left (b x\right ) - b^{2} x \sin \left (\frac {1}{2} \, \pi b^{2} x^{2}\right ) + \sqrt {b^{2}} \operatorname {S}\left (\sqrt {b^{2}} x\right )}{2 \, \pi b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*fresnel_cos(b*x),x, algorithm="fricas")

[Out]

1/2*(pi*b^3*x^2*fresnel_cos(b*x) - b^2*x*sin(1/2*pi*b^2*x^2) + sqrt(b^2)*fresnel_sin(sqrt(b^2)*x))/(pi*b^3)

________________________________________________________________________________________

Sympy [A]
time = 0.91, size = 53, normalized size = 1.51 \begin {gather*} - \frac {x^{2} \log {\left (b x \right )}}{2} + \frac {x^{2} \log {\left (b^{2} x^{2} \right )}}{4} + \frac {x^{2} \operatorname {Ci}{\left (b x \right )}}{2} - \frac {x \sin {\left (b x \right )}}{2 b} - \frac {\cos {\left (b x \right )}}{2 b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*Ci(b*x),x)

[Out]

-x**2*log(b*x)/2 + x**2*log(b**2*x**2)/4 + x**2*Ci(b*x)/2 - x*sin(b*x)/(2*b) - cos(b*x)/(2*b**2)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*fresnel_cos(b*x),x, algorithm="giac")

[Out]

integrate(x*fresnel_cos(b*x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \frac {x^2\,\mathrm {cosint}\left (b\,x\right )}{2}-\frac {\cos \left (b\,x\right )+b\,x\,\sin \left (b\,x\right )}{2\,b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cosint(b*x),x)

[Out]

(x^2*cosint(b*x))/2 - (cos(b*x) + b*x*sin(b*x))/(2*b^2)

________________________________________________________________________________________