Optimal. Leaf size=39 \[ -\frac {a (a+b x)^{1+p}}{b^2 (1+p)}+\frac {(a+b x)^{2+p}}{b^2 (2+p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {45}
\begin {gather*} \frac {(a+b x)^{p+2}}{b^2 (p+2)}-\frac {a (a+b x)^{p+1}}{b^2 (p+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rubi steps
\begin {align*} \int x (a+b x)^p \, dx &=\int \left (-\frac {a (a+b x)^p}{b}+\frac {(a+b x)^{1+p}}{b}\right ) \, dx\\ &=-\frac {a (a+b x)^{1+p}}{b^2 (1+p)}+\frac {(a+b x)^{2+p}}{b^2 (2+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 33, normalized size = 0.85 \begin {gather*} \frac {(a+b x)^{1+p} (-a+b (1+p) x)}{b^2 (1+p) (2+p)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 2.46, size = 213, normalized size = 5.46 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\frac {x^2 a^p}{2},b\text {==}0\right \},\left \{\frac {a+a \text {Log}\left [\frac {a}{b}+x\right ]+b x \text {Log}\left [\frac {a}{b}+x\right ]}{b^2 \left (a+b x\right )},p\text {==}-2\right \},\left \{\frac {-a \text {Log}\left [\frac {a}{b}+x\right ]+b x}{b^2},p\text {==}-1\right \}\right \},-\frac {a^2 \left (a+b x\right )^p}{2 b^2+3 b^2 p+b^2 p^2}+\frac {a b p x \left (a+b x\right )^p}{2 b^2+3 b^2 p+b^2 p^2}+\frac {b^2 x^2 \left (a+b x\right )^p}{2 b^2+3 b^2 p+b^2 p^2}+\frac {b^2 p x^2 \left (a+b x\right )^p}{2 b^2+3 b^2 p+b^2 p^2}\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 36, normalized size = 0.92
method | result | size |
gosper | \(-\frac {\left (b x +a \right )^{1+p} \left (-x p b -b x +a \right )}{b^{2} \left (p^{2}+3 p +2\right )}\) | \(36\) |
risch | \(-\frac {\left (-x^{2} b^{2} p -x a p b -x^{2} b^{2}+a^{2}\right ) \left (b x +a \right )^{p}}{b^{2} \left (2+p \right ) \left (1+p \right )}\) | \(50\) |
norman | \(\frac {x^{2} {\mathrm e}^{p \ln \left (b x +a \right )}}{2+p}+\frac {p a x \,{\mathrm e}^{p \ln \left (b x +a \right )}}{b \left (p^{2}+3 p +2\right )}-\frac {a^{2} {\mathrm e}^{p \ln \left (b x +a \right )}}{b^{2} \left (p^{2}+3 p +2\right )}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 42, normalized size = 1.08 \begin {gather*} \frac {{\left (b^{2} {\left (p + 1\right )} x^{2} + a b p x - a^{2}\right )} {\left (b x + a\right )}^{p}}{{\left (p^{2} + 3 \, p + 2\right )} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 53, normalized size = 1.36 \begin {gather*} \frac {{\left (a b p x + {\left (b^{2} p + b^{2}\right )} x^{2} - a^{2}\right )} {\left (b x + a\right )}^{p}}{b^{2} p^{2} + 3 \, b^{2} p + 2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.24, size = 201, normalized size = 5.15 \begin {gather*} \begin {cases} \frac {a^{p} x^{2}}{2} & \text {for}\: b = 0 \\\frac {a \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} + \frac {a}{a b^{2} + b^{3} x} + \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} & \text {for}\: p = -2 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {x}{b} & \text {for}\: p = -1 \\- \frac {a^{2} \left (a + b x\right )^{p}}{b^{2} p^{2} + 3 b^{2} p + 2 b^{2}} + \frac {a b p x \left (a + b x\right )^{p}}{b^{2} p^{2} + 3 b^{2} p + 2 b^{2}} + \frac {b^{2} p x^{2} \left (a + b x\right )^{p}}{b^{2} p^{2} + 3 b^{2} p + 2 b^{2}} + \frac {b^{2} x^{2} \left (a + b x\right )^{p}}{b^{2} p^{2} + 3 b^{2} p + 2 b^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 83, normalized size = 2.13 \begin {gather*} \frac {-a^{2} \mathrm {e}^{p \ln \left (a+b x\right )}+a b p x \mathrm {e}^{p \ln \left (a+b x\right )}+b^{2} p x^{2} \mathrm {e}^{p \ln \left (a+b x\right )}+b^{2} x^{2} \mathrm {e}^{p \ln \left (a+b x\right )}}{b^{2} p^{2}+3 b^{2} p+2 b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.39, size = 94, normalized size = 2.41 \begin {gather*} \left \{\begin {array}{cl} -\frac {a\,\ln \left (a+b\,x\right )-b\,x}{b^2} & \text {\ if\ \ }p=-1\\ \frac {\ln \left (a+b\,x\right )+\frac {a}{a+b\,x}}{b^2} & \text {\ if\ \ }p=-2\\ \frac {2\,\left (\frac {{\left (a+b\,x\right )}^{p+2}}{2\,p+4}-\frac {a\,{\left (a+b\,x\right )}^{p+1}}{2\,p+2}\right )}{b^2} & \text {\ if\ \ }p\neq -1\wedge p\neq -2 \end {array}\right . \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________