Optimal. Leaf size=202 \[ \frac {4 a b^2 d}{\left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )}-\frac {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}+\frac {2 a b \left (a^2+3 b^2 c\right ) d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c} \left (a^2-b^2 c\right )^3}+\frac {b^2 \left (3 a^2+b^2 c\right ) d \log (x)}{\left (a^2-b^2 c\right )^3}-\frac {2 b^2 \left (3 a^2+b^2 c\right ) d \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {378, 1412, 837,
815, 649, 212, 266} \begin {gather*} \frac {4 a b^2 d}{\left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )}-\frac {a-b \sqrt {c+d x}}{x \left (a^2-b^2 c\right ) \left (a+b \sqrt {c+d x}\right )}+\frac {b^2 d \log (x) \left (3 a^2+b^2 c\right )}{\left (a^2-b^2 c\right )^3}-\frac {2 b^2 d \left (3 a^2+b^2 c\right ) \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}+\frac {2 a b d \left (a^2+3 b^2 c\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c} \left (a^2-b^2 c\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 266
Rule 378
Rule 649
Rule 815
Rule 837
Rule 1412
Rubi steps
\begin {align*} \int \frac {1}{x^2 \left (a+b \sqrt {c+d x}\right )^2} \, dx &=d \text {Subst}\left (\int \frac {1}{\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 {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}+\frac {d \text {Subst}\left (\int \frac {-2 a b c+2 b^2 c x}{(a+b x)^2 \left (-c+x^2\right )} \, dx,x,\sqrt {c+d x}\right )}{c \left (a^2-b^2 c\right )}\\ &=-\frac {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}+\frac {d \text {Subst}\left (\int \left (-\frac {4 a b^3 c}{\left (a^2-b^2 c\right ) (a+b x)^2}-\frac {2 b^3 c \left (3 a^2+b^2 c\right )}{\left (-a^2+b^2 c\right )^2 (a+b x)}+\frac {2 b c \left (a \left (a^2+3 b^2 c\right )-b \left (3 a^2+b^2 c\right ) x\right )}{\left (a^2-b^2 c\right )^2 \left (c-x^2\right )}\right ) \, dx,x,\sqrt {c+d x}\right )}{c \left (a^2-b^2 c\right )}\\ &=\frac {4 a b^2 d}{\left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )}-\frac {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}-\frac {2 b^2 \left (3 a^2+b^2 c\right ) d \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}+\frac {(2 b d) \text {Subst}\left (\int \frac {a \left (a^2+3 b^2 c\right )-b \left (3 a^2+b^2 c\right ) x}{c-x^2} \, dx,x,\sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}\\ &=\frac {4 a b^2 d}{\left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )}-\frac {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}-\frac {2 b^2 \left (3 a^2+b^2 c\right ) d \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}-\frac {\left (2 b^2 \left (3 a^2+b^2 c\right ) d\right ) \text {Subst}\left (\int \frac {x}{c-x^2} \, dx,x,\sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}+\frac {\left (2 a b \left (a^2+3 b^2 c\right ) d\right ) \text {Subst}\left (\int \frac {1}{c-x^2} \, dx,x,\sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}\\ &=\frac {4 a b^2 d}{\left (a^2-b^2 c\right )^2 \left (a+b \sqrt {c+d x}\right )}-\frac {a-b \sqrt {c+d x}}{\left (a^2-b^2 c\right ) x \left (a+b \sqrt {c+d x}\right )}+\frac {2 a b \left (a^2+3 b^2 c\right ) d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c} \left (a^2-b^2 c\right )^3}+\frac {b^2 \left (3 a^2+b^2 c\right ) d \log (x)}{\left (a^2-b^2 c\right )^3}-\frac {2 b^2 \left (3 a^2+b^2 c\right ) d \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.31, size = 177, normalized size = 0.88 \begin {gather*} \frac {\frac {\left (a^2-b^2 c\right ) \left (-a^3+a^2 b \sqrt {c+d x}-b^3 c \sqrt {c+d x}+a b^2 (c+4 d x)\right )}{x \left (a+b \sqrt {c+d x}\right )}+\frac {2 a b \left (a^2+3 b^2 c\right ) d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 \left (3 a^2+b^2 c\right ) d \log (-d x)-2 b^2 \left (3 a^2+b^2 c\right ) d \log \left (a+b \sqrt {c+d x}\right )}{\left (a^2-b^2 c\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 182, normalized size = 0.90
method | result | size |
derivativedivides | \(2 d \left (\frac {a \,b^{2}}{\left (-b^{2} c +a^{2}\right )^{2} \left (a +b \sqrt {d x +c}\right )}-\frac {b^{2} \left (b^{2} c +3 a^{2}\right ) \ln \left (a +b \sqrt {d x +c}\right )}{\left (-b^{2} c +a^{2}\right )^{3}}+\frac {-\frac {\left (a \,b^{3} c -a^{3} b \right ) \sqrt {d x +c}-\frac {b^{4} c^{2}}{2}+\frac {a^{4}}{2}}{d x}+b \left (-\frac {\left (-b^{3} c -3 a^{2} b \right ) \ln \left (-d x \right )}{2}+\frac {\left (3 a \,b^{2} c +a^{3}\right ) \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}\right )}{\left (-b^{2} c +a^{2}\right )^{3}}\right )\) | \(182\) |
default | \(2 d \left (\frac {a \,b^{2}}{\left (-b^{2} c +a^{2}\right )^{2} \left (a +b \sqrt {d x +c}\right )}-\frac {b^{2} \left (b^{2} c +3 a^{2}\right ) \ln \left (a +b \sqrt {d x +c}\right )}{\left (-b^{2} c +a^{2}\right )^{3}}+\frac {-\frac {\left (a \,b^{3} c -a^{3} b \right ) \sqrt {d x +c}-\frac {b^{4} c^{2}}{2}+\frac {a^{4}}{2}}{d x}+b \left (-\frac {\left (-b^{3} c -3 a^{2} b \right ) \ln \left (-d x \right )}{2}+\frac {\left (3 a \,b^{2} c +a^{3}\right ) \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}\right )}{\left (-b^{2} c +a^{2}\right )^{3}}\right )\) | \(182\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.66, size = 367, normalized size = 1.82 \begin {gather*} -d {\left (\frac {{\left (b^{4} c + 3 \, a^{2} b^{2}\right )} \log \left (d x\right )}{b^{6} c^{3} - 3 \, a^{2} b^{4} c^{2} + 3 \, a^{4} b^{2} c - a^{6}} - \frac {2 \, {\left (b^{4} c + 3 \, a^{2} b^{2}\right )} \log \left (\sqrt {d x + c} b + a\right )}{b^{6} c^{3} - 3 \, a^{2} b^{4} c^{2} + 3 \, a^{4} b^{2} c - a^{6}} - \frac {{\left (3 \, a b^{3} c + a^{3} b\right )} \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{{\left (b^{6} c^{3} - 3 \, a^{2} b^{4} c^{2} + 3 \, a^{4} b^{2} c - a^{6}\right )} \sqrt {c}} + \frac {4 \, {\left (d x + c\right )} a b^{2} - 3 \, a b^{2} c - a^{3} - {\left (b^{3} c - a^{2} b\right )} \sqrt {d x + c}}{a b^{4} c^{3} - 2 \, a^{3} b^{2} c^{2} + a^{5} c - {\left (b^{5} c^{2} - 2 \, a^{2} b^{3} c + a^{4} b\right )} {\left (d x + c\right )}^{\frac {3}{2}} - {\left (a b^{4} c^{2} - 2 \, a^{3} b^{2} c + a^{5}\right )} {\left (d x + c\right )} + {\left (b^{5} c^{3} - 2 \, a^{2} b^{3} c^{2} + a^{4} b c\right )} \sqrt {d x + c}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 424 vs.
\(2 (195) = 390\).
time = 0.56, size = 854, normalized size = 4.23 \begin {gather*} \left [-\frac {b^{6} c^{4} - a^{2} b^{4} c^{3} - a^{4} b^{2} c^{2} + a^{6} c + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x - {\left ({\left (3 \, a b^{5} c + a^{3} b^{3}\right )} d^{2} x^{2} + {\left (3 \, a b^{5} c^{2} - 2 \, a^{3} b^{3} c - a^{5} b\right )} d x\right )} \sqrt {c} \log \left (\frac {d x - 2 \, \sqrt {d x + c} \sqrt {c} + 2 \, c}{x}\right ) - 2 \, {\left ({\left (b^{6} c^{2} + 3 \, a^{2} b^{4} c\right )} d^{2} x^{2} + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x\right )} \log \left (\sqrt {d x + c} b + a\right ) + {\left ({\left (b^{6} c^{2} + 3 \, a^{2} b^{4} c\right )} d^{2} x^{2} + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x\right )} \log \left (x\right ) - 2 \, {\left (a b^{5} c^{3} - 2 \, a^{3} b^{3} c^{2} + a^{5} b c + 2 \, {\left (a b^{5} c^{2} - a^{3} b^{3} c\right )} d x\right )} \sqrt {d x + c}}{{\left (b^{8} c^{4} - 3 \, a^{2} b^{6} c^{3} + 3 \, a^{4} b^{4} c^{2} - a^{6} b^{2} c\right )} d x^{2} + {\left (b^{8} c^{5} - 4 \, a^{2} b^{6} c^{4} + 6 \, a^{4} b^{4} c^{3} - 4 \, a^{6} b^{2} c^{2} + a^{8} c\right )} x}, -\frac {b^{6} c^{4} - a^{2} b^{4} c^{3} - a^{4} b^{2} c^{2} + a^{6} c + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x - 2 \, {\left ({\left (3 \, a b^{5} c + a^{3} b^{3}\right )} d^{2} x^{2} + {\left (3 \, a b^{5} c^{2} - 2 \, a^{3} b^{3} c - a^{5} b\right )} d x\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {d x + c} \sqrt {-c}}{c}\right ) - 2 \, {\left ({\left (b^{6} c^{2} + 3 \, a^{2} b^{4} c\right )} d^{2} x^{2} + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x\right )} \log \left (\sqrt {d x + c} b + a\right ) + {\left ({\left (b^{6} c^{2} + 3 \, a^{2} b^{4} c\right )} d^{2} x^{2} + {\left (b^{6} c^{3} + 2 \, a^{2} b^{4} c^{2} - 3 \, a^{4} b^{2} c\right )} d x\right )} \log \left (x\right ) - 2 \, {\left (a b^{5} c^{3} - 2 \, a^{3} b^{3} c^{2} + a^{5} b c + 2 \, {\left (a b^{5} c^{2} - a^{3} b^{3} c\right )} d x\right )} \sqrt {d x + c}}{{\left (b^{8} c^{4} - 3 \, a^{2} b^{6} c^{3} + 3 \, a^{4} b^{4} c^{2} - a^{6} b^{2} c\right )} d x^{2} + {\left (b^{8} c^{5} - 4 \, a^{2} b^{6} c^{4} + 6 \, a^{4} b^{4} c^{3} - 4 \, a^{6} b^{2} c^{2} + a^{8} c\right )} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x^{2} \left (a + b \sqrt {c + d x}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.92, size = 311, normalized size = 1.54 \begin {gather*} -\frac {{\left (b^{4} c d + 3 \, a^{2} b^{2} d\right )} \log \left (-d x\right )}{b^{6} c^{3} - 3 \, a^{2} b^{4} c^{2} + 3 \, a^{4} b^{2} c - a^{6}} + \frac {2 \, {\left (b^{5} c d + 3 \, a^{2} b^{3} d\right )} \log \left ({\left | -\sqrt {d x + c} b - a \right |}\right )}{b^{7} c^{3} - 3 \, a^{2} b^{5} c^{2} + 3 \, a^{4} b^{3} c - a^{6} b} + \frac {2 \, {\left (3 \, a b^{3} c d + a^{3} b d\right )} \arctan \left (\frac {\sqrt {d x + c}}{\sqrt {-c}}\right )}{{\left (b^{6} c^{3} - 3 \, a^{2} b^{4} c^{2} + 3 \, a^{4} b^{2} c - a^{6}\right )} \sqrt {-c}} - \frac {\sqrt {d x + c} b^{3} c d - 4 \, {\left (d x + c\right )} a b^{2} d + 3 \, a b^{2} c d - \sqrt {d x + c} a^{2} b d + a^{3} d}{{\left (b^{4} c^{2} - 2 \, a^{2} b^{2} c + a^{4}\right )} {\left ({\left (d x + c\right )}^{\frac {3}{2}} b - \sqrt {d x + c} b c + {\left (d x + c\right )} a - a c\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.73, size = 275, normalized size = 1.36 \begin {gather*} \frac {b\,d\,\ln \left (\sqrt {c+d\,x}+\sqrt {c}\right )}{a^3\,\sqrt {c}-b^3\,c^2+3\,a\,b^2\,c^{3/2}-3\,a^2\,b\,c}-\frac {\frac {a\,d\,\left (a^2+3\,c\,b^2\right )}{{\left (b^2\,c-a^2\right )}^2}+\frac {b\,d\,\sqrt {c+d\,x}}{b^2\,c-a^2}-\frac {4\,a\,b^2\,d\,\left (c+d\,x\right )}{a^4-2\,a^2\,b^2\,c+b^4\,c^2}}{b\,{\left (c+d\,x\right )}^{3/2}-a\,c+a\,\left (c+d\,x\right )-b\,c\,\sqrt {c+d\,x}}-\frac {b\,d\,\ln \left (\sqrt {c+d\,x}-\sqrt {c}\right )}{a^3\,\sqrt {c}+b^3\,c^2+3\,a\,b^2\,c^{3/2}+3\,a^2\,b\,c}-\ln \left (a+b\,\sqrt {c+d\,x}\right )\,\left (\frac {6\,b^2\,d}{{\left (b^2\,c-a^2\right )}^2}-\frac {8\,b^4\,c\,d}{{\left (b^2\,c-a^2\right )}^3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________