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]
________________________________________________________________________________________
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]
[Out]
Rule 65
Rule 213
Rule 1633
Rule 4475
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[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]
[Out]
________________________________________________________________________________________
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]
[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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________