Optimal. Leaf size=137 \[ -\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a-b \sqrt {c}}}\right )}{2 \sqrt {a-b \sqrt {c}} \sqrt {c}}-\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a+b \sqrt {c}}}\right )}{2 \sqrt {a+b \sqrt {c}} \sqrt {c}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {378, 1412, 835,
12, 722, 1107, 213} \begin {gather*} -\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a-b \sqrt {c}}}\right )}{2 \sqrt {c} \sqrt {a-b \sqrt {c}}}-\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a+b \sqrt {c}}}\right )}{2 \sqrt {c} \sqrt {a+b \sqrt {c}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 378
Rule 722
Rule 835
Rule 1107
Rule 1412
Rubi steps
\begin {align*} \int \frac {\sqrt {a+b \sqrt {c+d x}}}{x^2} \, dx &=d \text {Subst}\left (\int \frac {\sqrt {a+b \sqrt {x}}}{(-c+x)^2} \, dx,x,c+d x\right )\\ &=(2 d) \text {Subst}\left (\int \frac {x \sqrt {a+b x}}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\sqrt {a+b \sqrt {c+d x}}}{x}-\frac {d \text {Subst}\left (\int -\frac {b c}{2 \sqrt {a+b x} \left (-c+x^2\right )} \, dx,x,\sqrt {c+d x}\right )}{c}\\ &=-\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\frac {1}{2} (b d) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x} \left (-c+x^2\right )} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\left (b^2 d\right ) \text {Subst}\left (\int \frac {1}{a^2-b^2 c-2 a x^2+x^4} \, dx,x,\sqrt {a+b \sqrt {c+d x}}\right )\\ &=-\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\frac {(b d) \text {Subst}\left (\int \frac {1}{-a-b \sqrt {c}+x^2} \, dx,x,\sqrt {a+b \sqrt {c+d x}}\right )}{2 \sqrt {c}}-\frac {(b d) \text {Subst}\left (\int \frac {1}{-a+b \sqrt {c}+x^2} \, dx,x,\sqrt {a+b \sqrt {c+d x}}\right )}{2 \sqrt {c}}\\ &=-\frac {\sqrt {a+b \sqrt {c+d x}}}{x}+\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a-b \sqrt {c}}}\right )}{2 \sqrt {a-b \sqrt {c}} \sqrt {c}}-\frac {b d \tanh ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {a+b \sqrt {c}}}\right )}{2 \sqrt {a+b \sqrt {c}} \sqrt {c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.39, size = 144, normalized size = 1.05 \begin {gather*} \frac {1}{2} \left (-\frac {2 \sqrt {a+b \sqrt {c+d x}}}{x}+\frac {b d \tan ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {-a-b \sqrt {c}}}\right )}{\sqrt {-a-b \sqrt {c}} \sqrt {c}}-\frac {b d \tan ^{-1}\left (\frac {\sqrt {a+b \sqrt {c+d x}}}{\sqrt {-a+b \sqrt {c}}}\right )}{\sqrt {-a+b \sqrt {c}} \sqrt {c}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 166, normalized size = 1.21
method | result | size |
derivativedivides | \(4 d \,b^{2} \left (-\frac {\sqrt {a +b \sqrt {d x +c}}}{4 \left (\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )-b^{2} c +a^{2}\right )}+\frac {\arctan \left (\frac {\sqrt {a +b \sqrt {d x +c}}}{\sqrt {-\sqrt {b^{2} c}-a}}\right )}{8 \sqrt {b^{2} c}\, \sqrt {-\sqrt {b^{2} c}-a}}-\frac {\arctan \left (\frac {\sqrt {a +b \sqrt {d x +c}}}{\sqrt {\sqrt {b^{2} c}-a}}\right )}{8 \sqrt {b^{2} c}\, \sqrt {\sqrt {b^{2} c}-a}}\right )\) | \(166\) |
default | \(4 d \,b^{2} \left (-\frac {\sqrt {a +b \sqrt {d x +c}}}{4 \left (\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )-b^{2} c +a^{2}\right )}+\frac {\arctan \left (\frac {\sqrt {a +b \sqrt {d x +c}}}{\sqrt {-\sqrt {b^{2} c}-a}}\right )}{8 \sqrt {b^{2} c}\, \sqrt {-\sqrt {b^{2} c}-a}}-\frac {\arctan \left (\frac {\sqrt {a +b \sqrt {d x +c}}}{\sqrt {\sqrt {b^{2} c}-a}}\right )}{8 \sqrt {b^{2} c}\, \sqrt {\sqrt {b^{2} c}-a}}\right )\) | \(166\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \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. 1003 vs.
\(2 (101) = 202\).
time = 0.40, size = 1003, normalized size = 7.32 \begin {gather*} -\frac {x \sqrt {-\frac {a b^{2} d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}} \log \left (\sqrt {\sqrt {d x + c} b + a} b^{4} d^{3} + {\left (b^{4} c d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (a b^{2} c^{2} - a^{3} c\right )}\right )} \sqrt {-\frac {a b^{2} d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}}\right ) - x \sqrt {-\frac {a b^{2} d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}} \log \left (\sqrt {\sqrt {d x + c} b + a} b^{4} d^{3} - {\left (b^{4} c d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (a b^{2} c^{2} - a^{3} c\right )}\right )} \sqrt {-\frac {a b^{2} d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}}\right ) + x \sqrt {-\frac {a b^{2} d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}} \log \left (\sqrt {\sqrt {d x + c} b + a} b^{4} d^{3} + {\left (b^{4} c d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (a b^{2} c^{2} - a^{3} c\right )}\right )} \sqrt {-\frac {a b^{2} d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}}\right ) - x \sqrt {-\frac {a b^{2} d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}} \log \left (\sqrt {\sqrt {d x + c} b + a} b^{4} d^{3} - {\left (b^{4} c d^{2} + \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (a b^{2} c^{2} - a^{3} c\right )}\right )} \sqrt {-\frac {a b^{2} d^{2} - \sqrt {\frac {b^{6} d^{4}}{b^{4} c^{3} - 2 \, a^{2} b^{2} c^{2} + a^{4} c}} {\left (b^{2} c^{2} - a^{2} c\right )}}{b^{2} c^{2} - a^{2} c}}\right ) + 4 \, \sqrt {\sqrt {d x + c} b + a}}{4 \, x} \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 {\sqrt {a + b \sqrt {c + d x}}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 232 vs.
\(2 (101) = 202\).
time = 3.65, size = 232, normalized size = 1.69 \begin {gather*} \frac {\frac {2 \, \sqrt {\sqrt {d x + c} b + a} b^{3} d^{2}}{b^{2} c - {\left (\sqrt {d x + c} b + a\right )}^{2} + 2 \, {\left (\sqrt {d x + c} b + a\right )} a - a^{2}} - \frac {{\left (b^{3} c d^{2} {\left | b \right |} + a b^{3} \sqrt {c} d^{2}\right )} \arctan \left (\frac {\sqrt {\sqrt {d x + c} b + a}}{\sqrt {-a + \sqrt {b^{2} c}}}\right )}{{\left (b c^{\frac {3}{2}} + a c\right )} \sqrt {b \sqrt {c} - a} {\left | b \right |}} + \frac {{\left (b^{3} c d^{2} {\left | b \right |} - a b^{3} \sqrt {c} d^{2}\right )} \arctan \left (\frac {\sqrt {\sqrt {d x + c} b + a}}{\sqrt {-a - \sqrt {b^{2} c}}}\right )}{{\left (b c^{\frac {3}{2}} - a c\right )} \sqrt {-b \sqrt {c} - a} {\left | b \right |}}}{2 \, b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+b\,\sqrt {c+d\,x}}}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________