Optimal. Leaf size=33 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {23} (\cos (x)-\sin (x))}{8+3 \cos (x)+3 \sin (x)}\right )}{\sqrt {23}} \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(94\) vs. \(2(33)=66\).
time = 0.05, antiderivative size = 94, normalized size of antiderivative = 2.85, number of steps
used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3203, 632, 212}
\begin {gather*} \frac {\log \left (\sqrt {23} \sin (x)-4 \sin (x)-4 \sqrt {23} \cos (x)+19 \cos (x)+4 \left (5-\sqrt {23}\right )\right )}{2 \sqrt {23}}-\frac {\log \left (-\sqrt {23} \sin (x)-4 \sin (x)+4 \sqrt {23} \cos (x)+19 \cos (x)+4 \left (5+\sqrt {23}\right )\right )}{2 \sqrt {23}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 3203
Rubi steps
\begin {align*} \int \frac {1}{3+4 \cos (x)+4 \sin (x)} \, dx &=2 \text {Subst}\left (\int \frac {1}{7+8 x-x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=-\left (4 \text {Subst}\left (\int \frac {1}{92-x^2} \, dx,x,8-2 \tan \left (\frac {x}{2}\right )\right )\right )\\ &=-\frac {\log \left (4 \left (5+\sqrt {23}\right )+19 \cos (x)+4 \sqrt {23} \cos (x)-4 \sin (x)-\sqrt {23} \sin (x)\right )}{2 \sqrt {23}}+\frac {\log \left (4 \left (5-\sqrt {23}\right )+19 \cos (x)-4 \sqrt {23} \cos (x)-4 \sin (x)+\sqrt {23} \sin (x)\right )}{2 \sqrt {23}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 22, normalized size = 0.67 \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {-4+\tan \left (\frac {x}{2}\right )}{\sqrt {23}}\right )}{\sqrt {23}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 20, normalized size = 0.61
method | result | size |
default | \(\frac {2 \sqrt {23}\, \arctanh \left (\frac {\left (2 \tan \left (\frac {x}{2}\right )-8\right ) \sqrt {23}}{46}\right )}{23}\) | \(20\) |
risch | \(\frac {\sqrt {23}\, \ln \left ({\mathrm e}^{i x}+\frac {3}{8}+\frac {3 i}{8}-\frac {\sqrt {23}}{8}+\frac {i \sqrt {23}}{8}\right )}{23}-\frac {\sqrt {23}\, \ln \left ({\mathrm e}^{i x}+\frac {3}{8}+\frac {3 i}{8}+\frac {\sqrt {23}}{8}-\frac {i \sqrt {23}}{8}\right )}{23}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.00, size = 39, normalized size = 1.18 \begin {gather*} -\frac {1}{23} \, \sqrt {23} \log \left (-\frac {\sqrt {23} - \frac {\sin \left (x\right )}{\cos \left (x\right ) + 1} + 4}{\sqrt {23} + \frac {\sin \left (x\right )}{\cos \left (x\right ) + 1} - 4}\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. 66 vs.
\(2 (29) = 58\).
time = 1.49, size = 66, normalized size = 2.00 \begin {gather*} \frac {1}{46} \, \sqrt {23} \log \left (-\frac {6 \, \sqrt {23} \cos \left (x\right )^{2} + 8 \, {\left (\sqrt {23} - 3\right )} \cos \left (x\right ) - 2 \, {\left (4 \, \sqrt {23} - 7 \, \cos \left (x\right ) + 12\right )} \sin \left (x\right ) - 3 \, \sqrt {23} - 48}{8 \, {\left (4 \, \cos \left (x\right ) + 3\right )} \sin \left (x\right ) + 24 \, \cos \left (x\right ) + 25}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.26, size = 39, normalized size = 1.18 \begin {gather*} \frac {\sqrt {23} \log {\left (\tan {\left (\frac {x}{2} \right )} - 4 + \sqrt {23} \right )}}{23} - \frac {\sqrt {23} \log {\left (\tan {\left (\frac {x}{2} \right )} - \sqrt {23} - 4 \right )}}{23} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.73, size = 37, normalized size = 1.12 \begin {gather*} -\frac {1}{23} \, \sqrt {23} \log \left (\frac {{\left | -2 \, \sqrt {23} + 2 \, \tan \left (\frac {1}{2} \, x\right ) - 8 \right |}}{{\left | 2 \, \sqrt {23} + 2 \, \tan \left (\frac {1}{2} \, x\right ) - 8 \right |}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 17, normalized size = 0.52 \begin {gather*} \frac {2\,\sqrt {23}\,\mathrm {atanh}\left (\frac {\sqrt {23}\,\left (\mathrm {tan}\left (\frac {x}{2}\right )-4\right )}{23}\right )}{23} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________