\(\int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx\) [301]

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

Optimal result

Integrand size = 17, antiderivative size = 11 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=6 \log (\cos (x))+2 \log (\sin (x)) \]

[Out]

6*ln(cos(x))+2*ln(sin(x))

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4450, 457, 78} \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=2 \log (\sin (x))+6 \log (\cos (x)) \]

[In]

Int[Cos[3*x]*Csc[x]^2*Sec[x]^3*Sin[2*x],x]

[Out]

6*Log[Cos[x]] + 2*Log[Sin[x]]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4450

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_), x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist
[d/(b*c), Subst[Int[SubstFor[(1 - d^2*x^2)^((-n - 1)/2), Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d]
, x] /; FunctionOfQ[Sin[c*(a + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sec] || EqQ[F, sec])

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {2-8 x^2}{x \left (1-x^2\right )} \, dx,x,\sin (x)\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {2-8 x}{(1-x) x} \, dx,x,\sin ^2(x)\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {6}{-1+x}+\frac {2}{x}\right ) \, dx,x,\sin ^2(x)\right ) \\ & = 6 \log (\cos (x))+2 \log (\sin (x)) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=8 \log (\cos (x))+2 \log (\tan (x)) \]

[In]

Integrate[Cos[3*x]*Csc[x]^2*Sec[x]^3*Sin[2*x],x]

[Out]

8*Log[Cos[x]] + 2*Log[Tan[x]]

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

\[-6 \ln \left (\tan \left (x \right )\right )+8 \ln \left (\sin \left (x \right )\right )\]

[In]

int(sin(2*x)*cos(3*x)/sin(x)^2/cos(x)^3,x)

[Out]

-6*ln(tan(x))+8*ln(sin(x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.55 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=3 \, \log \left (\cos \left (x\right )^{2}\right ) + \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right ) \]

[In]

integrate(sin(2*x)*cos(3*x)/sin(x)^2/cos(x)^3,x, algorithm="fricas")

[Out]

3*log(cos(x)^2) + log(-1/4*cos(x)^2 + 1/4)

Sympy [A] (verification not implemented)

Time = 92.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.36 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=3 \log {\left (\sin ^{2}{\left (x \right )} - 1 \right )} + 2 \log {\left (\sin {\left (x \right )} \right )} \]

[In]

integrate(sin(2*x)*cos(3*x)/sin(x)**2/cos(x)**3,x)

[Out]

3*log(sin(x)**2 - 1) + 2*log(sin(x))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (11) = 22\).

Time = 0.28 (sec) , antiderivative size = 54, normalized size of antiderivative = 4.91 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=3 \, \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right ) + \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) \]

[In]

integrate(sin(2*x)*cos(3*x)/sin(x)^2/cos(x)^3,x, algorithm="maxima")

[Out]

3*log(cos(2*x)^2 + sin(2*x)^2 + 2*cos(2*x) + 1) + log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + log(cos(x)^2 + sin
(x)^2 - 2*cos(x) + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.45 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=\log \left (-\cos \left (x\right )^{2} + 1\right ) + 6 \, \log \left ({\left | \cos \left (x\right ) \right |}\right ) \]

[In]

integrate(sin(2*x)*cos(3*x)/sin(x)^2/cos(x)^3,x, algorithm="giac")

[Out]

log(-cos(x)^2 + 1) + 6*log(abs(cos(x)))

Mupad [B] (verification not implemented)

Time = 16.29 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \cos (3 x) \csc ^2(x) \sec ^3(x) \sin (2 x) \, dx=6\,\ln \left (\cos \left (x\right )\right )+\ln \left ({\sin \left (x\right )}^2\right ) \]

[In]

int((cos(3*x)*sin(2*x))/(cos(x)^3*sin(x)^2),x)

[Out]

6*log(cos(x)) + log(sin(x)^2)