\(\int \cos ^3(a+b x) \log (x) \, dx\) [159]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [C] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 11, antiderivative size = 88 \[ \int \cos ^3(a+b x) \log (x) \, dx=-\frac {3 \operatorname {CosIntegral}(b x) \sin (a)}{4 b}-\frac {\operatorname {CosIntegral}(3 b x) \sin (3 a)}{12 b}+\frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {3 \cos (a) \text {Si}(b x)}{4 b}-\frac {\cos (3 a) \text {Si}(3 b x)}{12 b} \]

[Out]

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

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.727, Rules used = {2713, 2634, 12, 6874, 3384, 3380, 3383, 4515} \[ \int \cos ^3(a+b x) \log (x) \, dx=-\frac {3 \sin (a) \operatorname {CosIntegral}(b x)}{4 b}-\frac {\sin (3 a) \operatorname {CosIntegral}(3 b x)}{12 b}-\frac {3 \cos (a) \text {Si}(b x)}{4 b}-\frac {\cos (3 a) \text {Si}(3 b x)}{12 b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}+\frac {\log (x) \sin (a+b x)}{b} \]

[In]

Int[Cos[a + b*x]^3*Log[x],x]

[Out]

(-3*CosIntegral[b*x]*Sin[a])/(4*b) - (CosIntegral[3*b*x]*Sin[3*a])/(12*b) + (Log[x]*Sin[a + b*x])/b - (Log[x]*
Sin[a + b*x]^3)/(3*b) - (3*Cos[a]*SinIntegral[b*x])/(4*b) - (Cos[3*a]*SinIntegral[3*b*x])/(12*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 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3380

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 3383

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 3384

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

Rule 4515

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\int \frac {(5+\cos (2 (a+b x))) \sin (a+b x)}{6 b x} \, dx \\ & = \frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {\int \frac {(5+\cos (2 (a+b x))) \sin (a+b x)}{x} \, dx}{6 b} \\ & = \frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {\int \left (\frac {5 \sin (a+b x)}{x}+\frac {\cos (2 a+2 b x) \sin (a+b x)}{x}\right ) \, dx}{6 b} \\ & = \frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {\int \frac {\cos (2 a+2 b x) \sin (a+b x)}{x} \, dx}{6 b}-\frac {5 \int \frac {\sin (a+b x)}{x} \, dx}{6 b} \\ & = \frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {\int \left (-\frac {\sin (a+b x)}{2 x}+\frac {\sin (3 a+3 b x)}{2 x}\right ) \, dx}{6 b}-\frac {(5 \cos (a)) \int \frac {\sin (b x)}{x} \, dx}{6 b}-\frac {(5 \sin (a)) \int \frac {\cos (b x)}{x} \, dx}{6 b} \\ & = -\frac {5 \text {Ci}(b x) \sin (a)}{6 b}+\frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {5 \cos (a) \text {Si}(b x)}{6 b}+\frac {\int \frac {\sin (a+b x)}{x} \, dx}{12 b}-\frac {\int \frac {\sin (3 a+3 b x)}{x} \, dx}{12 b} \\ & = -\frac {5 \text {Ci}(b x) \sin (a)}{6 b}+\frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {5 \cos (a) \text {Si}(b x)}{6 b}+\frac {\cos (a) \int \frac {\sin (b x)}{x} \, dx}{12 b}-\frac {\cos (3 a) \int \frac {\sin (3 b x)}{x} \, dx}{12 b}+\frac {\sin (a) \int \frac {\cos (b x)}{x} \, dx}{12 b}-\frac {\sin (3 a) \int \frac {\cos (3 b x)}{x} \, dx}{12 b} \\ & = -\frac {3 \text {Ci}(b x) \sin (a)}{4 b}-\frac {\text {Ci}(3 b x) \sin (3 a)}{12 b}+\frac {\log (x) \sin (a+b x)}{b}-\frac {\log (x) \sin ^3(a+b x)}{3 b}-\frac {3 \cos (a) \text {Si}(b x)}{4 b}-\frac {\cos (3 a) \text {Si}(3 b x)}{12 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.75 \[ \int \cos ^3(a+b x) \log (x) \, dx=-\frac {9 \operatorname {CosIntegral}(b x) \sin (a)+\operatorname {CosIntegral}(3 b x) \sin (3 a)-9 \log (x) \sin (a+b x)-\log (x) \sin (3 (a+b x))+9 \cos (a) \text {Si}(b x)+\cos (3 a) \text {Si}(3 b x)}{12 b} \]

[In]

Integrate[Cos[a + b*x]^3*Log[x],x]

[Out]

-1/12*(9*CosIntegral[b*x]*Sin[a] + CosIntegral[3*b*x]*Sin[3*a] - 9*Log[x]*Sin[a + b*x] - Log[x]*Sin[3*(a + b*x
)] + 9*Cos[a]*SinIntegral[b*x] + Cos[3*a]*SinIntegral[3*b*x])/b

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 2.06 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.84

method result size
risch \(\frac {3 \ln \left (x \right ) \sin \left (b x +a \right )}{4 b}+\frac {\ln \left (x \right ) \sin \left (3 b x +3 a \right )}{12 b}+\frac {{\mathrm e}^{-3 i a} \pi \,\operatorname {csgn}\left (b x \right )}{24 b}-\frac {{\mathrm e}^{-3 i a} \operatorname {Si}\left (3 b x \right )}{12 b}+\frac {i {\mathrm e}^{-3 i a} \operatorname {Ei}_{1}\left (-3 i b x \right )}{24 b}+\frac {3 \,{\mathrm e}^{-i a} \pi \,\operatorname {csgn}\left (b x \right )}{8 b}-\frac {3 \,{\mathrm e}^{-i a} \operatorname {Si}\left (b x \right )}{4 b}+\frac {3 i {\mathrm e}^{-i a} \operatorname {Ei}_{1}\left (-i b x \right )}{8 b}-\frac {3 i {\mathrm e}^{i a} \operatorname {Ei}_{1}\left (-i b x \right )}{8 b}-\frac {i {\mathrm e}^{3 i a} \operatorname {Ei}_{1}\left (-3 i b x \right )}{24 b}\) \(162\)

[In]

int(cos(b*x+a)^3*ln(x),x,method=_RETURNVERBOSE)

[Out]

3/4*ln(x)*sin(b*x+a)/b+1/12/b*ln(x)*sin(3*b*x+3*a)+1/24/b*exp(-3*I*a)*Pi*csgn(b*x)-1/12/b*exp(-3*I*a)*Si(3*b*x
)+1/24*I/b*exp(-3*I*a)*Ei(1,-3*I*b*x)+3/8/b*exp(-I*a)*Pi*csgn(b*x)-3/4/b*exp(-I*a)*Si(b*x)+3/8*I/b*exp(-I*a)*E
i(1,-I*b*x)-3/8*I/b*exp(I*a)*Ei(1,-I*b*x)-1/24*I/b*exp(3*I*a)*Ei(1,-3*I*b*x)

Fricas [A] (verification not implemented)

none

Time = 0.40 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.73 \[ \int \cos ^3(a+b x) \log (x) \, dx=\frac {4 \, {\left (\cos \left (b x + a\right )^{2} + 2\right )} \log \left (x\right ) \sin \left (b x + a\right ) - \operatorname {Ci}\left (3 \, b x\right ) \sin \left (3 \, a\right ) - 9 \, \operatorname {Ci}\left (b x\right ) \sin \left (a\right ) - \cos \left (3 \, a\right ) \operatorname {Si}\left (3 \, b x\right ) - 9 \, \cos \left (a\right ) \operatorname {Si}\left (b x\right )}{12 \, b} \]

[In]

integrate(cos(b*x+a)^3*log(x),x, algorithm="fricas")

[Out]

1/12*(4*(cos(b*x + a)^2 + 2)*log(x)*sin(b*x + a) - cos_integral(3*b*x)*sin(3*a) - 9*cos_integral(b*x)*sin(a) -
 cos(3*a)*sin_integral(3*b*x) - 9*cos(a)*sin_integral(b*x))/b

Sympy [F]

\[ \int \cos ^3(a+b x) \log (x) \, dx=\int \log {\left (x \right )} \cos ^{3}{\left (a + b x \right )}\, dx \]

[In]

integrate(cos(b*x+a)**3*ln(x),x)

[Out]

Integral(log(x)*cos(a + b*x)**3, x)

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.26 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.24 \[ \int \cos ^3(a+b x) \log (x) \, dx=-\frac {{\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} \log \left (x\right )}{3 \, b} + \frac {{\left (i \, E_{1}\left (3 i \, b x\right ) - i \, E_{1}\left (-3 i \, b x\right )\right )} \cos \left (3 \, a\right ) - 9 \, {\left (-i \, E_{1}\left (i \, b x\right ) + i \, E_{1}\left (-i \, b x\right )\right )} \cos \left (a\right ) + {\left (E_{1}\left (3 i \, b x\right ) + E_{1}\left (-3 i \, b x\right )\right )} \sin \left (3 \, a\right ) + 9 \, {\left (E_{1}\left (i \, b x\right ) + E_{1}\left (-i \, b x\right )\right )} \sin \left (a\right )}{24 \, b} \]

[In]

integrate(cos(b*x+a)^3*log(x),x, algorithm="maxima")

[Out]

-1/3*(sin(b*x + a)^3 - 3*sin(b*x + a))*log(x)/b + 1/24*((I*exp_integral_e(1, 3*I*b*x) - I*exp_integral_e(1, -3
*I*b*x))*cos(3*a) - 9*(-I*exp_integral_e(1, I*b*x) + I*exp_integral_e(1, -I*b*x))*cos(a) + (exp_integral_e(1,
3*I*b*x) + exp_integral_e(1, -3*I*b*x))*sin(3*a) + 9*(exp_integral_e(1, I*b*x) + exp_integral_e(1, -I*b*x))*si
n(a))/b

Giac [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.36 (sec) , antiderivative size = 495, normalized size of antiderivative = 5.62 \[ \int \cos ^3(a+b x) \log (x) \, dx=\text {Too large to display} \]

[In]

integrate(cos(b*x+a)^3*log(x),x, algorithm="giac")

[Out]

-1/3*(sin(b*x + a)^3 - 3*sin(b*x + a))*log(x)/b + 1/24*(imag_part(cos_integral(3*b*x))*tan(3/2*a)^2*tan(1/2*a)
^2 + 9*imag_part(cos_integral(b*x))*tan(3/2*a)^2*tan(1/2*a)^2 - 9*imag_part(cos_integral(-b*x))*tan(3/2*a)^2*t
an(1/2*a)^2 - imag_part(cos_integral(-3*b*x))*tan(3/2*a)^2*tan(1/2*a)^2 + 2*sin_integral(3*b*x)*tan(3/2*a)^2*t
an(1/2*a)^2 + 18*sin_integral(b*x)*tan(3/2*a)^2*tan(1/2*a)^2 - 18*real_part(cos_integral(b*x))*tan(3/2*a)^2*ta
n(1/2*a) - 18*real_part(cos_integral(-b*x))*tan(3/2*a)^2*tan(1/2*a) - 2*real_part(cos_integral(3*b*x))*tan(3/2
*a)*tan(1/2*a)^2 - 2*real_part(cos_integral(-3*b*x))*tan(3/2*a)*tan(1/2*a)^2 + imag_part(cos_integral(3*b*x))*
tan(3/2*a)^2 - 9*imag_part(cos_integral(b*x))*tan(3/2*a)^2 + 9*imag_part(cos_integral(-b*x))*tan(3/2*a)^2 - im
ag_part(cos_integral(-3*b*x))*tan(3/2*a)^2 + 2*sin_integral(3*b*x)*tan(3/2*a)^2 - 18*sin_integral(b*x)*tan(3/2
*a)^2 - imag_part(cos_integral(3*b*x))*tan(1/2*a)^2 + 9*imag_part(cos_integral(b*x))*tan(1/2*a)^2 - 9*imag_par
t(cos_integral(-b*x))*tan(1/2*a)^2 + imag_part(cos_integral(-3*b*x))*tan(1/2*a)^2 - 2*sin_integral(3*b*x)*tan(
1/2*a)^2 + 18*sin_integral(b*x)*tan(1/2*a)^2 - 2*real_part(cos_integral(3*b*x))*tan(3/2*a) - 2*real_part(cos_i
ntegral(-3*b*x))*tan(3/2*a) - 18*real_part(cos_integral(b*x))*tan(1/2*a) - 18*real_part(cos_integral(-b*x))*ta
n(1/2*a) - imag_part(cos_integral(3*b*x)) - 9*imag_part(cos_integral(b*x)) + 9*imag_part(cos_integral(-b*x)) +
 imag_part(cos_integral(-3*b*x)) - 2*sin_integral(3*b*x) - 18*sin_integral(b*x))/(b*tan(3/2*a)^2*tan(1/2*a)^2
+ b*tan(3/2*a)^2 + b*tan(1/2*a)^2 + b)

Mupad [F(-1)]

Timed out. \[ \int \cos ^3(a+b x) \log (x) \, dx=\int {\cos \left (a+b\,x\right )}^3\,\ln \left (x\right ) \,d x \]

[In]

int(cos(a + b*x)^3*log(x),x)

[Out]

int(cos(a + b*x)^3*log(x), x)