Optimal. Leaf size=56 \[ -4 x+21 \log (x)-9 \log (x+1)+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x+1}}{\sqrt {3-x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {6742, 36, 29, 31, 105, 53, 619, 216, 93, 207} \[ -4 x+21 \log (x)-9 \log (x+1)+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x+1}}{\sqrt {3-x}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 53
Rule 93
Rule 105
Rule 207
Rule 216
Rule 619
Rule 6742
Rubi steps
\begin {align*} \int \frac {\left (2 \sqrt {3-x}+\frac {3}{\sqrt {1+x}}\right )^2}{x} \, dx &=\int \left (-4+\frac {12}{x}+\frac {9}{x (1+x)}+\frac {12 \sqrt {3-x}}{x \sqrt {1+x}}\right ) \, dx\\ &=-4 x+12 \log (x)+9 \int \frac {1}{x (1+x)} \, dx+12 \int \frac {\sqrt {3-x}}{x \sqrt {1+x}} \, dx\\ &=-4 x+12 \log (x)+9 \int \frac {1}{x} \, dx-9 \int \frac {1}{1+x} \, dx-12 \int \frac {1}{\sqrt {3-x} \sqrt {1+x}} \, dx+36 \int \frac {1}{\sqrt {3-x} x \sqrt {1+x}} \, dx\\ &=-4 x+21 \log (x)-9 \log (1+x)-12 \int \frac {1}{\sqrt {3+2 x-x^2}} \, dx+72 \operatorname {Subst}\left (\int \frac {1}{-1+3 x^2} \, dx,x,\frac {\sqrt {1+x}}{\sqrt {3-x}}\right )\\ &=-4 x-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {1+x}}{\sqrt {3-x}}\right )+21 \log (x)-9 \log (1+x)+3 \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{16}}} \, dx,x,2-2 x\right )\\ &=-4 x+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {1+x}}{\sqrt {3-x}}\right )+21 \log (x)-9 \log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 57, normalized size = 1.02 \[ -4 x+21 \log (x)-9 \log (x+1)+24 \sin ^{-1}\left (\frac {\sqrt {3-x}}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {1-\frac {x}{3}}}{\sqrt {x+1}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 81, normalized size = 1.45 \[ 6 \, \sqrt {3} \log \left (-\frac {\sqrt {3} {\left (x + 3\right )} \sqrt {x + 1} \sqrt {-x + 3} + x^{2} - 6 \, x - 9}{x^{2}}\right ) - 4 \, x + 12 \, \arctan \left (\frac {\sqrt {x + 1} {\left (x - 1\right )} \sqrt {-x + 3}}{x^{2} - 2 \, x - 3}\right ) - 9 \, \log \left (x + 1\right ) + 21 \, \log \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 76, normalized size = 1.36 \[ -4 x +21 \ln \relax (x )-9 \ln \left (x +1\right )+\frac {12 \sqrt {x +1}\, \sqrt {-x +3}\, \left (-\sqrt {3}\, \arctanh \left (\frac {\left (x +3\right ) \sqrt {3}}{3 \sqrt {-x^{2}+2 x +3}}\right )-\arcsin \left (\frac {x}{2}-\frac {1}{2}\right )\right )}{\sqrt {-x^{2}+2 x +3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.96, size = 57, normalized size = 1.02 \[ -12 \, \sqrt {3} \log \left (\frac {2 \, \sqrt {3} \sqrt {-x^{2} + 2 \, x + 3}}{{\left | x \right |}} + \frac {6}{{\left | x \right |}} + 2\right ) - 4 \, x + 12 \, \arcsin \left (-\frac {1}{2} \, x + \frac {1}{2}\right ) - 9 \, \log \left (x + 1\right ) + 21 \, \log \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.91, size = 158, normalized size = 2.82 \[ 48\,\mathrm {atan}\left (\frac {\sqrt {3-x}-4\,\sqrt {3}+3\,\sqrt {3}\,\sqrt {x+1}}{\sqrt {x+1}-3\,\sqrt {3}\,\sqrt {3-x}+8}\right )-9\,\ln \left (x+1\right )-4\,x+21\,\ln \relax (x)+12\,\sqrt {3}\,\ln \left (\frac {6\,x-12\,\sqrt {x+1}+4\,\sqrt {3}\,\sqrt {3-x}+2\,\sqrt {3}\,\sqrt {x+1}\,\sqrt {3-x}-6}{3\,x+6\,\sqrt {3}\,\sqrt {3-x}-18}\right )-12\,\sqrt {3}\,\ln \left (\frac {\sqrt {x+1}-1}{\sqrt {3}-\sqrt {3-x}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (2 \sqrt {3 - x} \sqrt {x + 1} + 3\right )^{2}}{x \left (x + 1\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________