3.353 \(\int \csc ^3(\frac{\pi }{4}+2 x) \sec (\frac{\pi }{4}+2 x) \, dx\)

Optimal. Leaf size=32 \[ \frac{1}{2} \log \left (\tan \left (2 x+\frac{\pi }{4}\right )\right )-\frac{1}{4} \cot ^2\left (2 x+\frac{\pi }{4}\right ) \]

[Out]

-Cot[Pi/4 + 2*x]^2/4 + Log[Tan[Pi/4 + 2*x]]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0212909, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {2620, 14} \[ \frac{1}{2} \log \left (\tan \left (2 x+\frac{\pi }{4}\right )\right )-\frac{1}{4} \cot ^2\left (2 x+\frac{\pi }{4}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Csc[Pi/4 + 2*x]^3*Sec[Pi/4 + 2*x],x]

[Out]

-Cot[Pi/4 + 2*x]^2/4 + Log[Tan[Pi/4 + 2*x]]/2

Rule 2620

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

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*} \int \csc ^3\left (\frac{\pi }{4}+2 x\right ) \sec \left (\frac{\pi }{4}+2 x\right ) \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1+x^2}{x^3} \, dx,x,\tan \left (\frac{\pi }{4}+2 x\right )\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{1}{x^3}+\frac{1}{x}\right ) \, dx,x,\tan \left (\frac{\pi }{4}+2 x\right )\right )\\ &=-\frac{1}{4} \cot ^2\left (\frac{\pi }{4}+2 x\right )+\frac{1}{2} \log \left (\tan \left (\frac{\pi }{4}+2 x\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.0668821, size = 45, normalized size = 1.41 \[ \frac{1}{4} \left (-\csc ^2\left (2 x+\frac{\pi }{4}\right )+2 \log \left (\sin \left (2 x+\frac{\pi }{4}\right )\right )-2 \log \left (\cos \left (\frac{1}{4} (8 x+\pi )\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[Pi/4 + 2*x]^3*Sec[Pi/4 + 2*x],x]

[Out]

(-Csc[Pi/4 + 2*x]^2 - 2*Log[Cos[(Pi + 8*x)/4]] + 2*Log[Sin[Pi/4 + 2*x]])/4

________________________________________________________________________________________

Maple [A]  time = 0.019, size = 25, normalized size = 0.8 \begin{align*} -{\frac{1}{4} \left ( \sin \left ({\frac{\pi }{4}}+2\,x \right ) \right ) ^{-2}}+{\frac{1}{2}\ln \left ( \tan \left ({\frac{\pi }{4}}+2\,x \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cos(1/4*Pi+2*x)/sin(1/4*Pi+2*x)^3,x)

[Out]

-1/4/sin(1/4*Pi+2*x)^2+1/2*ln(tan(1/4*Pi+2*x))

________________________________________________________________________________________

Maxima [A]  time = 0.93955, size = 55, normalized size = 1.72 \begin{align*} -\frac{1}{4 \, \sin \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2}} - \frac{1}{4} \, \log \left (\sin \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2} - 1\right ) + \frac{1}{4} \, \log \left (\sin \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.81058, size = 207, normalized size = 6.47 \begin{align*} -\frac{{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2} - 1\right )} \log \left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2}\right ) -{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2} - 1\right )} \log \left (-\frac{1}{4} \, \cos \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2} + \frac{1}{4}\right ) - 1}{4 \,{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right )^{2} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 1.7433, size = 54, normalized size = 1.69 \begin{align*} - \frac{\log{\left (\tan{\left (x + \frac{\pi }{8} \right )} - 1 \right )}}{2} - \frac{\log{\left (\tan{\left (x + \frac{\pi }{8} \right )} + 1 \right )}}{2} + \frac{\log{\left (\tan{\left (x + \frac{\pi }{8} \right )} \right )}}{2} - \frac{\tan ^{2}{\left (x + \frac{\pi }{8} \right )}}{16} - \frac{1}{16 \tan ^{2}{\left (x + \frac{\pi }{8} \right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(1/4*pi+2*x)/sin(1/4*pi+2*x)**3,x)

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.10798, size = 178, normalized size = 5.56 \begin{align*} -\frac{{\left (\frac{4 \,{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) - 1\right )}}{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) + 1} - 1\right )}{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) + 1\right )}}{16 \,{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) - 1\right )}} + \frac{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) - 1}{16 \,{\left (\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) + 1\right )}} + \frac{1}{4} \, \log \left (-\frac{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) - 1}{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) + 1}\right ) - \frac{1}{2} \, \log \left ({\left | -\frac{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) - 1}{\cos \left (\frac{1}{4} \, \pi + 2 \, x\right ) + 1} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/16*(4*(cos(1/4*pi + 2*x) - 1)/(cos(1/4*pi + 2*x) + 1) - 1)*(cos(1/4*pi + 2*x) + 1)/(cos(1/4*pi + 2*x) - 1)
+ 1/16*(cos(1/4*pi + 2*x) - 1)/(cos(1/4*pi + 2*x) + 1) + 1/4*log(-(cos(1/4*pi + 2*x) - 1)/(cos(1/4*pi + 2*x) +
 1)) - 1/2*log(abs(-(cos(1/4*pi + 2*x) - 1)/(cos(1/4*pi + 2*x) + 1) - 1))