Integrand size = 23, antiderivative size = 39 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {2}{3} \sqrt {4-\cot ^2(x)} \tan (x)-\frac {1}{3} \sqrt {4-\cot ^2(x)} \tan ^3(x) \] Output:
-2/3*(4-cot(x)^2)^(1/2)*tan(x)-1/3*(4-cot(x)^2)^(1/2)*tan(x)^3
Time = 0.06 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\frac {(3+\cos (2 x)) (-3+5 \cos (2 x)) \csc (x) \sec ^3(x)}{12 \sqrt {4-\cot ^2(x)}} \] Input:
Integrate[((-3 + Cos[2*x])*Sec[x]^4)/Sqrt[4 - Cot[x]^2],x]
Output:
((3 + Cos[2*x])*(-3 + 5*Cos[2*x])*Csc[x]*Sec[x]^3)/(12*Sqrt[4 - Cot[x]^2])
Time = 0.31 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4889, 27, 941, 955, 746}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(\cos (2 x)-3) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (2 x)-3}{\cos (x)^4 \sqrt {4-\cot (x)^2}}dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \int -\frac {2 \left (2 \tan ^2(x)+1\right )}{\sqrt {4-\cot ^2(x)}}d\tan (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -2 \int \frac {2 \tan ^2(x)+1}{\sqrt {4-\cot ^2(x)}}d\tan (x)\) |
\(\Big \downarrow \) 941 |
\(\displaystyle -2 \int \frac {\left (\cot ^2(x)+2\right ) \tan ^2(x)}{\sqrt {4-\cot ^2(x)}}d\tan (x)\) |
\(\Big \downarrow \) 955 |
\(\displaystyle -2 \left (\frac {4}{3} \int \frac {1}{\sqrt {4-\cot ^2(x)}}d\tan (x)+\frac {1}{6} \tan ^3(x) \sqrt {4-\cot ^2(x)}\right )\) |
\(\Big \downarrow \) 746 |
\(\displaystyle -2 \left (\frac {1}{6} \tan ^3(x) \sqrt {4-\cot ^2(x)}+\frac {1}{3} \tan (x) \sqrt {4-\cot ^2(x)}\right )\) |
Input:
Int[((-3 + Cos[2*x])*Sec[x]^4)/Sqrt[4 - Cot[x]^2],x]
Output:
-2*((Sqrt[4 - Cot[x]^2]*Tan[x])/3 + (Sqrt[4 - Cot[x]^2]*Tan[x]^3)/6)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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]
Int[((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Sym bol] :> 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])
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] + Simp[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)) Int[(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]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Time = 3.80 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92
method | result | size |
default | \(\frac {5 \cot \left (x \right )+\sec \left (x \right ) \csc \left (x \right )-4 \sec \left (x \right )^{3} \csc \left (x \right )}{3 \sqrt {-5 \cot \left (x \right )^{2}+4 \csc \left (x \right )^{2}}}\) | \(36\) |
Input:
int((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
1/3/(-5*cot(x)^2+4*csc(x)^2)^(1/2)*(5*cot(x)+sec(x)*csc(x)-4*sec(x)^3*csc( x))
Time = 0.08 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.85 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {{\left (\cos \left (x\right )^{2} + 1\right )} \sqrt {\frac {5 \, \cos \left (x\right )^{2} - 4}{\cos \left (x\right )^{2} - 1}} \sin \left (x\right )}{3 \, \cos \left (x\right )^{3}} \] Input:
integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="fricas")
Output:
-1/3*(cos(x)^2 + 1)*sqrt((5*cos(x)^2 - 4)/(cos(x)^2 - 1))*sin(x)/cos(x)^3
\[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\int \frac {\cos {\left (2 x \right )} - 3}{\sqrt {- \left (\cot {\left (x \right )} - 2\right ) \left (\cot {\left (x \right )} + 2\right )} \cos ^{4}{\left (x \right )}}\, dx \] Input:
integrate((-3+cos(2*x))/cos(x)**4/(4-cot(x)**2)**(1/2),x)
Output:
Integral((cos(2*x) - 3)/(sqrt(-(cot(x) - 2)*(cot(x) + 2))*cos(x)**4), x)
Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (31) = 62\).
Time = 0.04 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.62 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {1}{48} \, {\left (-\frac {1}{\tan \left (x\right )^{2}} + 4\right )}^{\frac {3}{2}} \tan \left (x\right )^{3} + \frac {3}{16} \, \sqrt {-\frac {1}{\tan \left (x\right )^{2}} + 4} \tan \left (x\right ) - \frac {8 \, \tan \left (x\right )^{4} + 26 \, \tan \left (x\right )^{2} - 7}{8 \, \sqrt {2 \, \tan \left (x\right ) + 1} \sqrt {2 \, \tan \left (x\right ) - 1}} \] Input:
integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="maxima")
Output:
-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))
Result contains complex when optimal does not.
Time = 0.14 (sec) , antiderivative size = 135, normalized size of antiderivative = 3.46 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=\frac {\frac {125 \, \sqrt {5} {\left (\frac {21 \, {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{2}}{\cos \left (x\right )^{2}} + 125\right )} \cos \left (x\right )^{3}}{{\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{3}} - \frac {\sqrt {5} {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}^{3}}{\cos \left (x\right )^{3}} - \frac {105 \, \sqrt {5} {\left (\sqrt {5} \sqrt {-5 \, \cos \left (x\right )^{2} + 4} - 2 \, \sqrt {5}\right )}}{\cos \left (x\right )}}{2400 \, \mathrm {sgn}\left (\sin \left (x\right )\right )} + \frac {2}{3} i \, \mathrm {sgn}\left (\sin \left (x\right )\right ) \] Input:
integrate((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x, algorithm="giac")
Output:
1/2400*(125*sqrt(5)*(21*(sqrt(5)*sqrt(-5*cos(x)^2 + 4) - 2*sqrt(5))^2/cos( x)^2 + 125)*cos(x)^3/(sqrt(5)*sqrt(-5*cos(x)^2 + 4) - 2*sqrt(5))^3 - sqrt( 5)*(sqrt(5)*sqrt(-5*cos(x)^2 + 4) - 2*sqrt(5))^3/cos(x)^3 - 105*sqrt(5)*(s qrt(5)*sqrt(-5*cos(x)^2 + 4) - 2*sqrt(5))/cos(x))/sgn(sin(x)) + 2/3*I*sgn( sin(x))
Time = 0.42 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.51 \[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=-\frac {\mathrm {tan}\left (x\right )\,\left ({\mathrm {tan}\left (x\right )}^2+2\right )\,\sqrt {4-\frac {1}{{\mathrm {tan}\left (x\right )}^2}}}{3} \] Input:
int((cos(2*x) - 3)/(cos(x)^4*(4 - cot(x)^2)^(1/2)),x)
Output:
-(tan(x)*(tan(x)^2 + 2)*(4 - 1/tan(x)^2)^(1/2))/3
\[ \int \frac {(-3+\cos (2 x)) \sec ^4(x)}{\sqrt {4-\cot ^2(x)}} \, dx=3 \left (\int \frac {\sqrt {-\cot \left (x \right )^{2}+4}}{\cos \left (x \right )^{4} \cot \left (x \right )^{2}-4 \cos \left (x \right )^{4}}d x \right )-\left (\int \frac {\sqrt {-\cot \left (x \right )^{2}+4}\, \cos \left (2 x \right )}{\cos \left (x \right )^{4} \cot \left (x \right )^{2}-4 \cos \left (x \right )^{4}}d x \right ) \] Input:
int((-3+cos(2*x))/cos(x)^4/(4-cot(x)^2)^(1/2),x)
Output:
3*int(sqrt( - cot(x)**2 + 4)/(cos(x)**4*cot(x)**2 - 4*cos(x)**4),x) - int( (sqrt( - cot(x)**2 + 4)*cos(2*x))/(cos(x)**4*cot(x)**2 - 4*cos(x)**4),x)