Optimal. Leaf size=30 \[ -\frac {1}{2} \cot ^2(x)+3 \log (\tan (x))+\frac {3 \tan ^2(x)}{2}+\frac {\tan ^4(x)}{4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2700, 272, 45}
\begin {gather*} \frac {\tan ^4(x)}{4}+\frac {3 \tan ^2(x)}{2}-\frac {\cot ^2(x)}{2}+3 \log (\tan (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2700
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=\text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^3} \, dx,x,\tan (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {(1+x)^3}{x^2} \, dx,x,\tan ^2(x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (3+\frac {1}{x^2}+\frac {3}{x}+x\right ) \, dx,x,\tan ^2(x)\right )\\ &=-\frac {1}{2} \cot ^2(x)+3 \log (\tan (x))+\frac {3 \tan ^2(x)}{2}+\frac {\tan ^4(x)}{4}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 31, normalized size = 1.03 \begin {gather*} -\frac {1}{2} \csc ^2(x)-3 \log (\cos (x))+3 \log (\sin (x))+\sec ^2(x)+\frac {\sec ^4(x)}{4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 33, normalized size = 1.10
method | result | size |
default | \(\frac {1}{4 \sin \left (x \right )^{2} \cos \left (x \right )^{4}}+\frac {3}{4 \sin \left (x \right )^{2} \cos \left (x \right )^{2}}-\frac {3}{2 \sin \left (x \right )^{2}}+3 \ln \left (\tan \left (x \right )\right )\) | \(33\) |
parallelrisch | \(-3 \ln \left (1+\csc \left (x \right )-\cot \left (x \right )\right )-3 \ln \left (\csc \left (x \right )-\cot \left (x \right )-1\right )+3 \ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )+\frac {\left (8 \left (\sec ^{4}\left (x \right )\right )+24 \left (\sec ^{2}\left (x \right )\right )-39\right ) \left (\csc ^{2}\left (x \right )\right )}{32}-\frac {9 \left (\cot ^{2}\left (x \right )\right )}{32}\) | \(60\) |
norman | \(\frac {-\frac {1}{8}-10 \left (\tan ^{6}\left (\frac {x}{2}\right )\right )+\frac {57 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{8}+\frac {57 \left (\tan ^{8}\left (\frac {x}{2}\right )\right )}{8}-\frac {\left (\tan ^{12}\left (\frac {x}{2}\right )\right )}{8}}{\tan \left (\frac {x}{2}\right )^{2} \left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{4}}+3 \ln \left (\tan \left (\frac {x}{2}\right )\right )-3 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )-3 \ln \left (1+\tan \left (\frac {x}{2}\right )\right )\) | \(78\) |
risch | \(\frac {6 \,{\mathrm e}^{10 i x}+12 \,{\mathrm e}^{8 i x}-4 \,{\mathrm e}^{6 i x}+12 \,{\mathrm e}^{4 i x}+6 \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{4} \left ({\mathrm e}^{2 i x}-1\right )^{2}}+3 \ln \left ({\mathrm e}^{2 i x}-1\right )-3 \ln \left ({\mathrm e}^{2 i x}+1\right )\) | \(78\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 50 vs.
\(2 (24) = 48\).
time = 0.35, size = 50, normalized size = 1.67 \begin {gather*} -\frac {6 \, \sin \left (x\right )^{4} - 9 \, \sin \left (x\right )^{2} + 2}{4 \, {\left (\sin \left (x\right )^{6} - 2 \, \sin \left (x\right )^{4} + \sin \left (x\right )^{2}\right )}} - \frac {3}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) + \frac {3}{2} \, \log \left (\sin \left (x\right )^{2}\right ) \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. 69 vs.
\(2 (24) = 48\).
time = 0.62, size = 69, normalized size = 2.30 \begin {gather*} \frac {6 \, \cos \left (x\right )^{4} - 3 \, \cos \left (x\right )^{2} - 6 \, {\left (\cos \left (x\right )^{6} - \cos \left (x\right )^{4}\right )} \log \left (\cos \left (x\right )^{2}\right ) + 6 \, {\left (\cos \left (x\right )^{6} - \cos \left (x\right )^{4}\right )} \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right ) - 1}{4 \, {\left (\cos \left (x\right )^{6} - \cos \left (x\right )^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 46, normalized size = 1.53 \begin {gather*} \frac {3 \log {\left (\cos ^{2}{\left (x \right )} - 1 \right )}}{2} - 3 \log {\left (\cos {\left (x \right )} \right )} - \frac {- 6 \cos ^{4}{\left (x \right )} + 3 \cos ^{2}{\left (x \right )} + 1}{4 \cos ^{6}{\left (x \right )} - 4 \cos ^{4}{\left (x \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 46, normalized size = 1.53 \begin {gather*} \frac {6 \, \cos \left (x\right )^{4} - 3 \, \cos \left (x\right )^{2} - 1}{4 \, {\left (\cos \left (x\right )^{2} - 1\right )} \cos \left (x\right )^{4}} + \frac {3}{2} \, \log \left (-\cos \left (x\right )^{2} + 1\right ) - 3 \, \log \left ({\left | \cos \left (x\right ) \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 30, normalized size = 1.00 \begin {gather*} 3\,\ln \left (\mathrm {tan}\left (x\right )\right )+\frac {\frac {3}{4\,{\cos \left (x\right )}^2}+\frac {1}{4\,{\cos \left (x\right )}^4}}{{\sin \left (x\right )}^2}-\frac {3}{2\,{\sin \left (x\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 6, normalized size = 0.20 \begin {gather*} \frac {8}{15 \cos \left (x \right )^{3}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________