Optimal. Leaf size=278 \[ \frac {4 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 {c} \sqrt {-\sqrt {a^2 d^2+b^2 c^2}-a d}}+\frac {4 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 {c} \sqrt {\sqrt {a^2 d^2+b^2 c^2}-a d}}+\frac {2 \sqrt {a^2 x^2+b^2} (3 a c x+6 a d)+2 \left (3 a^2 c x^2+6 a^2 d x+b^2 c\right )}{3 a c \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}} \]
________________________________________________________________________________________
Rubi [A] time = 1.09, antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.237, Rules used = {6742, 2117, 14, 2119, 1628, 828, 826, 1166, 208} \begin {gather*} -\frac {4 d \tanh ^{-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 {c} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}-\frac {4 d \tanh ^{-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 {c} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}+\frac {4 d}{c \sqrt {\sqrt {a^2 x^2+b^2}+a x}}-\frac {b^2}{3 a \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}+\frac {\sqrt {\sqrt {a^2 x^2+b^2}+a x}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 208
Rule 826
Rule 828
Rule 1166
Rule 1628
Rule 2117
Rule 2119
Rule 6742
Rubi steps
\begin {align*} \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx &=\int \left (\frac {1}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}}-\frac {2 d}{(d-c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}\right ) \, dx\\ &=-\left ((2 d) \int \frac {1}{(d-c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx\right )+\int \frac {1}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {b^2+x^2}{x^{5/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}{x^{3/2} \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^{5/2}}+\frac {1}{\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 x^{3/2}}+\frac {2 \left (b^2 c+a d x\right )}{c x^{3/2} \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}{3 a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}-\frac {4 d}{c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{a}-\frac {(4 d) \operatorname {Subst}\left (\int \frac {b^2 c+a d x}{x^{3/2} \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}{3 a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {4 d}{c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{a}-\frac {(4 d) \operatorname {Subst}\left (\int \frac {-a b^2 c d+b^2 c^2 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 )}{b^2 c^2}\\ &=-\frac {b^2}{3 a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {4 d}{c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{a}-\frac {(8 d) \operatorname {Subst}\left (\int \frac {-a b^2 c d+b^2 c^2 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 )}{b^2 c^2}\\ &=-\frac {b^2}{3 a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {4 d}{c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{a}-(4 d) \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 )-(4 d) \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 )\\ &=-\frac {b^2}{3 a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {4 d}{c \sqrt {a x+\sqrt {b^2+a^2 x^2}}}+\frac {\sqrt {a x+\sqrt {b^2+a^2 x^2}}}{a}-\frac {4 d \tanh ^{-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 {c} \sqrt {a d-\sqrt {b^2 c^2+a^2 d^2}}}-\frac {4 d \tanh ^{-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 {c} \sqrt {a d+\sqrt {b^2 c^2+a^2 d^2}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.28, size = 374, normalized size = 1.35 \begin {gather*} \frac {\frac {12 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 {b \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 )}{b \sqrt {a^2 d^2+b^2 c^2} \sqrt {a d-\sqrt {a^2 d^2+b^2 c^2}}}-\frac {12 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 {b \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 )}{b \sqrt {a^2 d^2+b^2 c^2} \sqrt {\sqrt {a^2 d^2+b^2 c^2}+a d}}+\frac {\sqrt {c} \left (6 a \left (\sqrt {a^2 x^2+b^2}+a x\right ) (c x+2 d)+2 b^2 c\right )}{\left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}}{3 a c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.74, size = 278, normalized size = 1.00 \begin {gather*} \frac {4 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 {c} \sqrt {-\sqrt {a^2 d^2+b^2 c^2}-a d}}+\frac {4 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 {c} \sqrt {\sqrt {a^2 d^2+b^2 c^2}-a d}}+\frac {2 \sqrt {a^2 x^2+b^2} (3 a c x+6 a d)+2 \left (3 a^2 c x^2+6 a^2 d x+b^2 c\right )}{3 a c \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.00, size = 781, normalized size = 2.81 \begin {gather*} \frac {2 \, {\left (3 \, a b^{2} c \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} + 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}\right )} \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}}\right ) - 3 \, a b^{2} c \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} - 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}\right )} \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}}\right ) - 3 \, a b^{2} c \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} + 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}\right )} \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}}\right ) + 3 \, a b^{2} c \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} - 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}\right )} \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}}\right ) - {\left (a^{2} c x^{2} + 6 \, a^{2} d x - b^{2} c - \sqrt {a^{2} x^{2} + b^{2}} {\left (a c x + 6 \, a d\right )}\right )} \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}\right )}}{3 \, a b^{2} 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 {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F(-2)] time = 180.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c x +d}{\left (c x -d \right ) \sqrt {a x +\sqrt {a^{2} x^{2}+b^{2}}}}\, dx \end {gather*}
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 {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}}\,{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 {d+c\,x}{\sqrt {a\,x+\sqrt {a^2\,x^2+b^2}}\,\left (d-c\,x\right )} \,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 {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} \left (c x - d\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________