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

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

[Out]

-ArcTanh[Sin[x]]/2 + (Sec[x]*Tan[x])/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0236035, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286 \[ \frac{1}{2} \tan (x) \sec (x)-\frac{1}{2} \tanh ^{-1}(\sin (x)) \]

Antiderivative was successfully verified.

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

[Out]

-ArcTanh[Sin[x]]/2 + (Sec[x]*Tan[x])/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.62858, size = 14, normalized size = 0.88 \[ - \frac{\operatorname{atanh}{\left (\sin{\left (x \right )} \right )}}{2} + \frac{\tan{\left (x \right )}}{2 \cos{\left (x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(sec(x)*tan(x)**2,x)

[Out]

-atanh(sin(x))/2 + tan(x)/(2*cos(x))

_______________________________________________________________________________________

Mathematica [B]  time = 0.0687743, size = 42, normalized size = 2.62 \[ \frac{1}{2} \left (\tan (x) \sec (x)+\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

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

[Out]

(Log[Cos[x/2] - Sin[x/2]] - Log[Cos[x/2] + Sin[x/2]] + Sec[x]*Tan[x])/2

_______________________________________________________________________________________

Maple [A]  time = 0.002, size = 24, normalized size = 1.5 \[{\frac{ \left ( \sin \left ( x \right ) \right ) ^{3}}{2\, \left ( \cos \left ( x \right ) \right ) ^{2}}}+{\frac{\sin \left ( x \right ) }{2}}-{\frac{\ln \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(sec(x)*tan(x)^2,x)

[Out]

1/2*sin(x)^3/cos(x)^2+1/2*sin(x)-1/2*ln(sec(x)+tan(x))

_______________________________________________________________________________________

Maxima [A]  time = 1.33703, size = 36, normalized size = 2.25 \[ -\frac{\sin \left (x\right )}{2 \,{\left (\sin \left (x\right )^{2} - 1\right )}} - \frac{1}{4} \, \log \left (\sin \left (x\right ) + 1\right ) + \frac{1}{4} \, \log \left (\sin \left (x\right ) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.225058, size = 46, normalized size = 2.88 \[ -\frac{\cos \left (x\right )^{2} \log \left (\sin \left (x\right ) + 1\right ) - \cos \left (x\right )^{2} \log \left (-\sin \left (x\right ) + 1\right ) - 2 \, \sin \left (x\right )}{4 \, \cos \left (x\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.127665, size = 27, normalized size = 1.69 \[ \frac{\log{\left (\sin{\left (x \right )} - 1 \right )}}{4} - \frac{\log{\left (\sin{\left (x \right )} + 1 \right )}}{4} - \frac{\sin{\left (x \right )}}{2 \sin ^{2}{\left (x \right )} - 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sec(x)*tan(x)**2,x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.203761, size = 39, normalized size = 2.44 \[ -\frac{\sin \left (x\right )}{2 \,{\left (\sin \left (x\right )^{2} - 1\right )}} - \frac{1}{4} \,{\rm ln}\left (\sin \left (x\right ) + 1\right ) + \frac{1}{4} \,{\rm ln}\left (-\sin \left (x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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