\(\int (\tan ^3(x)+\tan ^5(x)) \, dx\) [841]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 8 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {\tan ^4(x)}{4} \]

[Out]

1/4*tan(x)^4

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3554, 3556} \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {\tan ^4(x)}{4} \]

[In]

Int[Tan[x]^3 + Tan[x]^5,x]

[Out]

Tan[x]^4/4

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \int \tan ^3(x) \, dx+\int \tan ^5(x) \, dx \\ & = \frac {\tan ^2(x)}{2}+\frac {\tan ^4(x)}{4}-\int \tan (x) \, dx-\int \tan ^3(x) \, dx \\ & = \log (\cos (x))+\frac {\tan ^4(x)}{4}+\int \tan (x) \, dx \\ & = \frac {\tan ^4(x)}{4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {\tan ^4(x)}{4} \]

[In]

Integrate[Tan[x]^3 + Tan[x]^5,x]

[Out]

Tan[x]^4/4

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.88

method result size
derivativedivides \(\frac {\tan \left (x \right )^{4}}{4}\) \(7\)
default \(\frac {\tan \left (x \right )^{4}}{4}\) \(7\)
norman \(\frac {\tan \left (x \right )^{4}}{4}\) \(7\)
parallelrisch \(\frac {\tan \left (x \right )^{4}}{4}\) \(7\)
parts \(\frac {\tan \left (x \right )^{4}}{4}\) \(7\)
risch \(-\frac {2 \left ({\mathrm e}^{6 i x}+{\mathrm e}^{2 i x}\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{4}}\) \(23\)

[In]

int(tan(x)^3+tan(x)^5,x,method=_RETURNVERBOSE)

[Out]

1/4*tan(x)^4

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {1}{4} \, \tan \left (x\right )^{4} \]

[In]

integrate(tan(x)^3+tan(x)^5,x, algorithm="fricas")

[Out]

1/4*tan(x)^4

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 22 vs. \(2 (5) = 10\).

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 2.75 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=- \frac {4 \cos ^{2}{\left (x \right )} - 1}{4 \cos ^{4}{\left (x \right )}} + \frac {1}{2 \cos ^{2}{\left (x \right )}} \]

[In]

integrate(tan(x)**3+tan(x)**5,x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (6) = 12\).

Time = 0.22 (sec) , antiderivative size = 35, normalized size of antiderivative = 4.38 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {4 \, \sin \left (x\right )^{2} - 3}{4 \, {\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} - \frac {1}{2 \, {\left (\sin \left (x\right )^{2} - 1\right )}} \]

[In]

integrate(tan(x)^3+tan(x)^5,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {1}{4} \, \tan \left (x\right )^{4} \]

[In]

integrate(tan(x)^3+tan(x)^5,x, algorithm="giac")

[Out]

1/4*tan(x)^4

Mupad [B] (verification not implemented)

Time = 26.38 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \left (\tan ^3(x)+\tan ^5(x)\right ) \, dx=\frac {{\mathrm {tan}\left (x\right )}^4}{4} \]

[In]

int(tan(x)^3 + tan(x)^5,x)

[Out]

tan(x)^4/4