Optimal. Leaf size=32 \[ \frac {2 (3+2 \cos (x)) \left (3 \arctan \left (\tan \left (\frac {x}{2}\right )\right )+\sin (x)\right )}{\sqrt {(3+2 \cos (x))^2}} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(100\) vs. \(2(32)=64\).
time = 0.16, antiderivative size = 100, normalized size of antiderivative = 3.12, number of steps
used = 4, number of rules used = 3, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1986, 393, 209}
\begin {gather*} \frac {6 \sec ^2\left (\frac {x}{2}\right ) \arctan \left (\tan \left (\frac {x}{2}\right )\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (\tan ^2\left (\frac {x}{2}\right )+5\right )^2}}{\tan ^2\left (\frac {x}{2}\right )+5}+\frac {4 \tan \left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (\tan ^2\left (\frac {x}{2}\right )+5\right )^2}}{\tan ^2\left (\frac {x}{2}\right )+5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 393
Rule 1986
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=2 \text {Subst}\left (\int \frac {\sqrt {\frac {\left (5+x^2\right )^2}{\left (1+x^2\right )^2}}}{1+x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=\frac {\left (2 \sec ^2\left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (5+\tan ^2\left (\frac {x}{2}\right )\right )^2}\right ) \text {Subst}\left (\int \frac {5+x^2}{\left (1+x^2\right )^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{5+\tan ^2\left (\frac {x}{2}\right )}\\ &=\frac {4 \tan \left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (5+\tan ^2\left (\frac {x}{2}\right )\right )^2}}{5+\tan ^2\left (\frac {x}{2}\right )}+\frac {\left (6 \sec ^2\left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (5+\tan ^2\left (\frac {x}{2}\right )\right )^2}\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{5+\tan ^2\left (\frac {x}{2}\right )}\\ &=\frac {3 x \sec ^2\left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (5+\tan ^2\left (\frac {x}{2}\right )\right )^2}}{5+\tan ^2\left (\frac {x}{2}\right )}+\frac {4 \tan \left (\frac {x}{2}\right ) \sqrt {\cos ^4\left (\frac {x}{2}\right ) \left (5+\tan ^2\left (\frac {x}{2}\right )\right )^2}}{5+\tan ^2\left (\frac {x}{2}\right )}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 29, normalized size = 0.91 \begin {gather*} \frac {\sqrt {(3+2 \cos (x))^2} (3 x+2 \sin (x))}{3+2 \cos (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 1.60, size = 17, normalized size = 0.53
method | result | size |
default | \(\mathrm {csgn}\left (3+2 \cos \left (x \right )\right ) \left (3 x +2 \sin \left (x \right )\right )\) | \(17\) |
risch | \(\frac {3 \sqrt {\left ({\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1\right )^{2} {\mathrm e}^{-2 i x}}\, {\mathrm e}^{i x} x}{{\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1}-\frac {i \sqrt {\left ({\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1\right )^{2} {\mathrm e}^{-2 i x}}\, {\mathrm e}^{2 i x}}{{\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1}+\frac {i \sqrt {\left ({\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1\right )^{2} {\mathrm e}^{-2 i x}}}{{\mathrm e}^{2 i x}+3 \,{\mathrm e}^{i x}+1}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.39, size = 8, normalized size = 0.25 \begin {gather*} 3 \, x + 2 \, \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.64, size = 8, normalized size = 0.25 \begin {gather*} 3 \, x + 2 \, \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\left (\sin {\left (20 x \right )} + 3 \sin {\left (21 x \right )} + \sin {\left (22 x \right )}\right )^{2} + \left (\cos {\left (20 x \right )} + 3 \cos {\left (21 x \right )} + \cos {\left (22 x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.15, size = 32, normalized size = 1.00 \begin {gather*} -6 \, \pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor + 3 \, x + \frac {4 \, \tan \left (\frac {1}{2} \, x\right )}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.26, size = 8, normalized size = 0.25 \begin {gather*} 3\,x+2\,\sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {not solved} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________