Optimal. Leaf size=307 \[ -\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}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 307, normalized size of antiderivative = 1.00, 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 = {1674, 12, 632,
212} \begin {gather*} -\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}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 632
Rule 1674
Rubi steps
\begin {align*} \int \frac {1}{\left (x+\sqrt {3-2 x-x^2}\right )^3} \, dx &=2 \text {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} \text {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} \text {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} \text {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} \text {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 = 0.46, size = 115, normalized size = 0.37 \begin {gather*} \frac {\frac {7 \left (-279+300 x+26 x^2-48 x^3\right )}{\left (-3+2 x+2 x^2\right )^2}+\frac {14 \sqrt {3-2 x-x^2} \left (15+83 x-58 x^2-34 x^3\right )}{\left (-3+2 x+2 x^2\right )^2}+48 \sqrt {7} \tanh ^{-1}\left (\frac {2-2 x+\sqrt {3-2 x-x^2}}{\sqrt {7} (-1+x)}\right )}{1372} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(5983\) vs.
\(2(248)=496\).
time = 0.18, size = 5984, normalized size = 19.49
method | result | size |
trager | \(\frac {\left (62 x^{3}+100 x^{2}-111 x -36\right ) x}{98 \left (2 x^{2}+2 x -3\right )^{2}}-\frac {\left (34 x^{3}+58 x^{2}-83 x -15\right ) \sqrt {-x^{2}-2 x +3}}{98 \left (2 x^{2}+2 x -3\right )^{2}}-\frac {6 \RootOf \left (\textit {\_Z}^{2}-7\right ) \ln \left (-\frac {-\RootOf \left (\textit {\_Z}^{2}-7\right ) x +7 \sqrt {-x^{2}-2 x +3}+3 \RootOf \left (\textit {\_Z}^{2}-7\right )}{\RootOf \left (\textit {\_Z}^{2}-7\right ) x -x +3}\right )}{343}\) | \(131\) |
default | \(\text {Expression too large to display}\) | \(5984\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 223, normalized size = 0.73 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.94, size = 452, normalized size = 1.47 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\left (x+\sqrt {-x^2-2\,x+3}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________