3.900 \(\int (1+\cot ^2(9 x))^2 (1+\tan ^2(9 x))^3 \, dx\)

Optimal. Leaf size=47 \[ \frac {1}{45} \tan ^5(9 x)+\frac {4}{27} \tan ^3(9 x)+\frac {2}{3} \tan (9 x)-\frac {1}{27} \cot ^3(9 x)-\frac {4}{9} \cot (9 x) \]

[Out]

-4/9*cot(9*x)-1/27*cot(9*x)^3+2/3*tan(9*x)+4/27*tan(9*x)^3+1/45*tan(9*x)^5

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3657, 2620, 270} \[ \frac {1}{45} \tan ^5(9 x)+\frac {4}{27} \tan ^3(9 x)+\frac {2}{3} \tan (9 x)-\frac {1}{27} \cot ^3(9 x)-\frac {4}{9} \cot (9 x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + Cot[9*x]^2)^2*(1 + Tan[9*x]^2)^3,x]

[Out]

(-4*Cot[9*x])/9 - Cot[9*x]^3/27 + (2*Tan[9*x])/3 + (4*Tan[9*x]^3)/27 + Tan[9*x]^5/45

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2620

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rubi steps

\begin {align*} \int \left (1+\cot ^2(9 x)\right )^2 \left (1+\tan ^2(9 x)\right )^3 \, dx &=\int \left (1+\cot ^2(9 x)\right )^2 \sec ^6(9 x) \, dx\\ &=\int \csc ^4(9 x) \sec ^6(9 x) \, dx\\ &=\frac {1}{9} \operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^4}{x^4} \, dx,x,\tan (9 x)\right )\\ &=\frac {1}{9} \operatorname {Subst}\left (\int \left (6+\frac {1}{x^4}+\frac {4}{x^2}+4 x^2+x^4\right ) \, dx,x,\tan (9 x)\right )\\ &=-\frac {4}{9} \cot (9 x)-\frac {1}{27} \cot ^3(9 x)+\frac {2}{3} \tan (9 x)+\frac {4}{27} \tan ^3(9 x)+\frac {1}{45} \tan ^5(9 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 59, normalized size = 1.26 \[ \frac {73}{135} \tan (9 x)-\frac {11}{27} \cot (9 x)-\frac {1}{27} \cot (9 x) \csc ^2(9 x)+\frac {1}{45} \tan (9 x) \sec ^4(9 x)+\frac {14}{135} \tan (9 x) \sec ^2(9 x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Cot[9*x]^2)^2*(1 + Tan[9*x]^2)^3,x]

[Out]

(-11*Cot[9*x])/27 - (Cot[9*x]*Csc[9*x]^2)/27 + (73*Tan[9*x])/135 + (14*Sec[9*x]^2*Tan[9*x])/135 + (Sec[9*x]^4*
Tan[9*x])/45

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 42, normalized size = 0.89 \[ \frac {3 \, \tan \left (9 \, x\right )^{8} + 20 \, \tan \left (9 \, x\right )^{6} + 90 \, \tan \left (9 \, x\right )^{4} - 60 \, \tan \left (9 \, x\right )^{2} - 5}{135 \, \tan \left (9 \, x\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cot(9*x)^2)^2*(1+tan(9*x)^2)^3,x, algorithm="fricas")

[Out]

1/135*(3*tan(9*x)^8 + 20*tan(9*x)^6 + 90*tan(9*x)^4 - 60*tan(9*x)^2 - 5)/tan(9*x)^3

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cot(9*x)^2)^2*(1+tan(9*x)^2)^3,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [A]  time = 0.14, size = 38, normalized size = 0.81 \[ -\frac {4 \cot \left (9 x \right )}{9}-\frac {\left (\cot ^{3}\left (9 x \right )\right )}{27}+\frac {2 \tan \left (9 x \right )}{3}+\frac {4 \left (\tan ^{3}\left (9 x \right )\right )}{27}+\frac {\left (\tan ^{5}\left (9 x \right )\right )}{45} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+cot(9*x)^2)^2*(1+tan(9*x)^2)^3,x)

[Out]

-4/9*cot(9*x)-1/27*cot(9*x)^3+2/3*tan(9*x)+4/27*tan(9*x)^3+1/45*tan(9*x)^5

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 41, normalized size = 0.87 \[ \frac {1}{45} \, \tan \left (9 \, x\right )^{5} + \frac {4}{27} \, \tan \left (9 \, x\right )^{3} - \frac {12 \, \tan \left (9 \, x\right )^{2} + 1}{27 \, \tan \left (9 \, x\right )^{3}} + \frac {2}{3} \, \tan \left (9 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cot(9*x)^2)^2*(1+tan(9*x)^2)^3,x, algorithm="maxima")

[Out]

1/45*tan(9*x)^5 + 4/27*tan(9*x)^3 - 1/27*(12*tan(9*x)^2 + 1)/tan(9*x)^3 + 2/3*tan(9*x)

________________________________________________________________________________________

mupad [B]  time = 5.38, size = 42, normalized size = 0.89 \[ \frac {3\,{\mathrm {tan}\left (9\,x\right )}^8+20\,{\mathrm {tan}\left (9\,x\right )}^6+90\,{\mathrm {tan}\left (9\,x\right )}^4-60\,{\mathrm {tan}\left (9\,x\right )}^2-5}{135\,{\mathrm {tan}\left (9\,x\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(9*x)^2 + 1)^3*(cot(9*x)^2 + 1)^2,x)

[Out]

(90*tan(9*x)^4 - 60*tan(9*x)^2 + 20*tan(9*x)^6 + 3*tan(9*x)^8 - 5)/(135*tan(9*x)^3)

________________________________________________________________________________________

sympy [A]  time = 5.20, size = 44, normalized size = 0.94 \[ \frac {\tan ^{5}{\left (9 x \right )}}{45} + \frac {4 \tan ^{3}{\left (9 x \right )}}{27} + \frac {2 \tan {\left (9 x \right )}}{3} - \frac {4}{9 \tan {\left (9 x \right )}} - \frac {1}{27 \tan ^{3}{\left (9 x \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+cot(9*x)**2)**2*(1+tan(9*x)**2)**3,x)

[Out]

tan(9*x)**5/45 + 4*tan(9*x)**3/27 + 2*tan(9*x)/3 - 4/(9*tan(9*x)) - 1/(27*tan(9*x)**3)

________________________________________________________________________________________