3.437 \(\int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx\)

Optimal. Leaf size=39 \[ -\frac {1}{3} \tan ^3(x) \sqrt {4-\cot ^2(x)}-\frac {2}{3} \tan (x) \sqrt {4-\cot ^2(x)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {12, 434, 453, 191} \[ -\frac {1}{3} \tan ^3(x) \sqrt {4-\cot ^2(x)}-\frac {2}{3} \tan (x) \sqrt {4-\cot ^2(x)} \]

Antiderivative was successfully verified.

[In]

Int[((-3 + Cos[2*x])*Sec[x]^4)/Sqrt[4 - Cot[x]^2],x]

[Out]

(-2*Sqrt[4 - Cot[x]^2]*Tan[x])/3 - (Sqrt[4 - Cot[x]^2]*Tan[x]^3)/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 191

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^(p + 1))/a, x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 434

Int[((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[((a + b*x^n)^p*(d + c*x
^n)^q)/x^(n*q), x] /; FreeQ[{a, b, c, d, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] ||  !IntegerQ[p])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 36, normalized size = 0.92 \[ \frac {(\cos (2 x)+3) (5 \cos (2 x)-3) \csc (x) \sec ^3(x)}{12 \sqrt {4-\cot ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[((-3 + Cos[2*x])*Sec[x]^4)/Sqrt[4 - Cot[x]^2],x]

[Out]

((3 + Cos[2*x])*(-3 + 5*Cos[2*x])*Csc[x]*Sec[x]^3)/(12*Sqrt[4 - Cot[x]^2])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[((-3 + Cos[2*x])*Sec[x]^4)/Sqrt[4 - Cot[x]^2],x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.55, size = 33, normalized size = 0.85 \[ -\frac {{\left (\cos \relax (x)^{2} + 1\right )} \sqrt {\frac {5 \, \cos \relax (x)^{2} - 4}{\cos \relax (x)^{2} - 1}} \sin \relax (x)}{3 \, \cos \relax (x)^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [C]  time = 1.14, size = 340, normalized size = 8.72 \[ -\frac {2 \, {\left (15948 \, \sqrt {5} - 49185 i\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )\right )}{-15296 i \, \sqrt {5} + 98560} + \frac {82 \, \sqrt {5} + \frac {939 \, \sqrt {5} {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}^{2}}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 9\right )}^{2}} + \frac {537 \, \sqrt {5} {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}^{4}}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 9\right )}^{4}} + \frac {975 \, {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} - 9} + \frac {2255 \, {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}^{3}}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 9\right )}^{3}} + \frac {255 \, {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}^{5}}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 9\right )}^{5}}}{96 \, {\left (\frac {\sqrt {5} {\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} - 9} + \frac {{\left (4 \, \sqrt {5} - \sqrt {-\tan \left (\frac {1}{2} \, x\right )^{4} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 1}\right )}^{2}}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 9\right )}^{2}} + 1\right )}^{3} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="giac")

[Out]

-2*(15948*sqrt(5) - 49185*I)*sgn(tan(1/2*x))/(-15296*I*sqrt(5) + 98560) + 1/96*(82*sqrt(5) + 939*sqrt(5)*(4*sq
rt(5) - sqrt(-tan(1/2*x)^4 + 18*tan(1/2*x)^2 - 1))^2/(tan(1/2*x)^2 - 9)^2 + 537*sqrt(5)*(4*sqrt(5) - sqrt(-tan
(1/2*x)^4 + 18*tan(1/2*x)^2 - 1))^4/(tan(1/2*x)^2 - 9)^4 + 975*(4*sqrt(5) - sqrt(-tan(1/2*x)^4 + 18*tan(1/2*x)
^2 - 1))/(tan(1/2*x)^2 - 9) + 2255*(4*sqrt(5) - sqrt(-tan(1/2*x)^4 + 18*tan(1/2*x)^2 - 1))^3/(tan(1/2*x)^2 - 9
)^3 + 255*(4*sqrt(5) - sqrt(-tan(1/2*x)^4 + 18*tan(1/2*x)^2 - 1))^5/(tan(1/2*x)^2 - 9)^5)/((sqrt(5)*(4*sqrt(5)
 - sqrt(-tan(1/2*x)^4 + 18*tan(1/2*x)^2 - 1))/(tan(1/2*x)^2 - 9) + (4*sqrt(5) - sqrt(-tan(1/2*x)^4 + 18*tan(1/
2*x)^2 - 1))^2/(tan(1/2*x)^2 - 9)^2 + 1)^3*sgn(tan(1/2*x)))

________________________________________________________________________________________

maple [B]  time = 0.76, size = 64, normalized size = 1.64




method result size



default \(-\frac {\left (5 \left (\cos ^{2}\relax (x )\right )+2\right ) \sqrt {-\frac {5 \left (\cos ^{2}\relax (x )\right )-4}{\sin \relax (x )^{2}}}\, \sin \relax (x ) \sqrt {4}}{12 \cos \relax (x )^{3}}+\frac {\sqrt {4}\, \sin \relax (x ) \sqrt {-\frac {5 \left (\cos ^{2}\relax (x )\right )-4}{\sin \relax (x )^{2}}}}{4 \cos \relax (x )}\) \(64\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.48, size = 63, normalized size = 1.62 \[ -\frac {1}{48} \, {\left (-\frac {1}{\tan \relax (x)^{2}} + 4\right )}^{\frac {3}{2}} \tan \relax (x)^{3} + \frac {3}{16} \, \sqrt {-\frac {1}{\tan \relax (x)^{2}} + 4} \tan \relax (x) - \frac {8 \, \tan \relax (x)^{4} + 26 \, \tan \relax (x)^{2} - 7}{8 \, \sqrt {2 \, \tan \relax (x) + 1} \sqrt {2 \, \tan \relax (x) - 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/48*(-1/tan(x)^2 + 4)^(3/2)*tan(x)^3 + 3/16*sqrt(-1/tan(x)^2 + 4)*tan(x) - 1/8*(8*tan(x)^4 + 26*tan(x)^2 - 7
)/(sqrt(2*tan(x) + 1)*sqrt(2*tan(x) - 1))

________________________________________________________________________________________

mupad [B]  time = 0.76, size = 20, normalized size = 0.51 \[ -\frac {\mathrm {tan}\relax (x)\,\left ({\mathrm {tan}\relax (x)}^2+2\right )\,\sqrt {4-\frac {1}{{\mathrm {tan}\relax (x)}^2}}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(2*x) - 3)/(cos(x)^4*(4 - cot(x)^2)^(1/2)),x)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (2 x \right )} - 3}{\sqrt {- \left (\cot {\relax (x )} - 2\right ) \left (\cot {\relax (x )} + 2\right )} \cos ^{4}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+cos(2*x))/cos(x)**4/(4-cot(x)**2)**(1/2),x)

[Out]

Integral((cos(2*x) - 3)/(sqrt(-(cot(x) - 2)*(cot(x) + 2))*cos(x)**4), x)

________________________________________________________________________________________