3.5.11 \(\int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{(\sin ^2(x)-\sin (2 x)) \sin ^{\frac {5}{2}}(2 x)} \, dx\) [411]

3.5.11.1 Optimal result
3.5.11.2 Mathematica [A] (verified)
3.5.11.3 Rubi [A] (warning: unable to verify)
3.5.11.4 Maple [C] (verified)
3.5.11.5 Fricas [B] (verification not implemented)
3.5.11.6 Sympy [F(-1)]
3.5.11.7 Maxima [F(-1)]
3.5.11.8 Giac [F]
3.5.11.9 Mupad [F(-1)]
3.5.11.10 Reduce [F]

3.5.11.1 Optimal result

Integrand size = 35, antiderivative size = 68 \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\frac {33}{32} \text {arctanh}\left (\frac {1}{2} \sec (x) \sqrt {\sin (2 x)}\right )-\frac {9 \cos (x)}{16 \sqrt {\sin (2 x)}}-\frac {5 \cos (x) \cot (x)}{24 \sqrt {\sin (2 x)}}+\frac {\cos (x) \cot ^2(x)}{20 \sqrt {\sin (2 x)}} \]

output
33/32*arctanh(1/2*sin(2*x)^(1/2)/cos(x))-9/16*cos(x)/sin(2*x)^(1/2)-5/24*c 
os(x)*cot(x)/sin(2*x)^(1/2)+1/20*cos(x)*cot(x)^2/sin(2*x)^(1/2)
 
3.5.11.2 Mathematica [A] (verified)

Time = 7.74 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.63 \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\frac {\cos (x) \sqrt {\sin (2 x)} \left (\frac {1}{15} \csc (x) \left (-147-50 \cot (x)+12 \csc ^2(x)\right )+\frac {33 \arctan \left (\frac {\sqrt {\tan \left (\frac {x}{2}\right )}}{\sqrt {-1+\tan ^2\left (\frac {x}{2}\right )}}\right ) \sqrt {-\frac {\cos (x)}{2+2 \cos (x)}} \sec (x)}{\sqrt {\tan \left (\frac {x}{2}\right )}}\right ) (\cos (2 x)-3 \tan (x))}{16 (\cos (x)+\cos (3 x)-6 \sin (x))} \]

input
Integrate[(Cos[x]^3*(Cos[2*x] - 3*Tan[x]))/((Sin[x]^2 - Sin[2*x])*Sin[2*x] 
^(5/2)),x]
 
output
(Cos[x]*Sqrt[Sin[2*x]]*((Csc[x]*(-147 - 50*Cot[x] + 12*Csc[x]^2))/15 + (33 
*ArcTan[Sqrt[Tan[x/2]]/Sqrt[-1 + Tan[x/2]^2]]*Sqrt[-(Cos[x]/(2 + 2*Cos[x]) 
)]*Sec[x])/Sqrt[Tan[x/2]])*(Cos[2*x] - 3*Tan[x]))/(16*(Cos[x] + Cos[3*x] - 
 6*Sin[x]))
 
3.5.11.3 Rubi [A] (warning: unable to verify)

Time = 1.01 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 4890, 4889, 25, 2035, 2333, 2009}

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 ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (x)^3 (\cos (2 x)-3 \tan (x))}{\left (\sin (x)^2-\sin (2 x)\right ) \sin (2 x)^{5/2}}dx\)

\(\Big \downarrow \) 4890

\(\displaystyle \frac {\sin ^5(x) \int \frac {\cos (x)^3 \csc ^5(x) (\cos (2 x)-3 \tan (x)) \tan ^{\frac {5}{2}}(x)}{\sin (x)^2-\sin (2 x)}dx}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

\(\Big \downarrow \) 4889

\(\displaystyle \frac {\sin ^5(x) \int -\frac {-3 \tan ^3(x)-\tan ^2(x)-3 \tan (x)+1}{(2-\tan (x)) \tan ^{\frac {7}{2}}(x)}d\tan (x)}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\sin ^5(x) \int \frac {-3 \tan ^3(x)-\tan ^2(x)-3 \tan (x)+1}{(2-\tan (x)) \tan ^{\frac {7}{2}}(x)}d\tan (x)}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

\(\Big \downarrow \) 2035

\(\displaystyle -\frac {2 \sin ^5(x) \int \frac {\cot ^6(x) \left (-3 \tan ^3(x)-\tan ^2(x)-3 \tan (x)+1\right )}{2-\tan (x)}d\sqrt {\tan (x)}}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

\(\Big \downarrow \) 2333

\(\displaystyle -\frac {2 \sin ^5(x) \int \left (\frac {\cot ^6(x)}{2}-\frac {5 \cot ^4(x)}{4}-\frac {9 \cot ^2(x)}{8}+\frac {33}{8 (\tan (x)-2)}\right )d\sqrt {\tan (x)}}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 \sin ^5(x) \left (-\frac {33 \text {arctanh}\left (\frac {\sqrt {\tan (x)}}{\sqrt {2}}\right )}{8 \sqrt {2}}-\frac {1}{10} \cot ^5(x)+\frac {5 \cot ^3(x)}{12}+\frac {9 \cot (x)}{8}\right )}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\)

input
Int[(Cos[x]^3*(Cos[2*x] - 3*Tan[x]))/((Sin[x]^2 - Sin[2*x])*Sin[2*x]^(5/2) 
),x]
 
output
(-2*((-33*ArcTanh[Sqrt[Tan[x]]/Sqrt[2]])/(8*Sqrt[2]) + (9*Cot[x])/8 + (5*C 
ot[x]^3)/12 - Cot[x]^5/10)*Sin[x]^5)/(Sin[2*x]^(5/2)*Tan[x]^(5/2))
 

3.5.11.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2035
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k   Subst 
[Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti 
onQ[m] && AlgebraicFunctionQ[Fx, x]
 

rule 2333
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ 
ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] 
&& PolyQ[Pq, x] && IGtQ[p, -2]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

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

rule 4890
Int[(u_)*((c_.)*sin[v_])^(m_), x_Symbol] :> With[{w = FunctionOfTrig[u*(Sin 
[v/2]^(2*m)/(c*Tan[v/2])^m), x]}, Simp[(c*Sin[v])^m*((c*Tan[v/2])^m/Sin[v/2 
]^(2*m))   Int[u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x], x] /;  !FalseQ[w] && 
FunctionOfQ[NonfreeFactors[Tan[w], x], u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x 
]] /; FreeQ[c, x] && LinearQ[v, x] && IntegerQ[m + 1/2] &&  !SumQ[u] && Inv 
erseFunctionFreeQ[u, x]
 
3.5.11.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 1.31 (sec) , antiderivative size = 761, normalized size of antiderivative = 11.19

method result size
default \(\text {Expression too large to display}\) \(761\)

input
int(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2),x,meth 
od=_RETURNVERBOSE)
 
output
1/3840*(-tan(1/2*x)/(tan(1/2*x)^2-1))^(1/2)/tan(1/2*x)^3*(-3024*(tan(1/2*x 
)*(tan(1/2*x)^2-1))^(1/2)*(1+tan(1/2*x))^(1/2)*(-2*tan(1/2*x)+2)^(1/2)*(-t 
an(1/2*x))^(1/2)*EllipticE((1+tan(1/2*x))^(1/2),1/2*2^(1/2))*((1+tan(1/2*x 
))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*tan(1/2*x)^2+932*(tan(1/2*x)*(tan(1/2* 
x)^2-1))^(1/2)*(1+tan(1/2*x))^(1/2)*(-2*tan(1/2*x)+2)^(1/2)*(-tan(1/2*x))^ 
(1/2)*EllipticF((1+tan(1/2*x))^(1/2),1/2*2^(1/2))*((1+tan(1/2*x))*(tan(1/2 
*x)-1)*tan(1/2*x))^(1/2)*tan(1/2*x)^2+24*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/ 
2)*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*tan(1/2*x)^6+3*2^(1/2) 
*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*(tan(1/2*x)^3-tan(1/2*x))^(1/2)*((1+t 
an(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*sum((34*_alpha^3+13*_alpha^2+3 
4*_alpha-21)*(_alpha^3+2*_alpha-3)*(1+tan(1/2*x))^(1/2)*(-tan(1/2*x)+1)^(1 
/2)*(-tan(1/2*x))^(1/2)/(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*EllipticPi((1+ 
tan(1/2*x))^(1/2),-1/4*_alpha^3-1/2*_alpha+3/4,1/2*2^(1/2)),_alpha=RootOf( 
_Z^4+_Z^3+2*_Z^2-_Z+1))*tan(1/2*x)^2+200*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/ 
2)*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*tan(1/2*x)^5-1920*tan( 
1/2*x)^4*(tan(1/2*x)^3-tan(1/2*x))^(1/2)*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/ 
2)-24*tan(1/2*x)^4*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*((1+tan(1/2*x))*(ta 
n(1/2*x)-1)*tan(1/2*x))^(1/2)-552*(tan(1/2*x)^3-tan(1/2*x))^(1/2)*((1+tan( 
1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*tan(1/2*x)^4-24*(tan(1/2*x)*(tan( 
1/2*x)^2-1))^(1/2)*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*tan...
 
3.5.11.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (52) = 104\).

Time = 0.28 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.00 \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=-\frac {495 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \sqrt {2} \sqrt {\cos \left (x\right ) \sin \left (x\right )} {\left (4 \, \cos \left (x\right ) + 3 \, \sin \left (x\right )\right )} + \frac {1}{2} \, \cos \left (x\right )^{2} + \frac {7}{2} \, \cos \left (x\right ) \sin \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) - 495 \, {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right )^{2} + \frac {1}{2} \, \sqrt {2} \sqrt {\cos \left (x\right ) \sin \left (x\right )} \sin \left (x\right ) - \frac {1}{2} \, \cos \left (x\right ) \sin \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) + 4 \, \sqrt {2} {\left (147 \, \cos \left (x\right )^{2} - 50 \, \cos \left (x\right ) \sin \left (x\right ) - 135\right )} \sqrt {\cos \left (x\right ) \sin \left (x\right )} + 388 \, {\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )}{1920 \, {\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \]

input
integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2), 
x, algorithm="fricas")
 
output
-1/1920*(495*(cos(x)^2 - 1)*log(-1/2*sqrt(2)*sqrt(cos(x)*sin(x))*(4*cos(x) 
 + 3*sin(x)) + 1/2*cos(x)^2 + 7/2*cos(x)*sin(x) + 1/2)*sin(x) - 495*(cos(x 
)^2 - 1)*log(1/2*cos(x)^2 + 1/2*sqrt(2)*sqrt(cos(x)*sin(x))*sin(x) - 1/2*c 
os(x)*sin(x) + 1/2)*sin(x) + 4*sqrt(2)*(147*cos(x)^2 - 50*cos(x)*sin(x) - 
135)*sqrt(cos(x)*sin(x)) + 388*(cos(x)^2 - 1)*sin(x))/((cos(x)^2 - 1)*sin( 
x))
 
3.5.11.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\text {Timed out} \]

input
integrate(cos(x)**3*(cos(2*x)-3*tan(x))/(sin(x)**2-sin(2*x))/sin(2*x)**(5/ 
2),x)
 
output
Timed out
 
3.5.11.7 Maxima [F(-1)]

Timed out. \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\text {Timed out} \]

input
integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2), 
x, algorithm="maxima")
 
output
Timed out
 
3.5.11.8 Giac [F]

\[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\int { \frac {{\left (\cos \left (2 \, x\right ) - 3 \, \tan \left (x\right )\right )} \cos \left (x\right )^{3}}{{\left (\sin \left (x\right )^{2} - \sin \left (2 \, x\right )\right )} \sin \left (2 \, x\right )^{\frac {5}{2}}} \,d x } \]

input
integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2), 
x, algorithm="giac")
 
output
integrate((cos(2*x) - 3*tan(x))*cos(x)^3/((sin(x)^2 - sin(2*x))*sin(2*x)^( 
5/2)), x)
 
3.5.11.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=\int -\frac {{\cos \left (x\right )}^3\,\left (\cos \left (2\,x\right )-3\,\mathrm {tan}\left (x\right )\right )}{{\sin \left (2\,x\right )}^{5/2}\,\left (\sin \left (2\,x\right )-{\sin \left (x\right )}^2\right )} \,d x \]

input
int(-(cos(x)^3*(cos(2*x) - 3*tan(x)))/(sin(2*x)^(5/2)*(sin(2*x) - sin(x)^2 
)),x)
 
output
int(-(cos(x)^3*(cos(2*x) - 3*tan(x)))/(sin(2*x)^(5/2)*(sin(2*x) - sin(x)^2 
)), x)
 
3.5.11.10 Reduce [F]

\[ \int \frac {\cos ^3(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sin ^{\frac {5}{2}}(2 x)} \, dx=-\left (\int \frac {\sqrt {\sin \left (2 x \right )}\, \cos \left (2 x \right ) \cos \left (x \right )^{3}}{\sin \left (2 x \right )^{4}-\sin \left (2 x \right )^{3} \sin \left (x \right )^{2}}d x \right )+3 \left (\int \frac {\sqrt {\sin \left (2 x \right )}\, \cos \left (x \right )^{3} \tan \left (x \right )}{\sin \left (2 x \right )^{4}-\sin \left (2 x \right )^{3} \sin \left (x \right )^{2}}d x \right ) \]

input
int((cos(x)**3*( - cos(2*x) + 3*tan(x)))/(sqrt(sin(2*x))*sin(2*x)**2*(sin( 
2*x) - sin(x)**2)),x)
 
output
 - int((sqrt(sin(2*x))*cos(2*x)*cos(x)**3)/(sin(2*x)**4 - sin(2*x)**3*sin( 
x)**2),x) + 3*int((sqrt(sin(2*x))*cos(x)**3*tan(x))/(sin(2*x)**4 - sin(2*x 
)**3*sin(x)**2),x)