3.106 \(\int \tan ^3(x) \, dx\)

Optimal. Leaf size=12 \[ \frac{\tan ^2(x)}{2}+\log (\cos (x)) \]

[Out]

Log[Cos[x]] + Tan[x]^2/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0104932, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5 \[ \frac{\tan ^2(x)}{2}+\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]  Int[Tan[x]^3,x]

[Out]

Log[Cos[x]] + Tan[x]^2/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.493171, size = 10, normalized size = 0.83 \[ \log{\left (\cos{\left (x \right )} \right )} + \frac{\tan ^{2}{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(tan(x)**3,x)

[Out]

log(cos(x)) + tan(x)**2/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.00474791, size = 12, normalized size = 1. \[ \frac{\sec ^2(x)}{2}+\log (\cos (x)) \]

Antiderivative was successfully verified.

[In]  Integrate[Tan[x]^3,x]

[Out]

Log[Cos[x]] + Sec[x]^2/2

_______________________________________________________________________________________

Maple [A]  time = 0.002, size = 17, normalized size = 1.4 \[{\frac{ \left ( \tan \left ( x \right ) \right ) ^{2}}{2}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(tan(x)^3,x)

[Out]

1/2*tan(x)^2-1/2*ln(1+tan(x)^2)

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x)^3,x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.221943, size = 24, normalized size = 2. \[ \frac{1}{2} \, \tan \left (x\right )^{2} + \frac{1}{2} \, \log \left (\frac{1}{\tan \left (x\right )^{2} + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x)^3,x, algorithm="fricas")

[Out]

1/2*tan(x)^2 + 1/2*log(1/(tan(x)^2 + 1))

_______________________________________________________________________________________

Sympy [A]  time = 0.083302, size = 12, normalized size = 1. \[ \log{\left (\cos{\left (x \right )} \right )} + \frac{1}{2 \cos ^{2}{\left (x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x)**3,x)

[Out]

log(cos(x)) + 1/(2*cos(x)**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.19938, size = 22, normalized size = 1.83 \[ \frac{1}{2} \, \tan \left (x\right )^{2} - \frac{1}{2} \,{\rm ln}\left (\tan \left (x\right )^{2} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x)^3,x, algorithm="giac")

[Out]

1/2*tan(x)^2 - 1/2*ln(tan(x)^2 + 1)