Optimal. Leaf size=80 \[ -\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 80, 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, 835,
12, 653, 213} \begin {gather*} \frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {b d \left (a \sqrt {c+d x}+b c\right )}{2 c x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 378
Rule 653
Rule 835
Rule 1412
Rubi steps
\begin {align*} \int \frac {\left (a+b \sqrt {c+d x}\right )^2}{x^3} \, dx &=d^2 \text {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^3} \, dx,x,c+d x\right )\\ &=\left (2 d^2\right ) \text {Subst}\left (\int \frac {x (a+b x)^2}{\left (-c+x^2\right )^3} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {d^2 \text {Subst}\left (\int -\frac {2 b c (a+b x)}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )}{2 c}\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\left (b d^2\right ) \text {Subst}\left (\int \frac {a+b x}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {\left (a b d^2\right ) \text {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )}{2 c}\\ &=-\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 77, normalized size = 0.96 \begin {gather*} -\frac {a^2 c+a b \sqrt {c+d x} (2 c+d x)+b^2 c (c+2 d x)}{2 c x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 82, normalized size = 1.02
method | result | size |
derivativedivides | \(2 d^{2} \left (-\frac {\frac {a b \left (d x +c \right )^{\frac {3}{2}}}{4 c}+\frac {\left (d x +c \right ) b^{2}}{2}+\frac {a b \sqrt {d x +c}}{4}-\frac {b^{2} c}{4}+\frac {a^{2}}{4}}{d^{2} x^{2}}+\frac {a b \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{4 c^{\frac {3}{2}}}\right )\) | \(81\) |
default | \(b^{2} \left (-\frac {c}{2 x^{2}}-\frac {d}{x}\right )+4 a b \,d^{2} \left (-\frac {\frac {\left (d x +c \right )^{\frac {3}{2}}}{8 c}+\frac {\sqrt {d x +c}}{8}}{d^{2} x^{2}}+\frac {\arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{8 c^{\frac {3}{2}}}\right )-\frac {a^{2}}{2 x^{2}}\) | \(82\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 113, normalized size = 1.41 \begin {gather*} -\frac {1}{4} \, {\left (\frac {a b \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{c^{\frac {3}{2}}} + \frac {2 \, {\left (2 \, {\left (d x + c\right )} b^{2} c - b^{2} c^{2} + {\left (d x + c\right )}^{\frac {3}{2}} a b + \sqrt {d x + c} a b c + a^{2} c\right )}}{{\left (d x + c\right )}^{2} c - 2 \, {\left (d x + c\right )} c^{2} + c^{3}}\right )} d^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 181, normalized size = 2.26 \begin {gather*} \left [\frac {a b \sqrt {c} d^{2} x^{2} \log \left (\frac {d x + 2 \, \sqrt {d x + c} \sqrt {c} + 2 \, c}{x}\right ) - 4 \, b^{2} c^{2} d x - 2 \, b^{2} c^{3} - 2 \, a^{2} c^{2} - 2 \, {\left (a b c d x + 2 \, a b c^{2}\right )} \sqrt {d x + c}}{4 \, c^{2} x^{2}}, -\frac {a b \sqrt {-c} d^{2} x^{2} \arctan \left (\frac {\sqrt {d x + c} \sqrt {-c}}{c}\right ) + 2 \, b^{2} c^{2} d x + b^{2} c^{3} + a^{2} c^{2} + {\left (a b c d x + 2 \, a b c^{2}\right )} \sqrt {d x + c}}{2 \, c^{2} x^{2}}\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. 292 vs.
\(2 (68) = 136\).
time = 114.49, size = 292, normalized size = 3.65 \begin {gather*} - \frac {a^{2}}{2 x^{2}} - \frac {20 a b c^{2} d^{2} \sqrt {c + d x}}{- 8 c^{4} - 16 c^{3} d x + 8 c^{2} \left (c + d x\right )^{2}} + \frac {12 a b c d^{2} \left (c + d x\right )^{\frac {3}{2}}}{- 8 c^{4} - 16 c^{3} d x + 8 c^{2} \left (c + d x\right )^{2}} + \frac {3 a b c d^{2} \sqrt {\frac {1}{c^{5}}} \log {\left (- c^{3} \sqrt {\frac {1}{c^{5}}} + \sqrt {c + d x} \right )}}{4} - \frac {3 a b c d^{2} \sqrt {\frac {1}{c^{5}}} \log {\left (c^{3} \sqrt {\frac {1}{c^{5}}} + \sqrt {c + d x} \right )}}{4} - a b d^{2} \sqrt {\frac {1}{c^{3}}} \log {\left (- c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + a b d^{2} \sqrt {\frac {1}{c^{3}}} \log {\left (c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} - \frac {2 a b d \sqrt {c + d x}}{c x} - \frac {b^{2} c}{2 x^{2}} - \frac {b^{2} d}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.00, size = 105, normalized size = 1.31 \begin {gather*} -\frac {\frac {a b d^{3} \arctan \left (\frac {\sqrt {d x + c}}{\sqrt {-c}}\right )}{\sqrt {-c} c} + \frac {2 \, {\left (d x + c\right )} b^{2} c d^{3} - b^{2} c^{2} d^{3} + {\left (d x + c\right )}^{\frac {3}{2}} a b d^{3} + \sqrt {d x + c} a b c d^{3} + a^{2} c d^{3}}{c d^{2} x^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.40, size = 80, normalized size = 1.00 \begin {gather*} \frac {a\,b\,d^2\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}}{\sqrt {c}}\right )}{2\,c^{3/2}}-\frac {b^2\,c}{2\,x^2}-\frac {b^2\,d}{x}-\frac {a\,b\,\sqrt {c+d\,x}}{2\,x^2}-\frac {a\,b\,{\left (c+d\,x\right )}^{3/2}}{2\,c\,x^2}-\frac {a^2}{2\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________