3.2.88 \(\int x (a+b x)^{p/2} \, dx\) [188]

Optimal. Leaf size=48 \[ -\frac {2 a (a+b x)^{\frac {2+p}{2}}}{b^2 (2+p)}+\frac {2 (a+b x)^{\frac {4+p}{2}}}{b^2 (4+p)} \]

[Out]

-2*a*(b*x+a)^(1+1/2*p)/b^2/(2+p)+2*(b*x+a)^(2+1/2*p)/b^2/(4+p)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {45} \begin {gather*} \frac {2 (a+b x)^{\frac {p+4}{2}}}{b^2 (p+4)}-\frac {2 a (a+b x)^{\frac {p+2}{2}}}{b^2 (p+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(a + b*x)^(p/2),x]

[Out]

(-2*a*(a + b*x)^((2 + p)/2))/(b^2*(2 + p)) + (2*(a + b*x)^((4 + p)/2))/(b^2*(4 + p))

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int x (a+b x)^{p/2} \, dx &=\int \left (\frac {(a+b x)^{1+\frac {p}{2}}}{b}-\frac {a (a+b x)^{p/2}}{b}\right ) \, dx\\ &=-\frac {2 a (a+b x)^{\frac {2+p}{2}}}{b^2 (2+p)}+\frac {2 (a+b x)^{\frac {4+p}{2}}}{b^2 (4+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 38, normalized size = 0.79 \begin {gather*} \frac {2 (a+b x)^{1+\frac {p}{2}} (-2 a+b (2+p) x)}{b^2 (2+p) (4+p)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*x)^(p/2),x]

[Out]

(2*(a + b*x)^(1 + p/2)*(-2*a + b*(2 + p)*x))/(b^2*(2 + p)*(4 + p))

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 43, normalized size = 0.90

method result size
gosper \(-\frac {2 \left (b x +a \right )^{\frac {p}{2}} \left (-x p b -2 b x +2 a \right ) \left (b x +a \right )}{b^{2} \left (p^{2}+6 p +8\right )}\) \(43\)
risch \(-\frac {2 \left (-x^{2} b^{2} p -x a p b -2 x^{2} b^{2}+2 a^{2}\right ) \left (b x +a \right )^{\frac {p}{2}}}{b^{2} \left (4+p \right ) \left (2+p \right )}\) \(54\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*((b*x+a)^(1/2))^p,x,method=_RETURNVERBOSE)

[Out]

-2*((b*x+a)^(1/2))^p*(-b*p*x-2*b*x+2*a)*(b*x+a)/b^2/(p^2+6*p+8)

________________________________________________________________________________________

Maxima [A]
time = 1.90, size = 45, normalized size = 0.94 \begin {gather*} \frac {2 \, {\left (b^{2} {\left (p + 2\right )} x^{2} + a b p x - 2 \, a^{2}\right )} {\left (b x + a\right )}^{\frac {1}{2} \, p}}{{\left (p^{2} + 6 \, p + 8\right )} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*((b*x+a)^(1/2))^p,x, algorithm="maxima")

[Out]

2*(b^2*(p + 2)*x^2 + a*b*p*x - 2*a^2)*(b*x + a)^(1/2*p)/((p^2 + 6*p + 8)*b^2)

________________________________________________________________________________________

Fricas [A]
time = 0.73, size = 58, normalized size = 1.21 \begin {gather*} \frac {2 \, {\left (a b p x + {\left (b^{2} p + 2 \, b^{2}\right )} x^{2} - 2 \, a^{2}\right )} \sqrt {b x + a}^{p}}{b^{2} p^{2} + 6 \, b^{2} p + 8 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*((b*x+a)^(1/2))^p,x, algorithm="fricas")

[Out]

2*(a*b*p*x + (b^2*p + 2*b^2)*x^2 - 2*a^2)*sqrt(b*x + a)^p/(b^2*p^2 + 6*b^2*p + 8*b^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (37) = 74\).
time = 0.23, size = 216, normalized size = 4.50 \begin {gather*} \begin {cases} \frac {a^{\frac {p}{2}} 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 = -4 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {x}{b} & \text {for}\: p = -2 \\- \frac {4 a^{2} \left (a + b x\right )^{\frac {p}{2}}}{b^{2} p^{2} + 6 b^{2} p + 8 b^{2}} + \frac {2 a b p x \left (a + b x\right )^{\frac {p}{2}}}{b^{2} p^{2} + 6 b^{2} p + 8 b^{2}} + \frac {2 b^{2} p x^{2} \left (a + b x\right )^{\frac {p}{2}}}{b^{2} p^{2} + 6 b^{2} p + 8 b^{2}} + \frac {4 b^{2} x^{2} \left (a + b x\right )^{\frac {p}{2}}}{b^{2} p^{2} + 6 b^{2} p + 8 b^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*((b*x+a)**(1/2))**p,x)

[Out]

Piecewise((a**(p/2)*x**2/2, Eq(b, 0)), (a*log(a/b + x)/(a*b**2 + b**3*x) + a/(a*b**2 + b**3*x) + b*x*log(a/b +
 x)/(a*b**2 + b**3*x), Eq(p, -4)), (-a*log(a/b + x)/b**2 + x/b, Eq(p, -2)), (-4*a**2*(a + b*x)**(p/2)/(b**2*p*
*2 + 6*b**2*p + 8*b**2) + 2*a*b*p*x*(a + b*x)**(p/2)/(b**2*p**2 + 6*b**2*p + 8*b**2) + 2*b**2*p*x**2*(a + b*x)
**(p/2)/(b**2*p**2 + 6*b**2*p + 8*b**2) + 4*b**2*x**2*(a + b*x)**(p/2)/(b**2*p**2 + 6*b**2*p + 8*b**2), True))

________________________________________________________________________________________

Giac [A]
time = 0.52, size = 86, normalized size = 1.79 \begin {gather*} \frac {2 \, {\left ({\left (b x + a\right )}^{\frac {1}{2} \, p} b^{2} p x^{2} + {\left (b x + a\right )}^{\frac {1}{2} \, p} a b p x + 2 \, {\left (b x + a\right )}^{\frac {1}{2} \, p} b^{2} x^{2} - 2 \, {\left (b x + a\right )}^{\frac {1}{2} \, p} a^{2}\right )}}{b^{2} p^{2} + 6 \, b^{2} p + 8 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*((b*x+a)^(1/2))^p,x, algorithm="giac")

[Out]

2*((b*x + a)^(1/2*p)*b^2*p*x^2 + (b*x + a)^(1/2*p)*a*b*p*x + 2*(b*x + a)^(1/2*p)*b^2*x^2 - 2*(b*x + a)^(1/2*p)
*a^2)/(b^2*p^2 + 6*b^2*p + 8*b^2)

________________________________________________________________________________________

Mupad [B]
time = 0.45, size = 94, normalized size = 1.96 \begin {gather*} \left \{\begin {array}{cl} -\frac {a\,\ln \left (a+b\,x\right )-b\,x}{b^2} & \text {\ if\ \ }p=-2\\ \frac {\ln \left (a+b\,x\right )+\frac {a}{a+b\,x}}{b^2} & \text {\ if\ \ }p=-4\\ \frac {2\,\left (\frac {{\left (a+b\,x\right )}^{\frac {p}{2}+2}}{p+4}-\frac {a\,{\left (a+b\,x\right )}^{\frac {p}{2}+1}}{p+2}\right )}{b^2} & \text {\ if\ \ }p\neq -2\wedge p\neq -4 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*x)^(p/2),x)

[Out]

piecewise(p == -2, -(a*log(a + b*x) - b*x)/b^2, p == -4, (log(a + b*x) + a/(a + b*x))/b^2, p ~= -2 & p ~= -4,
(2*((a + b*x)^(p/2 + 2)/(p + 4) - (a*(a + b*x)^(p/2 + 1))/(p + 2)))/b^2)

________________________________________________________________________________________