Optimal. Leaf size=172 \[ \frac {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \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 {8 \tanh ^{-1}\left (\frac {3-x-\sqrt {3} x-\sqrt {3} \sqrt {3-2 x-x^2}}{\sqrt {7} x}\right )}{7 \sqrt {7}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps
used = 5, 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 {2 \left (\frac {3 \left (\sqrt {3}-\sqrt {-x^2-2 x+3}\right )}{x}-\sqrt {3}+4\right )}{7 \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 {8 \tanh ^{-1}\left (\frac {-\sqrt {3} \sqrt {-x^2-2 x+3}-\sqrt {3} x-x+3}{\sqrt {7} x}\right )}{7 \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 )^2} \, dx &=2 \text {Subst}\left (\int \frac {-\sqrt {3}+2 x+\sqrt {3} 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 {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \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}{14} \text {Subst}\left (\int -\frac {16}{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 {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \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 {8}{7} \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 {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \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 {16}{7} \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 {2 \left (4-\sqrt {3}+\frac {3 \left (\sqrt {3}-\sqrt {3-2 x-x^2}\right )}{x}\right )}{7 \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 {8 \tanh ^{-1}\left (\frac {3-x-\sqrt {3} x-\sqrt {3} \sqrt {3-2 x-x^2}}{\sqrt {7} x}\right )}{7 \sqrt {7}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.38, size = 94, normalized size = 0.55 \begin {gather*} \frac {3+6 \sqrt {3-2 x-x^2}-2 x \left (4+\sqrt {3-2 x-x^2}\right )}{14 \left (-3+2 x+2 x^2\right )}+\frac {8 \tanh ^{-1}\left (\frac {2-2 x+\sqrt {3-2 x-x^2}}{\sqrt {7} (-1+x)}\right )}{7 \sqrt {7}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1065\) vs.
\(2(139)=278\).
time = 0.17, size = 1066, normalized size = 6.20
method | result | size |
trager | \(\frac {\left (x -3\right ) x}{14 x^{2}+14 x -21}-\frac {\left (x -3\right ) \sqrt {-x^{2}-2 x +3}}{7 \left (2 x^{2}+2 x -3\right )}+\frac {4 \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 )}{49}\) | \(104\) |
default | \(\text {Expression too large to display}\) | \(1066\) |
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.38, size = 171, normalized size = 0.99 \begin {gather*} \frac {2 \, \sqrt {7} {\left (2 \, x^{2} + 2 \, x - 3\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 ) + 4 \, \sqrt {7} {\left (2 \, x^{2} + 2 \, x - 3\right )} \log \left (\frac {2 \, x^{2} + \sqrt {7} {\left (2 \, x + 1\right )} + 2 \, x + 4}{2 \, x^{2} + 2 \, x - 3}\right ) - 14 \, \sqrt {-x^{2} - 2 \, x + 3} {\left (x - 3\right )} - 56 \, x + 21}{98 \, {\left (2 \, x^{2} + 2 \, x - 3\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 \frac {1}{\left (x + \sqrt {- x^{2} - 2 x + 3}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 350 vs.
\(2 (132) = 264\).
time = 2.38, size = 350, normalized size = 2.03 \begin {gather*} -\frac {2}{49} \, \sqrt {7} \log \left (\frac {{\left | 4 \, x - 2 \, \sqrt {7} + 2 \right |}}{{\left | 4 \, x + 2 \, \sqrt {7} + 2 \right |}}\right ) + \frac {2}{49} \, \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 {2}{49} \, \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 {8 \, x - 3}{14 \, {\left (2 \, x^{2} + 2 \, x - 3\right )}} - \frac {8 \, {\left (\frac {5 \, {\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 {11 \, {\left (\sqrt {-x^{2} - 2 \, x + 3} - 2\right )}^{3}}{{\left (x + 1\right )}^{3}} - 6\right )}}{21 \, {\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 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (x+\sqrt {-x^2-2\,x+3}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________