\(\int \operatorname {CosIntegral}(d (a+b \log (c x^n))) \, dx\) [102]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 13, antiderivative size = 124 \[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(1-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{2} e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(1+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {6659, 12, 4584, 2347, 2209} \[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(1-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{2} x e^{-\frac {a}{b n}} \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(i b d n+1) \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \]

[In]

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

[Out]

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

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 4584

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

Rule 6659

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

Rubi steps \begin{align*} \text {integral}& = x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-(b d n) \int \frac {\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 \\ & = x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-(b n) \int \frac {\cos \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{a+b \log \left (c x^n\right )} \, dx \\ & = x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} \left (b e^{-i a d} n x^{i b d n} \left (c x^n\right )^{-i b d}\right ) \int \frac {x^{-i b d n}}{a+b \log \left (c x^n\right )} \, dx-\frac {1}{2} \left (b e^{i a d} n x^{-i b d n} \left (c x^n\right )^{i b d}\right ) \int \frac {x^{i b d n}}{a+b \log \left (c x^n\right )} \, dx \\ & = x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} \left (b e^{-i a d} x \left (c x^n\right )^{-i b d-\frac {1-i b d n}{n}}\right ) \text {Subst}\left (\int \frac {e^{\frac {(1-i b d n) x}{n}}}{a+b x} \, dx,x,\log \left (c x^n\right )\right )-\frac {1}{2} \left (b e^{i a d} x \left (c x^n\right )^{i b d-\frac {1+i b d n}{n}}\right ) \text {Subst}\left (\int \frac {e^{\frac {(1+i b d n) x}{n}}}{a+b x} \, dx,x,\log \left (c x^n\right )\right ) \\ & = x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(1-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )-\frac {1}{2} e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {(1+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 1.11 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.79 \[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=x \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right )-\frac {1}{2} e^{-\frac {a}{b n}} x \left (c x^n\right )^{-1/n} \left (\operatorname {ExpIntegralEi}\left (\frac {(1-i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )+\operatorname {ExpIntegralEi}\left (\frac {(1+i b d n) \left (a+b \log \left (c x^n\right )\right )}{b n}\right )\right ) \]

[In]

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

[Out]

x*CosIntegral[d*(a + b*Log[c*x^n])] - (x*(ExpIntegralEi[((1 - I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)] + ExpIntegra
lEi[((1 + I*b*d*n)*(a + b*Log[c*x^n]))/(b*n)]))/(2*E^(a/(b*n))*(c*x^n)^n^(-1))

Maple [F]

\[\int \operatorname {Ci}\left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )d x\]

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 445 vs. \(2 (114) = 228\).

Time = 0.29 (sec) , antiderivative size = 445, normalized size of antiderivative = 3.59 \[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=-\frac {1}{2} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {\log \left (c\right )}{n} - \frac {a}{b n} - \frac {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 + i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{2} \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {\log \left (c\right )}{n} - \frac {a}{b n} + \frac {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 - i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + \frac {1}{2} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {\log \left (c\right )}{n} - \frac {a}{b n} - \frac {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 + i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) - \frac {1}{2} i \, \pi \sqrt {b^{2} d^{2} n^{2}} e^{\left (-\frac {\log \left (c\right )}{n} - \frac {a}{b n} + \frac {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 - i\right )} \sqrt {b^{2} d^{2} n^{2}}}{\pi b^{2} d^{2} n^{2}}\right ) + x \operatorname {C}\left (b d \log \left (c x^{n}\right ) + a d\right ) \]

[In]

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

[Out]

-1/2*pi*sqrt(b^2*d^2*n^2)*e^(-log(c)/n - a/(b*n) - 1/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 + I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2)) - 1/2*pi*sqrt(b^2*d^2*n^2)*e^(-l
og(c)/n - a/(b*n) + 1/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 - I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2)) + 1/2*I*pi*sqrt(b^2*d^2*n^2)*e^(-log(c)/n - a/(b*n) - 1/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 + I)*sqrt(b^2*d^2*n^2)/
(pi*b^2*d^2*n^2)) - 1/2*I*pi*sqrt(b^2*d^2*n^2)*e^(-log(c)/n - a/(b*n) + 1/2*I/(pi*b^2*d^2*n^2))*fresnel_sin((p
i*b^2*d^2*n^2*log(x) + pi*b^2*d^2*n*log(c) + pi*a*b*d^2*n - I)*sqrt(b^2*d^2*n^2)/(pi*b^2*d^2*n^2)) + x*fresnel
_cos(b*d*log(c*x^n) + a*d)

Sympy [F]

\[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int \operatorname {Ci}{\left (d \left (a + b \log {\left (c x^{n} \right )}\right ) \right )}\, dx \]

[In]

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

[Out]

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

Maxima [F]

\[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int { \operatorname {C}\left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right ) \,d x } \]

[In]

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

[Out]

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

Giac [F]

\[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int { \operatorname {C}\left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right ) \,d x } \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \operatorname {CosIntegral}\left (d \left (a+b \log \left (c x^n\right )\right )\right ) \, dx=\int \mathrm {cosint}\left (d\,\left (a+b\,\ln \left (c\,x^n\right )\right )\right ) \,d x \]

[In]

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

[Out]

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