Optimal. Leaf size=747 \[ -\frac {4 b^2 \sqrt {c} d \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}\right )}{\sqrt {a^2 d^2+b^2 c^2} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}+\frac {4 b^2 \sqrt {c} d \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}\right )}{\sqrt {a^2 d^2+b^2 c^2} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}+\frac {4 a d^2 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}\right )}{c^{3/2} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}+\frac {4 a d^2 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}\right )}{c^{3/2} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}-\frac {4 a^2 d^3 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}\right )}{c^{3/2} \sqrt {a^2 d^2+b^2 c^2} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}+\frac {4 a^2 d^3 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}\right )}{c^{3/2} \sqrt {a^2 d^2+b^2 c^2} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}+\frac {2 \sqrt {a^2 x^2+b^2} (a c x-6 a d)+2 \left (a^2 c x^2-6 a^2 d x-b^2 c\right )}{3 a c \sqrt {\sqrt {a^2 x^2+b^2}+a x}} \]
________________________________________________________________________________________
Rubi [A] time = 0.89, antiderivative size = 279, normalized size of antiderivative = 0.37, number of steps used = 12, number of rules used = 8, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {6742, 2117, 14, 2119, 1628, 826, 1166, 205} \begin {gather*} \frac {4 d \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}\right )}{c^{3/2}}+\frac {4 d \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}\right )}{c^{3/2}}-\frac {4 d \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{c}-\frac {b^2}{a \sqrt {\sqrt {a^2 x^2+b^2}+a x}}+\frac {\left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}{3 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 205
Rule 826
Rule 1166
Rule 1628
Rule 2117
Rule 2119
Rule 6742
Rubi steps
\begin {align*} \int \frac {(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{d+c x} \, dx &=\int \left (\sqrt {a x+\sqrt {b^2+a^2 x^2}}-\frac {2 d \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{d+c x}\right ) \, dx\\ &=-\left ((2 d) \int \frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{d+c x} \, dx\right )+\int \sqrt {a x+\sqrt {b^2+a^2 x^2}} \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {b^2+x^2}{x^{3/2}} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{2 a}-(2 d) \operatorname {Subst}\left (\int \frac {b^2+x^2}{\sqrt {x} \left (-b^2 c+2 a d x+c x^2\right )} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{x^{3/2}}+\sqrt {x}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{2 a}-(2 d) \operatorname {Subst}\left (\int \left (\frac {1}{c \sqrt {x}}+\frac {2 \left (b^2 c-a d x\right )}{c \sqrt {x} \left (-b^2 c+2 a d x+c x^2\right )}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )\\ &=-\frac {b^2}{a \sqrt {a x+\sqrt {b^2+a^2 x^2}}}-\frac {4 d \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{c}+\frac {\left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}{3 a}-\frac {(4 d) \operatorname {Subst}\left (\int \frac {b^2 c-a d x}{\sqrt {x} \left (-b^2 c+2 a d x+c x^2\right )} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{c}\\ &=-\frac {b^2}{a \sqrt {a x+\sqrt {b^2+a^2 x^2}}}-\frac {4 d \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{c}+\frac {\left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}{3 a}-\frac {(8 d) \operatorname {Subst}\left (\int \frac {b^2 c-a d x^2}{-b^2 c+2 a d x^2+c x^4} \, dx,x,\sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )}{c}\\ &=-\frac {b^2}{a \sqrt {a x+\sqrt {b^2+a^2 x^2}}}-\frac {4 d \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{c}+\frac {\left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}{3 a}+\frac {\left (4 d \left (a d-\sqrt {b^2 c^2+a^2 d^2}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a d-\sqrt {b^2 c^2+a^2 d^2}+c x^2} \, dx,x,\sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )}{c}+\frac {\left (4 d \left (a d+\sqrt {b^2 c^2+a^2 d^2}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a d+\sqrt {b^2 c^2+a^2 d^2}+c x^2} \, dx,x,\sqrt {a x+\sqrt {b^2+a^2 x^2}}\right )}{c}\\ &=-\frac {b^2}{a \sqrt {a x+\sqrt {b^2+a^2 x^2}}}-\frac {4 d \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{c}+\frac {\left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}{3 a}+\frac {4 d \sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2}}+\frac {4 d \sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}} \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.55, size = 388, normalized size = 0.52 \begin {gather*} \frac {-\frac {4 a d \left (a d \left (a d-\sqrt {a^2 d^2+b^2 c^2}\right )+b^2 c^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}\right )}{c^{3/2} \sqrt {a^2 d^2+b^2 c^2} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}+\frac {4 a d \left (a d \left (\sqrt {a^2 d^2+b^2 c^2}+a d\right )+b^2 c^2\right ) \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{\sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}\right )}{c^{3/2} \sqrt {a^2 d^2+b^2 c^2} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}-\frac {4 a d \sqrt {\sqrt {a^2 x^2+b^2}+a x}}{c}-\frac {b^2}{\sqrt {\sqrt {a^2 x^2+b^2}+a x}}+\frac {1}{3} \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 1.95, size = 747, normalized size = 1.00 \begin {gather*} \frac {2 (-6 a d+a c x) \sqrt {b^2+a^2 x^2}+2 \left (-b^2 c-6 a^2 d x+a^2 c x^2\right )}{3 a c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {4 a d^2 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2} \sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}-\frac {4 b^2 \sqrt {c} d \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {b^2 c^2+a^2 d^2} \sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}-\frac {4 a^2 d^3 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2} \sqrt {b^2 c^2+a^2 d^2} \sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}+\frac {4 a d^2 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2} \sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}+\frac {4 b^2 \sqrt {c} d \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {b^2 c^2+a^2 d^2} \sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}+\frac {4 a^2 d^3 \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{c^{3/2} \sqrt {b^2 c^2+a^2 d^2} \sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 511, normalized size = 0.68 \begin {gather*} \frac {2 \, {\left (3 \, a c \sqrt {-\frac {a d^{3} + c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}} \log \left (4 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d + 4 \, c \sqrt {-\frac {a d^{3} + c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}}\right ) - 3 \, a c \sqrt {-\frac {a d^{3} + c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}} \log \left (4 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d - 4 \, c \sqrt {-\frac {a d^{3} + c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}}\right ) + 3 \, a c \sqrt {-\frac {a d^{3} - c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}} \log \left (4 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d + 4 \, c \sqrt {-\frac {a d^{3} - c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}}\right ) - 3 \, a c \sqrt {-\frac {a d^{3} - c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}} \log \left (4 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d - 4 \, c \sqrt {-\frac {a d^{3} - c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{c^{6}}}}{c^{3}}}\right ) + {\left (2 \, a c x - 6 \, a d - \sqrt {a^{2} x^{2} + b^{2}} c\right )} \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}\right )}}{3 \, a c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}}{c x + d}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 180.00, size = 0, normalized size = 0.00 \[\int \frac {\left (c x -d \right ) \sqrt {a x +\sqrt {a^{2} x^{2}+b^{2}}}}{c x +d}\, dx\]
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*} \int \frac {\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}}{c x + d}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int -\frac {\sqrt {a\,x+\sqrt {a^2\,x^2+b^2}}\,\left (d-c\,x\right )}{d+c\,x} \,d 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 x + \sqrt {a^{2} x^{2} + b^{2}}} \left (c x - d\right )}{c x + d}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________