3.829 \(\int 4 x \sec ^2(2 x) \, dx\)

Optimal. Leaf size=13 \[ 2 x \tan (2 x)+\log (\cos (2 x)) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0200766, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {12, 4184, 3475} \[ 2 x \tan (2 x)+\log (\cos (2 x)) \]

Antiderivative was successfully verified.

[In]

Int[4*x*Sec[2*x]^2,x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int 4 x \sec ^2(2 x) \, dx &=4 \int x \sec ^2(2 x) \, dx\\ &=2 x \tan (2 x)-2 \int \tan (2 x) \, dx\\ &=\log (\cos (2 x))+2 x \tan (2 x)\\ \end{align*}

Mathematica [A]  time = 0.0071375, size = 21, normalized size = 1.62 \[ 4 \left (\frac{1}{2} x \tan (2 x)+\frac{1}{4} \log (\cos (2 x))\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[4*x*Sec[2*x]^2,x]

[Out]

4*(Log[Cos[2*x]]/4 + (x*Tan[2*x])/2)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 14, normalized size = 1.1 \begin{align*} \ln \left ( \cos \left ( 2\,x \right ) \right ) +2\,x\tan \left ( 2\,x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(4*x*sec(2*x)^2,x)

[Out]

ln(cos(2*x))+2*x*tan(2*x)

________________________________________________________________________________________

Maxima [B]  time = 1.47006, size = 100, normalized size = 7.69 \begin{align*} \frac{{\left (\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1\right )} \log \left (\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1\right ) + 8 \, x \sin \left (4 \, x\right )}{2 \,{\left (\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4*x*sec(2*x)^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.50494, size = 69, normalized size = 5.31 \begin{align*} \frac{\cos \left (2 \, x\right ) \log \left (-\cos \left (2 \, x\right )\right ) + 2 \, x \sin \left (2 \, x\right )}{\cos \left (2 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4*x*sec(2*x)^2,x, algorithm="fricas")

[Out]

(cos(2*x)*log(-cos(2*x)) + 2*x*sin(2*x))/cos(2*x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} 4 \int x \sec ^{2}{\left (2 x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4*x*sec(2*x)**2,x)

[Out]

4*Integral(x*sec(2*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.10374, size = 109, normalized size = 8.38 \begin{align*} \frac{\log \left (\frac{4 \,{\left (\tan \left (x\right )^{4} - 2 \, \tan \left (x\right )^{2} + 1\right )}}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) \tan \left (x\right )^{2} - 8 \, x \tan \left (x\right ) - \log \left (\frac{4 \,{\left (\tan \left (x\right )^{4} - 2 \, \tan \left (x\right )^{2} + 1\right )}}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right )}{2 \,{\left (\tan \left (x\right )^{2} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(4*x*sec(2*x)^2,x, algorithm="giac")

[Out]

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