3.1.100 \(\int x^2 \text {CosIntegral}(d (a+b \log (c x^n))) \, dx\) [100]

Optimal. Leaf size=133 \[ \frac {1}{3} x^3 \text {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(3-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{6} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(3+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \]

[Out]

1/3*x^3*Ci(d*(a+b*ln(c*x^n)))-1/6*x^3*Ei((3-I*b*d*n)*(a+b*ln(c*x^n))/b/n)/exp(3*a/b/n)/((c*x^n)^(3/n))-1/6*x^3
*Ei((3+I*b*d*n)*(a+b*ln(c*x^n))/b/n)/exp(3*a/b/n)/((c*x^n)^(3/n))

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {6662, 12, 4586, 2347, 2209} \begin {gather*} \frac {1}{3} x^3 \text {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(3-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{6} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(i b d n+3) \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*CosIntegral[d*(a + b*Log[c*x^n])],x]

[Out]

(x^3*CosIntegral[d*(a + b*Log[c*x^n])])/3 - (x^3*ExpIntegralEi[((3 - I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)])/(6*E
^((3*a)/(b*n))*(c*x^n)^(3/n)) - (x^3*ExpIntegralEi[((3 + I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)])/(6*E^((3*a)/(b*n
))*(c*x^n)^(3/n))

Rule 12

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

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 4586

Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]*(((e_.) + Log[(g_.)*(x_)^(m_.)]*(f_.))*(h_.))^(q_.)*((i_.
)*(x_))^(r_.), x_Symbol] :> Dist[((i*x)^r*(1/((c*x^n)^(I*b*d)*(2*x^(r - I*b*d*n)))))/E^(I*a*d), Int[x^(r - I*b
*d*n)*(h*(e + f*Log[g*x^m]))^q, x], x] + Dist[E^(I*a*d)*(i*x)^r*((c*x^n)^(I*b*d)/(2*x^(r + I*b*d*n))), Int[x^(
r + I*b*d*n)*(h*(e + f*Log[g*x^m]))^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, m, n, q, r}, x]

Rule 6662

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

Rubi steps

\begin {align*} \int x^2 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx &=\frac {1}{3} x^3 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{3} (b d n) \int \frac {x^2 \cos \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{d \left (a+b \log \left (c x^n\right )\right )} \, dx\\ &=\frac {1}{3} x^3 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{3} (b n) \int \frac {x^2 \cos \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{a+b \log \left (c x^n\right )} \, dx\\ &=\frac {1}{3} x^3 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} \left (b e^{-i a d} n x^{i b d n} \left (c x^n\right )^{-i b d}\right ) \int \frac {x^{2-i b d n}}{a+b \log \left (c x^n\right )} \, dx-\frac {1}{6} \left (b e^{i a d} n x^{-i b d n} \left (c x^n\right )^{i b d}\right ) \int \frac {x^{2+i b d n}}{a+b \log \left (c x^n\right )} \, dx\\ &=\frac {1}{3} x^3 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} \left (b e^{-i a d} x^3 \left (c x^n\right )^{-i b d-\frac {3-i b d n}{n}}\right ) \text {Subst}\left (\int \frac {e^{\frac {(3-i b d n) x}{n}}}{a+b x} \, dx,x,\log \left (c x^n\right )\right )-\frac {1}{6} \left (b e^{i a d} x^3 \left (c x^n\right )^{i b d-\frac {3+i b d n}{n}}\right ) \text {Subst}\left (\int \frac {e^{\frac {(3+i b d n) x}{n}}}{a+b x} \, dx,x,\log \left (c x^n\right )\right )\\ &=\frac {1}{3} x^3 \text {Ci}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{6} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(3-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{6} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \text {Ei}\left (\frac {(3+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.00, size = 102, normalized size = 0.77 \begin {gather*} \frac {1}{6} x^3 \left (2 \text {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (\text {Ei}\left (\frac {(3-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )+\text {Ei}\left (\frac {(3+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*CosIntegral[d*(a + b*Log[c*x^n])],x]

[Out]

(x^3*(2*CosIntegral[d*(a + b*Log[c*x^n])] - (ExpIntegralEi[((3 - I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)] + ExpInte
gralEi[((3 + I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)])/(E^((3*a)/(b*n))*(c*x^n)^(3/n))))/6

________________________________________________________________________________________

Maple [F]
time = 0.26, size = 0, normalized size = 0.00 \[\int x^{2} \cosineIntegral \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*Ci(d*(a+b*ln(c*x^n))),x)

[Out]

int(x^2*Ci(d*(a+b*ln(c*x^n))),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*fresnel_cos(d*(a+b*log(c*x^n))),x, algorithm="maxima")

[Out]

integrate(x^2*fresnel_cos((b*log(c*x^n) + a)*d), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 448 vs. \(2 (125) = 250\).
time = 0.41, size = 448, normalized size = 3.37 \begin {gather*} \frac {1}{3} \, x^{3} \operatorname {C}\left (b d \log \left (c x^{n}\right ) + a d\right ) - \frac {1}{6} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} - \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {C}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n + 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{6} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} + \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {C}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n - 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + \frac {1}{6} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} - \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {S}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n + 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{6} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {3 \, \log \left (c\right )}{n} - \frac {3 \, a}{b n} + \frac {9 i}{2 \, \pi b^{2} d^{2} n^{2}}\right )} \operatorname {S}\left (\frac {{\left (\pi b^{2} d^{2} n^{2} \log \left (x\right ) + \pi b^{2} d^{2} n \log \left (c\right ) + \pi a b d^{2} n - 3 i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*fresnel_cos(d*(a+b*log(c*x^n))),x, algorithm="fricas")

[Out]

1/3*x^3*fresnel_cos(b*d*log(c*x^n) + a*d) - 1/6*pi*sqrt(b^2*d^2*n^2)*e^(-3*log(c)/n - 3*a/(b*n) - 9/2*I/(pi*b^
2*d^2*n^2))*fresnel_cos((pi*b^2*d^2*n^2*log(x) + pi*b^2*d^2*n*log(c) + pi*a*b*d^2*n + 3*I)*sqrt(b^2*d^2*n^2)/(
pi*b^2*d^2*n^2)) - 1/6*pi*sqrt(b^2*d^2*n^2)*e^(-3*log(c)/n - 3*a/(b*n) + 9/2*I/(pi*b^2*d^2*n^2))*fresnel_cos((
pi*b^2*d^2*n^2*log(x) + pi*b^2*d^2*n*log(c) + pi*a*b*d^2*n - 3*I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2)) + 1/6*I*
pi*sqrt(b^2*d^2*n^2)*e^(-3*log(c)/n - 3*a/(b*n) - 9/2*I/(pi*b^2*d^2*n^2))*fresnel_sin((pi*b^2*d^2*n^2*log(x) +
 pi*b^2*d^2*n*log(c) + pi*a*b*d^2*n + 3*I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2)) - 1/6*I*pi*sqrt(b^2*d^2*n^2)*e^
(-3*log(c)/n - 3*a/(b*n) + 9/2*I/(pi*b^2*d^2*n^2))*fresnel_sin((pi*b^2*d^2*n^2*log(x) + pi*b^2*d^2*n*log(c) +
pi*a*b*d^2*n - 3*I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \operatorname {Ci}{\left (a d + b d \log {\left (c x^{n} \right )} \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*Ci(d*(a+b*ln(c*x**n))),x)

[Out]

Integral(x**2*Ci(a*d + b*d*log(c*x**n)), x)

________________________________________________________________________________________

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^2*fresnel_cos(d*(a+b*log(c*x^n))),x, algorithm="giac")

[Out]

integrate(x^2*fresnel_cos((b*log(c*x^n) + a)*d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,\mathrm {cosint}\left (d\,\left (a+b\,\ln \left (c\,x^n\right )\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cosint(d*(a + b*log(c*x^n))),x)

[Out]

int(x^2*cosint(d*(a + b*log(c*x^n))), x)

________________________________________________________________________________________