Optimal. Leaf size=54 \[ -\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {378, 1412, 833,
649, 213, 266} \begin {gather*} -\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 266
Rule 378
Rule 649
Rule 833
Rule 1412
Rubi steps
\begin {align*} \int \frac {\left (a+b \sqrt {c+d x}\right )^2}{x^2} \, dx &=d \text {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^2} \, dx,x,c+d x\right )\\ &=(2 d) \text {Subst}\left (\int \frac {x (a+b x)^2}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {d \text {Subst}\left (\int \frac {-2 a b c-2 b^2 c x}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )}{c}\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}+(2 a b d) \text {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )+\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {x}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 64, normalized size = 1.19 \begin {gather*} -\frac {a^2+b^2 c+2 a b \sqrt {c+d x}}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (-d x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 63, normalized size = 1.17
method | result | size |
default | \(b^{2} \left (-\frac {c}{x}+d \ln \left (x \right )\right )+4 a b d \left (-\frac {\sqrt {d x +c}}{2 d x}-\frac {\arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{2 \sqrt {c}}\right )-\frac {a^{2}}{x}\) | \(63\) |
derivativedivides | \(2 d \left (-\frac {a b \sqrt {d x +c}+\frac {b^{2} c}{2}+\frac {a^{2}}{2}}{d x}+b \left (\frac {b \ln \left (-d x \right )}{2}-\frac {a \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}\right )\right )\) | \(64\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 73, normalized size = 1.35 \begin {gather*} {\left (b^{2} \log \left (d x\right ) + \frac {a b \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{\sqrt {c}} - \frac {b^{2} c + 2 \, \sqrt {d x + c} a b + a^{2}}{d x}\right )} d \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 147, normalized size = 2.72 \begin {gather*} \left [\frac {b^{2} c d x \log \left (x\right ) + a b \sqrt {c} d x \log \left (\frac {d x - 2 \, \sqrt {d x + c} \sqrt {c} + 2 \, c}{x}\right ) - b^{2} c^{2} - 2 \, \sqrt {d x + c} a b c - a^{2} c}{c x}, \frac {b^{2} c d x \log \left (x\right ) + 2 \, a b \sqrt {-c} d x \arctan \left (\frac {\sqrt {d x + c} \sqrt {-c}}{c}\right ) - b^{2} c^{2} - 2 \, \sqrt {d x + c} a b c - a^{2} c}{c x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 139 vs.
\(2 (49) = 98\).
time = 35.46, size = 139, normalized size = 2.57 \begin {gather*} - \frac {a^{2}}{x} - a b c d \sqrt {\frac {1}{c^{3}}} \log {\left (- c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + a b c d \sqrt {\frac {1}{c^{3}}} \log {\left (c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + \frac {4 a b d \operatorname {atan}{\left (\frac {\sqrt {c + d x}}{\sqrt {- c}} \right )}}{\sqrt {- c}} - \frac {2 a b \sqrt {c + d x}}{x} - \frac {b^{2} c}{x} + b^{2} d \log {\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.85, size = 80, normalized size = 1.48 \begin {gather*} \frac {b^{2} d^{2} \log \left (d x\right ) + \frac {2 \, a b d^{2} \arctan \left (\frac {\sqrt {d x + c}}{\sqrt {-c}}\right )}{\sqrt {-c}} - \frac {b^{2} c d^{2} + 2 \, \sqrt {d x + c} a b d^{2} + a^{2} d^{2}}{d x}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 131, normalized size = 2.43 \begin {gather*} b\,d\,\ln \left (2\,b\,d\,\left (b+\frac {a}{\sqrt {c}}\right )\,\sqrt {c+d\,x}-2\,b^2\,d\,\sqrt {c+d\,x}-2\,a\,b\,d\right )\,\left (b+\frac {a}{\sqrt {c}}\right )-\frac {a^2\,d+b^2\,c\,d+2\,a\,b\,d\,\sqrt {c+d\,x}}{d\,x}+b\,d\,\ln \left (2\,b\,d\,\left (b-\frac {a}{\sqrt {c}}\right )\,\sqrt {c+d\,x}-2\,b^2\,d\,\sqrt {c+d\,x}-2\,a\,b\,d\right )\,\left (b-\frac {a}{\sqrt {c}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________