Optimal. Leaf size=63 \[ -\frac {3 a \sqrt {1+(a+b x)^2}}{2 b^3}+\frac {x \sqrt {1+(a+b x)^2}}{2 b^2}-\frac {\left (1-2 a^2\right ) \sinh ^{-1}(a+b x)}{2 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {378, 757, 655,
221} \begin {gather*} -\frac {\left (1-2 a^2\right ) \sinh ^{-1}(a+b x)}{2 b^3}-\frac {3 a \sqrt {(a+b x)^2+1}}{2 b^3}+\frac {x \sqrt {(a+b x)^2+1}}{2 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 378
Rule 655
Rule 757
Rubi steps
\begin {align*} \int \frac {x^2}{\sqrt {1+(a+b x)^2}} \, dx &=\frac {\text {Subst}\left (\int \frac {(-a+x)^2}{\sqrt {1+x^2}} \, dx,x,a+b x\right )}{b^3}\\ &=\frac {x \sqrt {1+(a+b x)^2}}{2 b^2}+\frac {\text {Subst}\left (\int \frac {-1+2 a^2-3 a x}{\sqrt {1+x^2}} \, dx,x,a+b x\right )}{2 b^3}\\ &=-\frac {3 a \sqrt {1+(a+b x)^2}}{2 b^3}+\frac {x \sqrt {1+(a+b x)^2}}{2 b^2}-\frac {\left (1-2 a^2\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+x^2}} \, dx,x,a+b x\right )}{2 b^3}\\ &=-\frac {3 a \sqrt {1+(a+b x)^2}}{2 b^3}+\frac {x \sqrt {1+(a+b x)^2}}{2 b^2}-\frac {\left (1-2 a^2\right ) \sinh ^{-1}(a+b x)}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(145\) vs. \(2(63)=126\).
time = 0.37, size = 145, normalized size = 2.30 \begin {gather*} -\frac {-2 b (-3 a+b x) \sqrt {1+a^2+2 a b x+b^2 x^2}+\left (-1+2 a^2\right ) \left (b+\sqrt {b^2}\right ) \log \left (-a-\sqrt {b^2} x+\sqrt {1+a^2+2 a b x+b^2 x^2}\right )+\left (-1+2 a^2\right ) \left (-b+\sqrt {b^2}\right ) \log \left (a-\sqrt {b^2} x+\sqrt {1+a^2+2 a b x+b^2 x^2}\right )}{4 b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(154\) vs.
\(2(53)=106\).
time = 0.32, size = 155, normalized size = 2.46
method | result | size |
risch | \(-\frac {\left (-b x +3 a \right ) \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{2 b^{3}}+\frac {\ln \left (\frac {b^{2} x +a b}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}\right ) a^{2}}{b^{2} \sqrt {b^{2}}}-\frac {\ln \left (\frac {b^{2} x +a b}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}\right )}{2 b^{2} \sqrt {b^{2}}}\) | \(128\) |
default | \(\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 \ln \left (\frac {b^{2} x +a b}{\sqrt {b^{2}}}+\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 ) \ln \left (\frac {b^{2} x +a b}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}\right )}{2 b^{2} \sqrt {b^{2}}}\) | \(155\) |
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. 135 vs.
\(2 (53) = 106\).
time = 0.27, size = 135, normalized size = 2.14 \begin {gather*} \frac {3 \, a^{2} \operatorname {arsinh}\left (\frac {2 \, {\left (b^{2} x + a b\right )}}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}}}\right )}{2 \, b^{3}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} x}{2 \, b^{2}} - \frac {{\left (a^{2} + 1\right )} \operatorname {arsinh}\left (\frac {2 \, {\left (b^{2} x + a b\right )}}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}}}\right )}{2 \, b^{3}} - \frac {3 \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} a}{2 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 70, normalized size = 1.11 \begin {gather*} -\frac {{\left (2 \, a^{2} - 1\right )} \log \left (-b x - a + \sqrt {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 - 3 \, a\right )}}{2 \, b^{3}} \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^{2}}{\sqrt {a^{2} + 2 a b x + b^{2} x^{2} + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.67, size = 86, normalized size = 1.37 \begin {gather*} \frac {1}{2} \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} {\left (\frac {x}{b^{2}} - \frac {3 \, a}{b^{3}}\right )} - \frac {{\left (2 \, a^{2} - 1\right )} \log \left (-a b - {\left (x {\left | b \right |} - \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1}\right )} {\left | b \right |}\right )}{2 \, b^{2} {\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.02 \begin {gather*} \int \frac {x^2}{\sqrt {{\left (a+b\,x\right )}^2+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________