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]

Optimal. Leaf size=68 \[ \frac {33}{32} \tanh ^{-1}\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)}} \]

[Out]

33/32*arctanh(1/2*sin(2*x)^(1/2)/cos(x))-9/16*cos(x)/sin(2*x)^(1/2)-5/24*cos(x)*cot(x)/sin(2*x)^(1/2)+1/20*cos
(x)*cot(x)^2/sin(2*x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.62, antiderivative size = 95, normalized size of antiderivative = 1.40, number of steps used = 6, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {4475, 1633, 65, 213} \begin {gather*} \frac {\cos ^5(x)}{5 \sin ^{\frac {5}{2}}(2 x)}-\frac {5 \sin (x) \cos ^4(x)}{6 \sin ^{\frac {5}{2}}(2 x)}-\frac {9 \sin ^2(x) \cos ^3(x)}{4 \sin ^{\frac {5}{2}}(2 x)}+\frac {33 \sin ^5(x) \tanh ^{-1}\left (\frac {\sqrt {\tan (x)}}{\sqrt {2}}\right )}{4 \sqrt {2} \sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Cos[x]^3*(Cos[2*x] - 3*Tan[x]))/((Sin[x]^2 - Sin[2*x])*Sin[2*x]^(5/2)),x]

[Out]

Cos[x]^5/(5*Sin[2*x]^(5/2)) - (5*Cos[x]^4*Sin[x])/(6*Sin[2*x]^(5/2)) - (9*Cos[x]^3*Sin[x]^2)/(4*Sin[2*x]^(5/2)
) + (33*ArcTanh[Sqrt[Tan[x]]/Sqrt[2]]*Sin[x]^5)/(4*Sqrt[2]*Sin[2*x]^(5/2)*Tan[x]^(5/2))

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 1633

Int[((Px_)*((c_.) + (d_.)*(x_))^(n_.))/((a_.) + (b_.)*(x_)), x_Symbol] :> Int[ExpandIntegrand[1/Sqrt[c + d*x],
 Px*((c + d*x)^(n + 1/2)/(a + b*x)), x], x] /; FreeQ[{a, b, c, d, n}, x] && PolyQ[Px, x] && ILtQ[n + 1/2, 0] &
& GtQ[Expon[Px, x], 2]

Rule 4475

Int[(u_)*((c_.)*sin[v_])^(m_), x_Symbol] :> With[{w = FunctionOfTrig[u*(Sin[v/2]^(2*m)/(c*Tan[v/2])^m), x]}, D
ist[(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] && InverseFunctionFreeQ[u, x]

Rubi steps

\begin {align*} \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 {\sin ^5(x) \int \frac {\csc ^2(x) (\cos (2 x)-3 \tan (x))}{\left (\sin ^2(x)-\sin (2 x)\right ) \sqrt {\tan (x)}} \, dx}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ &=\frac {\sin ^5(x) \text {Subst}\left (\int \frac {-1+3 x+x^2+3 x^3}{(2-x) x^{7/2}} \, dx,x,\tan (x)\right )}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ &=\frac {\sin ^5(x) \text {Subst}\left (\int \left (-\frac {1}{2 x^{7/2}}+\frac {5}{4 x^{5/2}}+\frac {9}{8 x^{3/2}}-\frac {33}{8 (-2+x) \sqrt {x}}\right ) \, dx,x,\tan (x)\right )}{\sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ &=\frac {\cos ^5(x)}{5 \sin ^{\frac {5}{2}}(2 x)}-\frac {5 \cos ^4(x) \sin (x)}{6 \sin ^{\frac {5}{2}}(2 x)}-\frac {9 \cos ^3(x) \sin ^2(x)}{4 \sin ^{\frac {5}{2}}(2 x)}-\frac {\left (33 \sin ^5(x)\right ) \text {Subst}\left (\int \frac {1}{(-2+x) \sqrt {x}} \, dx,x,\tan (x)\right )}{8 \sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ &=\frac {\cos ^5(x)}{5 \sin ^{\frac {5}{2}}(2 x)}-\frac {5 \cos ^4(x) \sin (x)}{6 \sin ^{\frac {5}{2}}(2 x)}-\frac {9 \cos ^3(x) \sin ^2(x)}{4 \sin ^{\frac {5}{2}}(2 x)}-\frac {\left (33 \sin ^5(x)\right ) \text {Subst}\left (\int \frac {1}{-2+x^2} \, dx,x,\sqrt {\tan (x)}\right )}{4 \sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ &=\frac {\cos ^5(x)}{5 \sin ^{\frac {5}{2}}(2 x)}-\frac {5 \cos ^4(x) \sin (x)}{6 \sin ^{\frac {5}{2}}(2 x)}-\frac {9 \cos ^3(x) \sin ^2(x)}{4 \sin ^{\frac {5}{2}}(2 x)}+\frac {33 \tanh ^{-1}\left (\frac {\sqrt {\tan (x)}}{\sqrt {2}}\right ) \sin ^5(x)}{4 \sqrt {2} \sin ^{\frac {5}{2}}(2 x) \tan ^{\frac {5}{2}}(x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.13, size = 111, normalized size = 1.63 \begin {gather*} \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 \tan ^{-1}\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))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x]^3*(Cos[2*x] - 3*Tan[x]))/((Sin[x]^2 - Sin[2*x])*Sin[2*x]^(5/2)),x]

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.36, size = 761, normalized size = 11.19

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2),x,method=_RETURNVERBOSE)

[Out]

1/3840*(-tan(1/2*x)/(tan(1/2*x)^2-1))^(1/2)/tan(1/2*x)^3*(932*(1+tan(1/2*x))^(1/2)*(-2*tan(1/2*x)+2)^(1/2)*(-t
an(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)*(tan(1/2*x)^2-1))^(1/2)*tan(1/2*x)^2-3024*(1+tan(1/2*x))^(1/2)*(-2*tan(1/2*x)+2)^(1/2)*(-tan(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)*(tan(1/2*x)^2-1))^(1/2)*tan(1/2*x)^2+24*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*(tan(1/2*x)*(tan(
1/2*x)^2-1))^(1/2)*tan(1/2*x)^6+3*sum((34*_alpha^3+13*_alpha^2+34*_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)^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)*(tan(1/2*x)^2-1))^(1/2)*2^(1/2)*tan(1
/2*x)^2+200*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*tan(1/2*x)^5-
552*tan(1/2*x)^4*(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)-1920*tan(1/2
*x)^4*(tan(1/2*x)*(tan(1/2*x)^2-1))^(1/2)*(tan(1/2*x)^3-tan(1/2*x))^(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))*(tan(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)^2-24*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*(tan(
1/2*x)*(tan(1/2*x)^2-1))^(1/2)*tan(1/2*x)^2-200*tan(1/2*x)*((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)*(t
an(1/2*x)*(tan(1/2*x)^2-1))^(1/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))/((1+tan(1/2*x))*(tan(1/2*x)-1)*tan(1/2*x))^(1/2)/(tan(1/2*x)^3-tan(1/2*x))^(1/2)

________________________________________________________________________________________

Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (52) = 104\).
time = 1.27, size = 136, normalized size = 2.00 \begin {gather*} -\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 )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2),x, algorithm="fricas")

[Out]

-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*co
s(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
*cos(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*(co
s(x)^2 - 1)*sin(x))/((cos(x)^2 - 1)*sin(x))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3*(cos(2*x)-3*tan(x))/(sin(x)**2-sin(2*x))/sin(2*x)**(5/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3*(cos(2*x)-3*tan(x))/(sin(x)^2-sin(2*x))/sin(2*x)^(5/2),x, algorithm="giac")

[Out]

integrate((cos(2*x) - 3*tan(x))*cos(x)^3/((sin(x)^2 - sin(2*x))*sin(2*x)^(5/2)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \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 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(cos(x)^3*(cos(2*x) - 3*tan(x)))/(sin(2*x)^(5/2)*(sin(2*x) - sin(x)^2)),x)

[Out]

int(-(cos(x)^3*(cos(2*x) - 3*tan(x)))/(sin(2*x)^(5/2)*(sin(2*x) - sin(x)^2)), x)

________________________________________________________________________________________