Optimal. Leaf size=84 \[ -\frac {(1-2 a) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^2}-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}+\frac {(1-2 a) \text {ArcSin}(a+b x)}{2 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {6298, 81, 52,
55, 633, 222} \begin {gather*} \frac {(1-2 a) \text {ArcSin}(a+b x)}{2 b^2}-\frac {\sqrt {-a-b x+1} (a+b x+1)^{3/2}}{2 b^2}-\frac {(1-2 a) \sqrt {-a-b x+1} \sqrt {a+b x+1}}{2 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 55
Rule 81
Rule 222
Rule 633
Rule 6298
Rubi steps
\begin {align*} \int e^{\tanh ^{-1}(a+b x)} x \, dx &=\int \frac {x \sqrt {1+a+b x}}{\sqrt {1-a-b x}} \, dx\\ &=-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}+\frac {(1-2 a) \int \frac {\sqrt {1+a+b x}}{\sqrt {1-a-b x}} \, dx}{2 b}\\ &=-\frac {(1-2 a) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^2}-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}+\frac {(1-2 a) \int \frac {1}{\sqrt {1-a-b x} \sqrt {1+a+b x}} \, dx}{2 b}\\ &=-\frac {(1-2 a) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^2}-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}+\frac {(1-2 a) \int \frac {1}{\sqrt {(1-a) (1+a)-2 a b x-b^2 x^2}} \, dx}{2 b}\\ &=-\frac {(1-2 a) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^2}-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}-\frac {(1-2 a) \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{4 b^2}}} \, dx,x,-2 a b-2 b^2 x\right )}{4 b^3}\\ &=-\frac {(1-2 a) \sqrt {1-a-b x} \sqrt {1+a+b x}}{2 b^2}-\frac {\sqrt {1-a-b x} (1+a+b x)^{3/2}}{2 b^2}+\frac {(1-2 a) \sin ^{-1}(a+b x)}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 130, normalized size = 1.55 \begin {gather*} \frac {\sqrt {b} (-2+a-b x) \sqrt {1-a^2-2 a b x-b^2 x^2}+2 \sqrt {-b} \sinh ^{-1}\left (\frac {\sqrt {-b} \sqrt {1-a-b x}}{\sqrt {2} \sqrt {b}}\right )+4 a \sqrt {-b} \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {1-a-b x}}{\sqrt {2} \sqrt {-b}}\right )}{2 b^{5/2}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(245\) vs.
\(2(70)=140\).
time = 0.07, size = 246, normalized size = 2.93
method | result | size |
risch | \(-\frac {\left (-b x +a -2\right ) \left (b^{2} x^{2}+2 a b x +a^{2}-1\right )}{2 b^{2} \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}-\frac {a \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b \sqrt {b^{2}}}+\frac {\arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{2 b \sqrt {b^{2}}}\) | \(146\) |
default | \(b \left (-\frac {x \sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{2 b^{2}}-\frac {3 a \left (-\frac {\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{b^{2}}-\frac {a \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b \sqrt {b^{2}}}\right )}{2 b}+\frac {\left (-a^{2}+1\right ) \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{2 b^{2} \sqrt {b^{2}}}\right )+\left (1+a \right ) \left (-\frac {\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}{b^{2}}-\frac {a \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {a}{b}\right )}{\sqrt {-b^{2} x^{2}-2 a b x -a^{2}+1}}\right )}{b \sqrt {b^{2}}}\right )\) | \(246\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 209 vs.
\(2 (70) = 140\).
time = 0.46, size = 209, normalized size = 2.49 \begin {gather*} \frac {{\left (a + 1\right )} a \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{b^{2}} - \frac {3 \, a^{2} \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{2}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} x}{2 \, b} + \frac {{\left (a^{2} - 1\right )} \arcsin \left (-\frac {b^{2} x + a b}{\sqrt {a^{2} b^{2} - {\left (a^{2} - 1\right )} b^{2}}}\right )}{2 \, b^{2}} - \frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (a + 1\right )}}{b^{2}} + \frac {3 \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} a}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 92, normalized size = 1.10 \begin {gather*} \frac {{\left (2 \, a - 1\right )} \arctan \left (\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (b x + a\right )}}{b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) - \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (b x - a + 2\right )}}{2 \, b^{2}} \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 {x \left (a + b x + 1\right )}{\sqrt {- \left (a + b x - 1\right ) \left (a + b x + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 68, normalized size = 0.81 \begin {gather*} -\frac {1}{2} \, \sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2} + 1} {\left (\frac {x}{b} - \frac {a b - 2 \, b}{b^{3}}\right )} + \frac {{\left (2 \, a - 1\right )} \arcsin \left (-b x - a\right ) \mathrm {sgn}\left (b\right )}{2 \, b {\left | b \right |}} \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 {x\,\left (a+b\,x+1\right )}{\sqrt {1-{\left (a+b\,x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________