Optimal. Leaf size=54 \[ \frac {2 \log \left (\tan ^2(a+b x)-\tan (a+b x)+1\right )}{3 b}-\frac {\log (\tan (a+b x)+1)}{3 b}+\frac {\log (\cos (a+b x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {6725, 260, 628} \[ \frac {2 \log \left (\tan ^2(a+b x)-\tan (a+b x)+1\right )}{3 b}-\frac {\log (\tan (a+b x)+1)}{3 b}+\frac {\log (\cos (a+b x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 260
Rule 628
Rule 6725
Rubi steps
\begin {align*} \int \frac {-\csc ^3(a+b x)+\sec ^3(a+b x)}{\csc ^3(a+b x)+\sec ^3(a+b x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {-1+x^3}{\left (1+x^2\right ) \left (1+x^3\right )} \, dx,x,\tan (a+b x)\right )}{b}\\ &=\frac {\operatorname {Subst}\left (\int \left (-\frac {1}{3 (1+x)}-\frac {x}{1+x^2}+\frac {2 (-1+2 x)}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tan (a+b x)\right )}{b}\\ &=-\frac {\log (1+\tan (a+b x))}{3 b}+\frac {2 \operatorname {Subst}\left (\int \frac {-1+2 x}{1-x+x^2} \, dx,x,\tan (a+b x)\right )}{3 b}-\frac {\operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tan (a+b x)\right )}{b}\\ &=\frac {\log (\cos (a+b x))}{b}-\frac {\log (1+\tan (a+b x))}{3 b}+\frac {2 \log \left (1-\tan (a+b x)+\tan ^2(a+b x)\right )}{3 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 42, normalized size = 0.78 \[ \frac {2 \log (2-\sin (2 (a+b x)))}{3 b}-\frac {\log (\sin (a+b x)+\cos (a+b x))}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.94, size = 42, normalized size = 0.78 \[ -\frac {\log \left (2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right ) - 4 \, \log \left (-\cos \left (b x + a\right ) \sin \left (b x + a\right ) + 1\right )}{6 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 52, normalized size = 0.96 \[ \frac {4 \, \log \left (\tan \left (b x + a\right )^{2} - \tan \left (b x + a\right ) + 1\right ) - 3 \, \log \left (\tan \left (b x + a\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (b x + a\right ) + 1 \right |}\right )}{6 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.83, size = 56, normalized size = 1.04 \[ \frac {2 \ln \left (1-\tan \left (b x +a \right )+\tan ^{2}\left (b x +a \right )\right )}{3 b}-\frac {\ln \left (1+\tan ^{2}\left (b x +a \right )\right )}{2 b}-\frac {\ln \left (1+\tan \left (b x +a \right )\right )}{3 b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.44, size = 154, normalized size = 2.85 \[ \frac {2 \, \log \left (-\frac {2 \, \sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + \frac {2 \, \sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + \frac {2 \, \sin \left (b x + a\right )^{3}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{3}} + \frac {\sin \left (b x + a\right )^{4}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{4}} + 1\right ) - \log \left (-\frac {2 \, \sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + \frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1\right ) - 3 \, \log \left (\frac {\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 1\right )}{3 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.23, size = 106, normalized size = 1.96 \[ \frac {2\,\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^3+2\,{\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )+1\right )}{3\,b}-\frac {\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )-1\right )}{3\,b}-\frac {\ln \left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^2+1\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________