Optimal. Leaf size=29 \[ \frac{x}{2}+\frac{1}{3} \log (2-\sin (2 x))-\frac{1}{6} \log (\sin (x)+\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.132845, antiderivative size = 37, normalized size of antiderivative = 1.28, number of steps used = 7, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {2074, 635, 203, 260, 628} \[ \frac{x}{2}+\frac{1}{3} \log \left (\tan ^2(x)-\tan (x)+1\right )-\frac{1}{6} \log (\tan (x)+1)+\frac{1}{2} \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2074
Rule 635
Rule 203
Rule 260
Rule 628
Rubi steps
\begin{align*} \int \frac{\sin ^3(x)}{\cos ^3(x)+\sin ^3(x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^3}{1+x^2+x^3+x^5} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{1}{6 (1+x)}+\frac{1-x}{2 \left (1+x^2\right )}+\frac{-1+2 x}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tan (x)\right )\\ &=-\frac{1}{6} \log (1+\tan (x))+\frac{1}{3} \operatorname{Subst}\left (\int \frac{-1+2 x}{1-x+x^2} \, dx,x,\tan (x)\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1-x}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-\frac{1}{6} \log (1+\tan (x))+\frac{1}{3} \log \left (1-\tan (x)+\tan ^2(x)\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (x)\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac{x}{2}+\frac{1}{2} \log (\cos (x))-\frac{1}{6} \log (1+\tan (x))+\frac{1}{3} \log \left (1-\tan (x)+\tan ^2(x)\right )\\ \end{align*}
Mathematica [A] time = 0.102501, size = 29, normalized size = 1. \[ \frac{x}{2}+\frac{1}{3} \log (2-\sin (2 x))-\frac{1}{6} \log (\sin (x)+\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.058, size = 34, normalized size = 1.2 \begin{align*}{\frac{\ln \left ( 1-\tan \left ( x \right ) + \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{3}}-{\frac{\ln \left ( 1+\tan \left ( x \right ) \right ) }{6}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{4}}+{\frac{x}{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.47655, size = 139, normalized size = 4.79 \begin{align*} \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) + \frac{1}{3} \, \log \left (-\frac{2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{2 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{2 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac{\sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + 1\right ) - \frac{1}{6} \, \log \left (-\frac{2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right ) - \frac{1}{2} \, \log \left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.17078, size = 93, normalized size = 3.21 \begin{align*} \frac{1}{2} \, x - \frac{1}{12} \, \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) + \frac{1}{3} \, \log \left (-\cos \left (x\right ) \sin \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.405274, size = 32, normalized size = 1.1 \begin{align*} \frac{x}{2} - \frac{\log{\left (\sin{\left (x \right )} + \cos{\left (x \right )} \right )}}{6} + \frac{\log{\left (\sin ^{2}{\left (x \right )} - \sin{\left (x \right )} \cos{\left (x \right )} + \cos ^{2}{\left (x \right )} \right )}}{3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09594, size = 46, normalized size = 1.59 \begin{align*} \frac{1}{2} \, x + \frac{1}{3} \, \log \left (\tan \left (x\right )^{2} - \tan \left (x\right ) + 1\right ) - \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{1}{6} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]