Optimal. Leaf size=34 \[ \frac {5 \sin ^3(x)}{6}+\frac {5 \sin (x)}{2}+\frac {1}{2} \sin ^3(x) \tan ^2(x)-\frac {5}{2} \tanh ^{-1}(\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {4397, 2592, 288, 302, 206} \[ \frac {5 \sin ^3(x)}{6}+\frac {5 \sin (x)}{2}+\frac {1}{2} \sin ^3(x) \tan ^2(x)-\frac {5}{2} \tanh ^{-1}(\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 288
Rule 302
Rule 2592
Rule 4397
Rubi steps
\begin {align*} \int (-\cos (x)+\sec (x))^3 \, dx &=\int \sin ^3(x) \tan ^3(x) \, dx\\ &=\operatorname {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^2} \, dx,x,\sin (x)\right )\\ &=\frac {1}{2} \sin ^3(x) \tan ^2(x)-\frac {5}{2} \operatorname {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\sin (x)\right )\\ &=\frac {1}{2} \sin ^3(x) \tan ^2(x)-\frac {5}{2} \operatorname {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\sin (x)\right )\\ &=\frac {5 \sin (x)}{2}+\frac {5 \sin ^3(x)}{6}+\frac {1}{2} \sin ^3(x) \tan ^2(x)-\frac {5}{2} \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (x)\right )\\ &=-\frac {5}{2} \tanh ^{-1}(\sin (x))+\frac {5 \sin (x)}{2}+\frac {5 \sin ^3(x)}{6}+\frac {1}{2} \sin ^3(x) \tan ^2(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 38, normalized size = 1.12 \[ -\frac {1}{3} \sin ^3(x) \tan ^2(x)-\frac {5}{3} \sin (x) \tan ^2(x)-\frac {5}{2} \tanh ^{-1}(\sin (x))+\frac {5}{2} \tan (x) \sec (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.94, size = 49, normalized size = 1.44 \[ -\frac {15 \, \cos \relax (x)^{2} \log \left (\sin \relax (x) + 1\right ) - 15 \, \cos \relax (x)^{2} \log \left (-\sin \relax (x) + 1\right ) + 2 \, {\left (2 \, \cos \relax (x)^{4} - 14 \, \cos \relax (x)^{2} - 3\right )} \sin \relax (x)}{12 \, \cos \relax (x)^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 39, normalized size = 1.15 \[ \frac {1}{3} \, \sin \relax (x)^{3} - \frac {\sin \relax (x)}{2 \, {\left (\sin \relax (x)^{2} - 1\right )}} - \frac {5}{4} \, \log \left (\sin \relax (x) + 1\right ) + \frac {5}{4} \, \log \left (-\sin \relax (x) + 1\right ) + 2 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 30, normalized size = 0.88 \[ \frac {\sec \relax (x ) \tan \relax (x )}{2}-\frac {5 \ln \left (\sec \relax (x )+\tan \relax (x )\right )}{2}+3 \sin \relax (x )-\frac {\left (2+\cos ^{2}\relax (x )\right ) \sin \relax (x )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 37, normalized size = 1.09 \[ \frac {1}{3} \, \sin \relax (x)^{3} - \frac {\sin \relax (x)}{2 \, {\left (\sin \relax (x)^{2} - 1\right )}} - \frac {5}{4} \, \log \left (\sin \relax (x) + 1\right ) + \frac {5}{4} \, \log \left (\sin \relax (x) - 1\right ) + 2 \, \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.46, size = 68, normalized size = 2.00 \[ \frac {5\,{\mathrm {tan}\left (\frac {x}{2}\right )}^9+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7}{3}-\frac {22\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5}{3}+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{3}+5\,\mathrm {tan}\left (\frac {x}{2}\right )}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^2\,{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}^3}-5\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.74, size = 42, normalized size = 1.24 \[ \frac {5 \log {\left (\sin {\relax (x )} - 1 \right )}}{4} - \frac {5 \log {\left (\sin {\relax (x )} + 1 \right )}}{4} + \frac {\sin ^{3}{\relax (x )}}{3} + 2 \sin {\relax (x )} - \frac {\sin {\relax (x )}}{2 \sin ^{2}{\relax (x )} - 2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________