Optimal. Leaf size=54 \[ \sqrt {2+x} \sqrt {3+x}-\sinh ^{-1}\left (\sqrt {2+x}\right )+2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {2+x}}{\sqrt {3+x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {1978, 159, 163,
56, 221, 95, 213} \begin {gather*} \sqrt {x+2} \sqrt {x+3}-\sinh ^{-1}\left (\sqrt {x+2}\right )+2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {x+2}}{\sqrt {x+3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 56
Rule 95
Rule 159
Rule 163
Rule 213
Rule 221
Rule 1978
Rubi steps
\begin {align*} \int \frac {x}{(1+x) \sqrt {\frac {2+x}{3+x}}} \, dx &=\int \frac {x \sqrt {3+x}}{(1+x) \sqrt {2+x}} \, dx\\ &=\sqrt {2+x} \sqrt {3+x}+\int \frac {-\frac {5}{2}-\frac {x}{2}}{(1+x) \sqrt {2+x} \sqrt {3+x}} \, dx\\ &=\sqrt {2+x} \sqrt {3+x}-\frac {1}{2} \int \frac {1}{\sqrt {2+x} \sqrt {3+x}} \, dx-2 \int \frac {1}{(1+x) \sqrt {2+x} \sqrt {3+x}} \, dx\\ &=\sqrt {2+x} \sqrt {3+x}-4 \text {Subst}\left (\int \frac {1}{-1+2 x^2} \, dx,x,\frac {\sqrt {2+x}}{\sqrt {3+x}}\right )-\text {Subst}\left (\int \frac {1}{\sqrt {1+x^2}} \, dx,x,\sqrt {2+x}\right )\\ &=\sqrt {2+x} \sqrt {3+x}-\sinh ^{-1}\left (\sqrt {2+x}\right )+2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {2+x}}{\sqrt {3+x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 66, normalized size = 1.22 \begin {gather*} \sqrt {2+x} \sqrt {3+x}-\tanh ^{-1}\left (\frac {1}{\sqrt {\frac {2+x}{3+x}}}\right )+2 \sqrt {2} \tanh ^{-1}\left (\frac {-1-x+\sqrt {2+x} \sqrt {3+x}}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.44, size = 81, normalized size = 1.50
method | result | size |
default | \(\frac {\left (x +2\right ) \left (2 \sqrt {2}\, \arctanh \left (\frac {\left (7+3 x \right ) \sqrt {2}}{4 \sqrt {x^{2}+5 x +6}}\right )+2 \sqrt {x^{2}+5 x +6}-\ln \left (\frac {5}{2}+x +\sqrt {x^{2}+5 x +6}\right )\right )}{2 \sqrt {\frac {x +2}{3+x}}\, \sqrt {\left (3+x \right ) \left (x +2\right )}}\) | \(81\) |
risch | \(\frac {x +2}{\sqrt {\frac {x +2}{3+x}}}+\frac {\left (-\frac {\ln \left (\frac {5}{2}+x +\sqrt {x^{2}+5 x +6}\right )}{2}+\sqrt {2}\, \arctanh \left (\frac {\left (7+3 x \right ) \sqrt {2}}{4 \sqrt {\left (1+x \right )^{2}+5+3 x}}\right )\right ) \sqrt {\left (3+x \right ) \left (x +2\right )}}{\sqrt {\frac {x +2}{3+x}}\, \left (3+x \right )}\) | \(87\) |
trager | \(3 \left (1+\frac {x}{3}\right ) \sqrt {-\frac {-x -2}{3+x}}-\frac {\ln \left (2 \sqrt {-\frac {-x -2}{3+x}}\, x +6 \sqrt {-\frac {-x -2}{3+x}}+2 x +5\right )}{2}-\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {4 \sqrt {-\frac {-x -2}{3+x}}\, x -3 \RootOf \left (\textit {\_Z}^{2}-2\right ) x +12 \sqrt {-\frac {-x -2}{3+x}}-7 \RootOf \left (\textit {\_Z}^{2}-2\right )}{1+x}\right )\) | \(130\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 103 vs.
\(2 (40) = 80\).
time = 0.51, size = 103, normalized size = 1.91 \begin {gather*} -\sqrt {2} \log \left (-\frac {\sqrt {2} - 2 \, \sqrt {\frac {x + 2}{x + 3}}}{\sqrt {2} + 2 \, \sqrt {\frac {x + 2}{x + 3}}}\right ) - \frac {\sqrt {\frac {x + 2}{x + 3}}}{\frac {x + 2}{x + 3} - 1} - \frac {1}{2} \, \log \left (\sqrt {\frac {x + 2}{x + 3}} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {\frac {x + 2}{x + 3}} - 1\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. 83 vs.
\(2 (40) = 80\).
time = 0.39, size = 83, normalized size = 1.54 \begin {gather*} {\left (x + 3\right )} \sqrt {\frac {x + 2}{x + 3}} + \sqrt {2} \log \left (\frac {2 \, \sqrt {2} {\left (x + 3\right )} \sqrt {\frac {x + 2}{x + 3}} + 3 \, x + 7}{x + 1}\right ) - \frac {1}{2} \, \log \left (\sqrt {\frac {x + 2}{x + 3}} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {\frac {x + 2}{x + 3}} - 1\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 {x}{\sqrt {\frac {x + 2}{x + 3}} \left (x + 1\right )}\, 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. 129 vs.
\(2 (40) = 80\).
time = 3.74, size = 129, normalized size = 2.39 \begin {gather*} \sqrt {2} \log \left (-\frac {\sqrt {2} - 2}{\sqrt {2} + 2}\right ) \mathrm {sgn}\left (x + 3\right ) - \frac {\sqrt {2} \log \left (\frac {{\left | -2 \, x - 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + 5 \, x + 6} - 2 \right |}}{{\left | -2 \, x + 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + 5 \, x + 6} - 2 \right |}}\right )}{\mathrm {sgn}\left (x + 3\right )} + \frac {\log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + 5 \, x + 6} - 5 \right |}\right )}{2 \, \mathrm {sgn}\left (x + 3\right )} + \frac {\sqrt {x^{2} + 5 \, x + 6}}{\mathrm {sgn}\left (x + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 62, normalized size = 1.15 \begin {gather*} 2\,\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\sqrt {\frac {x+2}{x+3}}\right )-\frac {\sqrt {\frac {x+2}{x+3}}}{\frac {x+2}{x+3}-1}-\mathrm {atanh}\left (\sqrt {\frac {x+2}{x+3}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________