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} \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0288477, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375 \[ \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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.4015, size = 15, normalized size = 0.94 \[ \frac{x}{2 \cos ^{2}{\left (x \right )}} - \frac{\sin{\left (x \right )}}{2 \cos{\left (x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x*sin(x)/cos(x)**3,x)

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.00750552, size = 16, normalized size = 1. \[ \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

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 13, normalized size = 0.8 \[{\frac{x}{2\, \left ( \cos \left ( x \right ) \right ) ^{2}}}-{\frac{\tan \left ( x \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x*sin(x)/cos(x)^3,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.33755, size = 178, normalized size = 11.12 \[ \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)*co
s(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)

_______________________________________________________________________________________

Fricas [A]  time = 0.236553, size = 20, normalized size = 1.25 \[ -\frac{\cos \left (x\right ) \sin \left (x\right ) - x}{2 \, \cos \left (x\right )^{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

_______________________________________________________________________________________

Sympy [A]  time = 2.00223, size = 128, normalized size = 8. \[ \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)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.204393, size = 72, normalized size = 4.5 \[ \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)