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.07, 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 = {371, 1398, 819, 635, 207, 260} \[ -\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) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 260
Rule 371
Rule 635
Rule 819
Rule 1398
Rubi steps
\begin {align*} \int \frac {\left (a+b \sqrt {c+d x}\right )^2}{x^2} \, dx &=d \operatorname {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^2} \, dx,x,c+d x\right )\\ &=(2 d) \operatorname {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 \operatorname {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) \operatorname {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )+\left (2 b^2 d\right ) \operatorname {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 [B] time = 0.20, size = 161, normalized size = 2.98 \[ \frac {\sqrt {c} \left (a^4+2 a^3 b \sqrt {c+d x}-2 a b^3 c \sqrt {c+d x}-b^4 c (c+2 d x)\right )+b d x \left (a+b \sqrt {c}\right ) \left (a-b \sqrt {c}\right )^2 \log \left (\sqrt {c+d x}+\sqrt {c}\right )+b d x \left (b \sqrt {c}-a\right ) \left (a+b \sqrt {c}\right )^2 \log \left (\sqrt {c}-\sqrt {c+d x}\right )}{\sqrt {c} x \left (b^2 c-a^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 147, normalized size = 2.72 \[ \left [\frac {b^{2} c d x \log \relax (x) + 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 \relax (x) + 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 ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.44, size = 80, normalized size = 1.48 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 60, normalized size = 1.11 \[ b^{2} d \ln \relax (x )-\frac {2 a b d \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}-\frac {b^{2} c}{x}-\frac {a^{2}}{x}-\frac {2 \sqrt {d x +c}\, a b}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.97, size = 73, normalized size = 1.35 \[ {\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 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.12, size = 131, normalized size = 2.43 \[ 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 ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 87.77, size = 139, normalized size = 2.57 \[ - \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 {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________