3.95 \(\int x \text {Ci}(a+b x)^2 \, dx\)

Optimal. Leaf size=155 \[ -\frac {a (a+b x) \text {Ci}(a+b x)^2}{2 b^2}+\frac {\text {Ci}(2 a+2 b x)}{2 b^2}+\frac {a \text {Ci}(a+b x) \sin (a+b x)}{b^2}-\frac {\text {Ci}(a+b x) \cos (a+b x)}{b^2}-\frac {a \text {Si}(2 a+2 b x)}{b^2}+\frac {\log (a+b x)}{2 b^2}-\frac {\cos (2 a+2 b x)}{4 b^2}+\frac {x (a+b x) \text {Ci}(a+b x)^2}{2 b}-\frac {x \text {Ci}(a+b x) \sin (a+b x)}{b} \]

[Out]

-1/2*a*(b*x+a)*Ci(b*x+a)^2/b^2+1/2*x*(b*x+a)*Ci(b*x+a)^2/b+1/2*Ci(2*b*x+2*a)/b^2-Ci(b*x+a)*cos(b*x+a)/b^2-1/4*
cos(2*b*x+2*a)/b^2+1/2*ln(b*x+a)/b^2-a*Si(2*b*x+2*a)/b^2+a*Ci(b*x+a)*sin(b*x+a)/b^2-x*Ci(b*x+a)*sin(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 14, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.400, Rules used = {6510, 6514, 4573, 6741, 6742, 2638, 3299, 6518, 3312, 3302, 6506, 6512, 4406, 12} \[ -\frac {a (a+b x) \text {CosIntegral}(a+b x)^2}{2 b^2}+\frac {\text {CosIntegral}(2 a+2 b x)}{2 b^2}+\frac {a \text {CosIntegral}(a+b x) \sin (a+b x)}{b^2}-\frac {\text {CosIntegral}(a+b x) \cos (a+b x)}{b^2}-\frac {a \text {Si}(2 a+2 b x)}{b^2}+\frac {\log (a+b x)}{2 b^2}-\frac {\cos (2 a+2 b x)}{4 b^2}+\frac {x (a+b x) \text {CosIntegral}(a+b x)^2}{2 b}-\frac {x \text {CosIntegral}(a+b x) \sin (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[x*CosIntegral[a + b*x]^2,x]

[Out]

-Cos[2*a + 2*b*x]/(4*b^2) - (Cos[a + b*x]*CosIntegral[a + b*x])/b^2 - (a*(a + b*x)*CosIntegral[a + b*x]^2)/(2*
b^2) + (x*(a + b*x)*CosIntegral[a + b*x]^2)/(2*b) + CosIntegral[2*a + 2*b*x]/(2*b^2) + Log[a + b*x]/(2*b^2) +
(a*CosIntegral[a + b*x]*Sin[a + b*x])/b^2 - (x*CosIntegral[a + b*x]*Sin[a + b*x])/b - (a*SinIntegral[2*a + 2*b
*x])/b^2

Rule 12

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

Rule 2638

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

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3312

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin
[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1])
)

Rule 4406

Int[Cos[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Int[E
xpandTrigReduce[(c + d*x)^m, Sin[a + b*x]^n*Cos[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0]
&& IGtQ[p, 0]

Rule 4573

Int[Cos[w_]^(p_.)*(u_.)*Sin[v_]^(p_.), x_Symbol] :> Dist[1/2^p, Int[u*Sin[2*v]^p, x], x] /; EqQ[w, v] && Integ
erQ[p]

Rule 6506

Int[CosIntegral[(a_.) + (b_.)*(x_)]^2, x_Symbol] :> Simp[((a + b*x)*CosIntegral[a + b*x]^2)/b, x] - Dist[2, In
t[Cos[a + b*x]*CosIntegral[a + b*x], x], x] /; FreeQ[{a, b}, x]

Rule 6510

Int[CosIntegral[(a_) + (b_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((a + b*x)*(c + d*x)^m*CosI
ntegral[a + b*x]^2)/(b*(m + 1)), x] + (-Dist[2/(m + 1), Int[(c + d*x)^m*Cos[a + b*x]*CosIntegral[a + b*x], x],
 x] + Dist[((b*c - a*d)*m)/(b*(m + 1)), Int[(c + d*x)^(m - 1)*CosIntegral[a + b*x]^2, x], x]) /; FreeQ[{a, b,
c, d}, x] && IGtQ[m, 0]

Rule 6512

Int[Cos[(a_.) + (b_.)*(x_)]*CosIntegral[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[(Sin[a + b*x]*CosIntegral[c + d
*x])/b, x] - Dist[d/b, Int[(Sin[a + b*x]*Cos[c + d*x])/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x]

Rule 6514

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

Rule 6518

Int[CosIntegral[(c_.) + (d_.)*(x_)]*Sin[(a_.) + (b_.)*(x_)], x_Symbol] :> -Simp[(Cos[a + b*x]*CosIntegral[c +
d*x])/b, x] + Dist[d/b, Int[(Cos[a + b*x]*Cos[c + d*x])/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x]

Rule 6741

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.35, size = 96, normalized size = 0.62 \[ -\frac {2 \left (a^2-b^2 x^2\right ) \text {Ci}(a+b x)^2-2 \text {Ci}(2 (a+b x))+4 \text {Ci}(a+b x) ((b x-a) \sin (a+b x)+\cos (a+b x))+4 a \text {Si}(2 (a+b x))-2 \log (a+b x)+\cos (2 (a+b x))}{4 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*CosIntegral[a + b*x]^2,x]

[Out]

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

________________________________________________________________________________________

fricas [F]  time = 3.14, size = 0, normalized size = 0.00 \[ {\rm integral}\left (x \operatorname {Ci}\left (b x + a\right )^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*Ci(b*x+a)^2,x, algorithm="fricas")

[Out]

integral(x*cos_integral(b*x + a)^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x {\rm Ci}\left (b x + a\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x*Ci(b*x + a)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 136, normalized size = 0.88 \[ \frac {x^{2} \Ci \left (b x +a \right )^{2}}{2}-\frac {\Ci \left (b x +a \right )^{2} a^{2}}{2 b^{2}}-\frac {\Ci \left (b x +a \right ) \cos \left (b x +a \right )}{b^{2}}-\frac {x \Ci \left (b x +a \right ) \sin \left (b x +a \right )}{b}+\frac {a \Ci \left (b x +a \right ) \sin \left (b x +a \right )}{b^{2}}+\frac {\ln \left (b x +a \right )}{2 b^{2}}+\frac {\Ci \left (2 b x +2 a \right )}{2 b^{2}}-\frac {\cos ^{2}\left (b x +a \right )}{2 b^{2}}-\frac {a \Si \left (2 b x +2 a \right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*Ci(b*x+a)^2,x)

[Out]

1/2*x^2*Ci(b*x+a)^2-1/2/b^2*Ci(b*x+a)^2*a^2-Ci(b*x+a)*cos(b*x+a)/b^2-x*Ci(b*x+a)*sin(b*x+a)/b+a*Ci(b*x+a)*sin(
b*x+a)/b^2+1/2*ln(b*x+a)/b^2+1/2*Ci(2*b*x+2*a)/b^2-1/2/b^2*cos(b*x+a)^2-a*Si(2*b*x+2*a)/b^2

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x {\rm Ci}\left (b x + a\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*Ci(b*x+a)^2,x, algorithm="maxima")

[Out]

integrate(x*Ci(b*x + a)^2, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x\,{\mathrm {cosint}\left (a+b\,x\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cosint(a + b*x)^2,x)

[Out]

int(x*cosint(a + b*x)^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {Ci}^{2}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*Ci(b*x+a)**2,x)

[Out]

Integral(x*Ci(a + b*x)**2, x)

________________________________________________________________________________________