Optimal. Leaf size=44 \[ \frac {35 x}{8}+\frac {35 \tan ^3(x)}{24}-\frac {35 \tan (x)}{8}-\frac {1}{4} \sin ^4(x) \tan ^3(x)-\frac {7}{8} \sin ^2(x) \tan ^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {288, 302, 203} \[ \frac {35 x}{8}+\frac {35 \tan ^3(x)}{24}-\frac {35 \tan (x)}{8}-\frac {1}{4} \sin ^4(x) \tan ^3(x)-\frac {7}{8} \sin ^2(x) \tan ^3(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 288
Rule 302
Rubi steps
\begin {align*} \int (-\cos (x)+\sec (x))^4 \, dx &=\operatorname {Subst}\left (\int \frac {x^8}{\left (1+x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=-\frac {1}{4} \sin ^4(x) \tan ^3(x)+\frac {7}{4} \operatorname {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=-\frac {7}{8} \sin ^2(x) \tan ^3(x)-\frac {1}{4} \sin ^4(x) \tan ^3(x)+\frac {35}{8} \operatorname {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-\frac {7}{8} \sin ^2(x) \tan ^3(x)-\frac {1}{4} \sin ^4(x) \tan ^3(x)+\frac {35}{8} \operatorname {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\tan (x)\right )\\ &=-\frac {35 \tan (x)}{8}+\frac {35 \tan ^3(x)}{24}-\frac {7}{8} \sin ^2(x) \tan ^3(x)-\frac {1}{4} \sin ^4(x) \tan ^3(x)+\frac {35}{8} \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {35 x}{8}-\frac {35 \tan (x)}{8}+\frac {35 \tan ^3(x)}{24}-\frac {7}{8} \sin ^2(x) \tan ^3(x)-\frac {1}{4} \sin ^4(x) \tan ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 38, normalized size = 0.86 \[ \frac {35 x}{8}-\frac {3}{4} \sin (2 x)+\frac {1}{32} \sin (4 x)-\frac {10 \tan (x)}{3}+\frac {1}{3} \tan (x) \sec ^2(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.85, size = 37, normalized size = 0.84 \[ \frac {105 \, x \cos \relax (x)^{3} + {\left (6 \, \cos \relax (x)^{6} - 39 \, \cos \relax (x)^{4} - 80 \, \cos \relax (x)^{2} + 8\right )} \sin \relax (x)}{24 \, \cos \relax (x)^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 35, normalized size = 0.80 \[ \frac {1}{3} \, \tan \relax (x)^{3} + \frac {35}{8} \, x - \frac {13 \, \tan \relax (x)^{3} + 11 \, \tan \relax (x)}{8 \, {\left (\tan \relax (x)^{2} + 1\right )}^{2}} - 3 \, \tan \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 40, normalized size = 0.91 \[ -\left (-\frac {2}{3}-\frac {\left (\sec ^{2}\relax (x )\right )}{3}\right ) \tan \relax (x )-4 \tan \relax (x )+\frac {35 x}{8}-2 \cos \relax (x ) \sin \relax (x )+\frac {\left (\cos ^{3}\relax (x )+\frac {3 \cos \relax (x )}{2}\right ) \sin \relax (x )}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 26, normalized size = 0.59 \[ \frac {1}{3} \, \tan \relax (x)^{3} + \frac {35}{8} \, x + \frac {1}{32} \, \sin \left (4 \, x\right ) - \frac {3}{4} \, \sin \left (2 \, x\right ) - 3 \, \tan \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.57, size = 80, normalized size = 1.82 \[ \frac {35\,x}{8}+\frac {\frac {35\,{\mathrm {tan}\left (\frac {x}{2}\right )}^{13}}{4}+\frac {35\,{\mathrm {tan}\left (\frac {x}{2}\right )}^{11}}{6}-\frac {329\,{\mathrm {tan}\left (\frac {x}{2}\right )}^9}{12}-17\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7-\frac {329\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5}{12}+\frac {35\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{6}+\frac {35\,\mathrm {tan}\left (\frac {x}{2}\right )}{4}}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^3\,{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 8.97, size = 44, normalized size = 1.00 \[ \frac {35 x}{8} - 2 \sin {\relax (x )} \cos {\relax (x )} - \frac {4 \sin {\relax (x )}}{\cos {\relax (x )}} + \frac {\sin {\left (2 x \right )}}{4} + \frac {\sin {\left (4 x \right )}}{32} + \frac {\tan ^{3}{\relax (x )}}{3} + \tan {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________