Optimal. Leaf size=110 \[ \frac {\sqrt {a x+\sqrt {-b+a x}}}{2 a}+\frac {\sqrt {-b+a x} \sqrt {a x+\sqrt {-b+a x}}}{a}+\frac {(1-4 b) \log \left (1+2 \sqrt {-b+a x}-2 \sqrt {a x+\sqrt {-b+a x}}\right )}{4 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 93, normalized size of antiderivative = 0.85, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {626, 635, 212}
\begin {gather*} \frac {\sqrt {\sqrt {a x-b}+a x} \left (2 \sqrt {a x-b}+1\right )}{2 a}-\frac {(1-4 b) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 626
Rule 635
Rubi steps
\begin {align*} \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{\sqrt {-b+a x}} \, dx &=\frac {2 \text {Subst}\left (\int \sqrt {b+x+x^2} \, dx,x,\sqrt {-b+a x}\right )}{a}\\ &=\frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-4 b) \text {Subst}\left (\int \frac {1}{\sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{4 a}\\ &=\frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-4 b) \text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {-b+a x}}{\sqrt {a x+\sqrt {-b+a x}}}\right )}{2 a}\\ &=\frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-4 b) \tanh ^{-1}\left (\frac {1+2 \sqrt {-b+a x}}{2 \sqrt {a x+\sqrt {-b+a x}}}\right )}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 89, normalized size = 0.81 \begin {gather*} \frac {2 \sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )+(1-4 b) \log \left (a \left (-1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}\right )\right )}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 71, normalized size = 0.65
method | result | size |
derivativedivides | \(\frac {\frac {\left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{2}+\frac {\left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{4}}{a}\) | \(71\) |
default | \(\frac {\frac {\left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{2}+\frac {\left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{4}}{a}\) | \(71\) |
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 [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \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 x - b}}}{\sqrt {a x - b}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.68, size = 74, normalized size = 0.67 \begin {gather*} -\frac {{\left (4 \, b - 1\right )} \log \left ({\left | -2 \, \sqrt {a x - b} + 2 \, \sqrt {a x + \sqrt {a x - b}} - 1 \right |}\right ) - 2 \, \sqrt {a x + \sqrt {a x - b}} {\left (2 \, \sqrt {a x - b} + 1\right )}}{4 \, a} \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\,x+\sqrt {a\,x-b}}}{\sqrt {a\,x-b}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________