Optimal. Leaf size=307 \[ -\frac{4 \left (\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-5 \sqrt{3}+9\right )}{21 \left (\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )^2}{x^2}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{3}+2\right )^2}+\frac{2 \left (-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-43 \sqrt{3}+18\right )}{147 \left (\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )^2}{x^2}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{3}+2\right )}+\frac{12 \tanh ^{-1}\left (\frac{-\sqrt{3} \sqrt{-x^2-2 x+3}-\sqrt{3} x-x+3}{\sqrt{7} x}\right )}{49 \sqrt{7}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.250719, antiderivative size = 307, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {1660, 12, 618, 206} \[ -\frac{4 \left (\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-5 \sqrt{3}+9\right )}{21 \left (\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )^2}{x^2}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{3}+2\right )^2}+\frac{2 \left (-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-43 \sqrt{3}+18\right )}{147 \left (\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )^2}{x^2}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{-x^2-2 x+3}\right )}{x}-\sqrt{3}+2\right )}+\frac{12 \tanh ^{-1}\left (\frac{-\sqrt{3} \sqrt{-x^2-2 x+3}-\sqrt{3} x-x+3}{\sqrt{7} x}\right )}{49 \sqrt{7}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1660
Rule 12
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{\left (x+\sqrt{3-2 x-x^2}\right )^3} \, dx &=2 \operatorname{Subst}\left (\int \frac{\sqrt{3}-2 x-2 x^3-\sqrt{3} x^4}{\left (2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2\right )^3} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\frac{4 \left (9-5 \sqrt{3}+\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{21 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )^2}-\frac{1}{28} \operatorname{Subst}\left (\int \frac{-\frac{8}{3} \left (21+16 \sqrt{3}\right )-112 x+56 x^2}{\left (2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2\right )^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\frac{4 \left (9-5 \sqrt{3}+\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{21 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )^2}+\frac{2 \left (18-43 \sqrt{3}-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{147 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )}+\frac{1}{784} \operatorname{Subst}\left (\int \frac{192}{2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\frac{4 \left (9-5 \sqrt{3}+\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{21 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )^2}+\frac{2 \left (18-43 \sqrt{3}-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{147 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )}+\frac{12}{49} \operatorname{Subst}\left (\int \frac{1}{2-\sqrt{3}+2 \left (1+\sqrt{3}\right ) x+\sqrt{3} x^2} \, dx,x,\frac{-\sqrt{3}+\sqrt{3-2 x-x^2}}{x}\right )\\ &=-\frac{4 \left (9-5 \sqrt{3}+\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{21 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )^2}+\frac{2 \left (18-43 \sqrt{3}-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{147 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )}-\frac{24}{49} \operatorname{Subst}\left (\int \frac{1}{28-x^2} \, dx,x,\frac{2 \left (-3+x+\sqrt{3} x+\sqrt{3} \sqrt{3-2 x-x^2}\right )}{x}\right )\\ &=-\frac{4 \left (9-5 \sqrt{3}+\frac{\left (21+5 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{21 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )^2}+\frac{2 \left (18-43 \sqrt{3}-\frac{\left (18+49 \sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}\right )}{147 \left (2-\sqrt{3}-\frac{2 \left (1+\sqrt{3}\right ) \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )}{x}+\frac{\sqrt{3} \left (\sqrt{3}-\sqrt{3-2 x-x^2}\right )^2}{x^2}\right )}+\frac{12 \tanh ^{-1}\left (\frac{3-x-\sqrt{3} x-\sqrt{3} \sqrt{3-2 x-x^2}}{\sqrt{7} x}\right )}{49 \sqrt{7}}\\ \end{align*}
Mathematica [A] time = 1.15821, size = 333, normalized size = 1.08 \[ \frac{\frac{7 (37-24 x)}{2 x^2+2 x-3}-\frac{14 \sqrt{-x^2-2 x+3} \left (34 x^3+58 x^2-83 x-15\right )}{\left (2 x^2+2 x-3\right )^2}+\frac{98 (11 x-12)}{\left (2 x^2+2 x-3\right )^2}-6 \left (1+\sqrt{7}\right ) \sqrt{\frac{14}{4+\sqrt{7}}} \log \left (\sqrt{14 \left (4+\sqrt{7}\right )} \sqrt{-x^2-2 x+3}-\sqrt{7} x+7 x+7 \sqrt{7}+7\right )-2 \left (\sqrt{7}-1\right ) \sqrt{14 \left (4+\sqrt{7}\right )} \log \left (-\sqrt{14} \sqrt{\left (\sqrt{7}-4\right ) \left (x^2+2 x-3\right )}+\left (7+\sqrt{7}\right ) x-7 \sqrt{7}+7\right )-12 \sqrt{7} \log \left (-2 x+\sqrt{7}-1\right )+2 \left (\sqrt{7}-1\right ) \sqrt{14 \left (4+\sqrt{7}\right )} \log \left (2 x-\sqrt{7}+1\right )+6 \left (1+\sqrt{7}\right ) \sqrt{\frac{14}{4+\sqrt{7}}} \log \left (2 x+\sqrt{7}+1\right )+12 \sqrt{7} \log \left (2 x+\sqrt{7}+1\right )}{1372} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.038, size = 5984, normalized size = 19.5 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (x + \sqrt{-x^{2} - 2 \, x + 3}\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.78163, size = 576, normalized size = 1.88 \begin{align*} -\frac{336 \, x^{3} - 6 \, \sqrt{7}{\left (4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9\right )} \log \left (\frac{x^{4} + 44 \, x^{3} - \sqrt{7}{\left (3 \, x^{3} + x^{2} - 45 \, x + 45\right )} \sqrt{-x^{2} - 2 \, x + 3} + 26 \, x^{2} - 276 \, x + 207}{4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9}\right ) - 12 \, \sqrt{7}{\left (4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9\right )} \log \left (\frac{2 \, x^{2} + \sqrt{7}{\left (2 \, x + 1\right )} + 2 \, x + 4}{2 \, x^{2} + 2 \, x - 3}\right ) - 182 \, x^{2} + 14 \,{\left (34 \, x^{3} + 58 \, x^{2} - 83 \, x - 15\right )} \sqrt{-x^{2} - 2 \, x + 3} - 2100 \, x + 1953}{1372 \,{\left (4 \, x^{4} + 8 \, x^{3} - 8 \, x^{2} - 12 \, x + 9\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23195, size = 610, normalized size = 1.99 \begin{align*} -\frac{3}{343} \, \sqrt{7} \log \left (\frac{{\left | 4 \, x - 2 \, \sqrt{7} + 2 \right |}}{{\left | 4 \, x + 2 \, \sqrt{7} + 2 \right |}}\right ) + \frac{3}{343} \, \sqrt{7} \log \left (\frac{{\left | -2 \, \sqrt{7} + \frac{6 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}{{\left | 2 \, \sqrt{7} + \frac{6 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + 4 \right |}}\right ) - \frac{3}{343} \, \sqrt{7} \log \left (\frac{{\left | -2 \, \sqrt{7} + \frac{2 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}{{\left | 2 \, \sqrt{7} + \frac{2 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} - 4 \right |}}\right ) - \frac{48 \, x^{3} - 26 \, x^{2} - 300 \, x + 279}{196 \,{\left (2 \, x^{2} + 2 \, x - 3\right )}^{2}} + \frac{4 \,{\left (\frac{231 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac{3286 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} - \frac{4441 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{3}}{{\left (x + 1\right )}^{3}} - \frac{18906 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{4}}{{\left (x + 1\right )}^{4}} - \frac{12487 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{5}}{{\left (x + 1\right )}^{5}} + \frac{946 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{6}}{{\left (x + 1\right )}^{6}} + \frac{1977 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{7}}{{\left (x + 1\right )}^{7}} - 414\right )}}{441 \,{\left (\frac{8 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}}{x + 1} + \frac{26 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{2}}{{\left (x + 1\right )}^{2}} + \frac{8 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{3}}{{\left (x + 1\right )}^{3}} - \frac{3 \,{\left (\sqrt{-x^{2} - 2 \, x + 3} - 2\right )}^{4}}{{\left (x + 1\right )}^{4}} - 3\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]