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*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

________________________________________________________________________________________

Rubi [A]  time = 0.102327, antiderivative size = 47, normalized size of antiderivative = 1., 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 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]

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 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]

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.0500226, 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

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 38, normalized size = 0.8 \begin{align*} -{\frac{4\,\cot \left ( 9\,x \right ) }{9}}-{\frac{ \left ( \cot \left ( 9\,x \right ) \right ) ^{3}}{27}}+{\frac{2\,\tan \left ( 9\,x \right ) }{3}}+{\frac{4\, \left ( \tan \left ( 9\,x \right ) \right ) ^{3}}{27}}+{\frac{ \left ( \tan \left ( 9\,x \right ) \right ) ^{5}}{45}} \end{align*}

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.949618, size = 55, normalized size = 1.17 \begin{align*} \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 ) \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 2.06821, size = 115, normalized size = 2.45 \begin{align*} \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}} \end{align*}

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

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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