3.697 \(\int \frac {\sec ^2(x)}{\tan ^2(x)+\tan ^3(x)} \, dx\)

Optimal. Leaf size=10 \[ \log (\cot (x)+1)-\cot (x) \]

[Out]

-cot(x)+ln(1+cot(x))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 15, normalized size of antiderivative = 1.50, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4342, 44} \[ -\cot (x)-\log (\tan (x))+\log (\tan (x)+1) \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^2/(Tan[x]^2 + Tan[x]^3),x]

[Out]

-Cot[x] - Log[Tan[x]] + Log[1 + Tan[x]]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 4342

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^2, x_Symbol] :> With[{d = FreeFactors[Tan[c*(a + b*x)], x]}, Dist[d/
(b*c), Subst[Int[SubstFor[1, Tan[c*(a + b*x)]/d, u, x], x], x, Tan[c*(a + b*x)]/d], x] /; FunctionOfQ[Tan[c*(a
 + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && NonsumQ[u] && (EqQ[F, Sec] || EqQ[F, sec])

Rubi steps

\begin {align*} \int \frac {\sec ^2(x)}{\tan ^2(x)+\tan ^3(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{x^2 (1+x)} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{x^2}-\frac {1}{x}+\frac {1}{1+x}\right ) \, dx,x,\tan (x)\right )\\ &=-\cot (x)-\log (\tan (x))+\log (1+\tan (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 16, normalized size = 1.60 \[ -\cot (x)-\log (\sin (x))+\log (\sin (x)+\cos (x)) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^2/(Tan[x]^2 + Tan[x]^3),x]

[Out]

-Cot[x] - Log[Sin[x]] + Log[Cos[x] + Sin[x]]

________________________________________________________________________________________

fricas [B]  time = 1.29, size = 36, normalized size = 3.60 \[ -\frac {\log \left (-\frac {1}{4} \, \cos \relax (x)^{2} + \frac {1}{4}\right ) \sin \relax (x) - \log \left (2 \, \cos \relax (x) \sin \relax (x) + 1\right ) \sin \relax (x) + 2 \, \cos \relax (x)}{2 \, \sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(tan(x)^2+tan(x)^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 19, normalized size = 1.90 \[ -\frac {1}{\tan \relax (x)} + \log \left ({\left | \tan \relax (x) + 1 \right |}\right ) - \log \left ({\left | \tan \relax (x) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(tan(x)^2+tan(x)^3),x, algorithm="giac")

[Out]

-1/tan(x) + log(abs(tan(x) + 1)) - log(abs(tan(x)))

________________________________________________________________________________________

maple [A]  time = 0.13, size = 18, normalized size = 1.80 \[ -\frac {1}{\tan \relax (x )}-\ln \left (\tan \relax (x )\right )+\ln \left (1+\tan \relax (x )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^2/(tan(x)^2+tan(x)^3),x)

[Out]

-1/tan(x)-ln(tan(x))+ln(1+tan(x))

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 17, normalized size = 1.70 \[ -\frac {1}{\tan \relax (x)} + \log \left (\tan \relax (x) + 1\right ) - \log \left (\tan \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2/(tan(x)^2+tan(x)^3),x, algorithm="maxima")

[Out]

-1/tan(x) + log(tan(x) + 1) - log(tan(x))

________________________________________________________________________________________

mupad [B]  time = 3.10, size = 16, normalized size = 1.60 \[ 2\,\mathrm {atanh}\left (2\,\mathrm {tan}\relax (x)+1\right )-\frac {1}{\mathrm {tan}\relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^2*(tan(x)^2 + tan(x)^3)),x)

[Out]

2*atanh(2*tan(x) + 1) - 1/tan(x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\relax (x )}}{\left (\tan {\relax (x )} + 1\right ) \tan ^{2}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**2/(tan(x)**2+tan(x)**3),x)

[Out]

Integral(sec(x)**2/((tan(x) + 1)*tan(x)**2), x)

________________________________________________________________________________________