Optimal. Leaf size=24 \[ 2 \sqrt{x-2}-4 \tan ^{-1}\left (\frac{\sqrt{x-2}}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0057144, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {50, 63, 203} \[ 2 \sqrt{x-2}-4 \tan ^{-1}\left (\frac{\sqrt{x-2}}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 203
Rubi steps
\begin{align*} \int \frac{\sqrt{-2+x}}{2+x} \, dx &=2 \sqrt{-2+x}-4 \int \frac{1}{\sqrt{-2+x} (2+x)} \, dx\\ &=2 \sqrt{-2+x}-8 \operatorname{Subst}\left (\int \frac{1}{4+x^2} \, dx,x,\sqrt{-2+x}\right )\\ &=2 \sqrt{-2+x}-4 \tan ^{-1}\left (\frac{\sqrt{-2+x}}{2}\right )\\ \end{align*}
Mathematica [A] time = 0.0055719, size = 24, normalized size = 1. \[ 2 \sqrt{x-2}-4 \tan ^{-1}\left (\frac{\sqrt{x-2}}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 19, normalized size = 0.8 \begin{align*} -4\,\arctan \left ( 1/2\,\sqrt{-2+x} \right ) +2\,\sqrt{-2+x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42182, size = 24, normalized size = 1. \begin{align*} 2 \, \sqrt{x - 2} - 4 \, \arctan \left (\frac{1}{2} \, \sqrt{x - 2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.90211, size = 58, normalized size = 2.42 \begin{align*} 2 \, \sqrt{x - 2} - 4 \, \arctan \left (\frac{1}{2} \, \sqrt{x - 2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.2493, size = 107, normalized size = 4.46 \begin{align*} \begin{cases} - 4 i \operatorname{acosh}{\left (\frac{2}{\sqrt{x + 2}} \right )} - \frac{2 i \sqrt{x + 2}}{\sqrt{-1 + \frac{4}{x + 2}}} + \frac{8 i}{\sqrt{-1 + \frac{4}{x + 2}} \sqrt{x + 2}} & \text{for}\: \frac{4}{\left |{x + 2}\right |} > 1 \\4 \operatorname{asin}{\left (\frac{2}{\sqrt{x + 2}} \right )} + \frac{2 \sqrt{x + 2}}{\sqrt{1 - \frac{4}{x + 2}}} - \frac{8}{\sqrt{1 - \frac{4}{x + 2}} \sqrt{x + 2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05946, size = 24, normalized size = 1. \begin{align*} 2 \, \sqrt{x - 2} - 4 \, \arctan \left (\frac{1}{2} \, \sqrt{x - 2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]