3.886 \(\int 2 x \sec ^2(x) \tan (x) \, dx\)

Optimal. Leaf size=11 \[ x \sec ^2(x)-\tan (x) \]

[Out]

x*sec(x)^2-tan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {12, 3757, 3767, 8} \[ x \sec ^2(x)-\tan (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x*Sec[x]^2 - Tan[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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 3757

Int[(x_)^(m_.)*Sec[(a_.) + (b_.)*(x_)^(n_.)]^(p_.)*Tan[(a_.) + (b_.)*(x_)^(n_.)]^(q_.), x_Symbol] :> Simp[(x^(
m - n + 1)*Sec[a + b*x^n]^p)/(b*n*p), x] - Dist[(m - n + 1)/(b*n*p), Int[x^(m - n)*Sec[a + b*x^n]^p, x], x] /;
 FreeQ[{a, b, p}, x] && IntegerQ[n] && GeQ[m, n] && EqQ[q, 1]

Rule 3767

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

Rubi steps

\begin {align*} \int 2 x \sec ^2(x) \tan (x) \, dx &=2 \int x \sec ^2(x) \tan (x) \, dx\\ &=x \sec ^2(x)-\int \sec ^2(x) \, dx\\ &=x \sec ^2(x)+\operatorname {Subst}(\int 1 \, dx,x,-\tan (x))\\ &=x \sec ^2(x)-\tan (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 1.64 \[ 2 \left (\frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

2*((x*Sec[x]^2)/2 - Tan[x]/2)

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 15, normalized size = 1.36 \[ -\frac {\cos \relax (x) \sin \relax (x) - x}{\cos \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(cos(x)*sin(x) - x)/cos(x)^2

________________________________________________________________________________________

giac [B]  time = 0.13, size = 52, normalized size = 4.73 \[ \frac {x \tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, x \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{3} + x - 2 \, \tan \left (\frac {1}{2} \, x\right )}{\tan \left (\frac {1}{2} \, x\right )^{4} - 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 12, normalized size = 1.09 \[ \frac {x}{\cos \relax (x )^{2}}-\tan \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/cos(x)^2-tan(x)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 133, normalized size = 12.09 \[ \frac {2 \, {\left (4 \, x \cos \left (2 \, x\right )^{2} + 4 \, x \sin \left (2 \, x\right )^{2} + {\left (2 \, x \cos \left (2 \, x\right ) + \sin \left (2 \, x\right )\right )} \cos \left (4 \, x\right ) + 2 \, x \cos \left (2 \, x\right ) + {\left (2 \, x \sin \left (2 \, x\right ) - \cos \left (2 \, x\right ) - 1\right )} \sin \left (4 \, x\right ) - \sin \left (2 \, x\right )\right )}}{2 \, {\left (2 \, \cos \left (2 \, x\right ) + 1\right )} \cos \left (4 \, x\right ) + \cos \left (4 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 4 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) + 4 \, \sin \left (2 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right ) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.09, size = 16, normalized size = 1.45 \[ \frac {2\,x-\sin \left (2\,x\right )}{2\,{\cos \relax (x)}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x*tan(x))/cos(x)^2,x)

[Out]

(2*x - sin(2*x))/(2*cos(x)^2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ 2 \int x \tan {\relax (x )} \sec ^{2}{\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________