\(\int \csc ^4(x) \sin (4 x) \, dx\) [372]

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

Optimal result

Integrand size = 9, antiderivative size = 12 \[ \int \csc ^4(x) \sin (4 x) \, dx=-2 \csc ^2(x)-8 \log (\sin (x)) \]

[Out]

-2*csc(x)^2-8*ln(sin(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14} \[ \int \csc ^4(x) \sin (4 x) \, dx=-2 \csc ^2(x)-8 \log (\sin (x)) \]

[In]

Int[Csc[x]^4*Sin[4*x],x]

[Out]

-2*Csc[x]^2 - 8*Log[Sin[x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00 \[ \int \csc ^4(x) \sin (4 x) \, dx=-2 \csc ^2(x)-8 \log (\sin (x)) \]

[In]

Integrate[Csc[x]^4*Sin[4*x],x]

[Out]

-2*Csc[x]^2 - 8*Log[Sin[x]]

Maple [A] (verified)

Time = 2.12 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.58

method result size
default \(\frac {2}{\sin \left (x \right )^{2}}-4 \left (\cot ^{2}\left (x \right )\right )-8 \ln \left (\sin \left (x \right )\right )\) \(19\)
risch \(8 i x +\frac {8 \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}-8 \ln \left ({\mathrm e}^{2 i x}-1\right )\) \(32\)

[In]

int(sin(4*x)/sin(x)^4,x,method=_RETURNVERBOSE)

[Out]

2/sin(x)^2-4*cot(x)^2-8*ln(sin(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (12) = 24\).

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 2.08 \[ \int \csc ^4(x) \sin (4 x) \, dx=-\frac {2 \, {\left (4 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (x\right )\right ) - 1\right )}}{\cos \left (x\right )^{2} - 1} \]

[In]

integrate(sin(4*x)/sin(x)^4,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 2.49 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.17 \[ \int \csc ^4(x) \sin (4 x) \, dx=- 8 \log {\left (\sin {\left (x \right )} \right )} - \frac {2}{\sin ^{2}{\left (x \right )}} \]

[In]

integrate(sin(4*x)/sin(x)**4,x)

[Out]

-8*log(sin(x)) - 2/sin(x)**2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.58 \[ \int \csc ^4(x) \sin (4 x) \, dx=-\frac {2}{\sin \left (x\right )^{2}} - 2 \, \log \left (\sin \left (x\right )^{2}\right ) - 4 \, \log \left (\sin \left (x\right )\right ) \]

[In]

integrate(sin(4*x)/sin(x)^4,x, algorithm="maxima")

[Out]

-2/sin(x)^2 - 2*log(sin(x)^2) - 4*log(sin(x))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \csc ^4(x) \sin (4 x) \, dx=-\frac {2}{\sin \left (x\right )^{2}} - 8 \, \log \left ({\left | \sin \left (x\right ) \right |}\right ) \]

[In]

integrate(sin(4*x)/sin(x)^4,x, algorithm="giac")

[Out]

-2/sin(x)^2 - 8*log(abs(sin(x)))

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 35, normalized size of antiderivative = 2.92 \[ \int \csc ^4(x) \sin (4 x) \, dx=8\,\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )-8\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )-\frac {1}{2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{2} \]

[In]

int(sin(4*x)/sin(x)^4,x)

[Out]

8*log(tan(x/2)^2 + 1) - 8*log(tan(x/2)) - 1/(2*tan(x/2)^2) - tan(x/2)^2/2