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

Optimal. Leaf size=16 \[ \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3757, 3767, 8} \[ \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, 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 x \sec ^2(x) \tan (x) \, dx &=\frac {1}{2} x \sec ^2(x)-\frac {1}{2} \int \sec ^2(x) \, dx\\ &=\frac {1}{2} x \sec ^2(x)+\frac {1}{2} \operatorname {Subst}(\int 1 \, dx,x,-\tan (x))\\ &=\frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 16, normalized size = 1.00 \[ \frac {1}{2} x \sec ^2(x)-\frac {\tan (x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.60, size = 53, normalized size = 3.31 \[ \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 )}{2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{4} - 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(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.34, size = 13, normalized size = 0.81




method result size



default \(\frac {x}{2 \cos \relax (x )^{2}}-\frac {\tan \relax (x )}{2}\) \(13\)
risch \(\frac {2 x \,{\mathrm e}^{2 i x}-i {\mathrm e}^{2 i x}-i}{\left (1+{\mathrm e}^{2 i x}\right )^{2}}\) \(30\)
norman \(\frac {\tan ^{3}\left (\frac {x}{2}\right )+x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\frac {x}{2}+\frac {x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{2}-\tan \left (\frac {x}{2}\right )}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{2}}\) \(45\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.60, size = 132, normalized size = 8.25 \[ \frac {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 )}{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(x*sin(x)/cos(x)^3,x, algorithm="maxima")

[Out]

(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 = 0.35, size = 16, normalized size = 1.00 \[ \frac {2\,x-\sin \left (2\,x\right )}{4\,{\cos \relax (x)}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 1.03, size = 128, normalized size = 8.00 \[ \frac {x \tan ^{4}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {2 x \tan ^{2}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {x}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} + \frac {2 \tan ^{3}{\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} - \frac {2 \tan {\left (\frac {x}{2} \right )}}{2 \tan ^{4}{\left (\frac {x}{2} \right )} - 4 \tan ^{2}{\left (\frac {x}{2} \right )} + 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________