\(\int x^{1+p} (b+2 c x^2) (b x+c x^3)^p \, dx\) [173]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 27 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {x^{1+p} \left (b x+c x^3\right )^{1+p}}{2 (1+p)} \]

[Out]

1/2*x^(p+1)*(c*x^3+b*x)^(p+1)/(p+1)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {1604} \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {x^{p+1} \left (b x+c x^3\right )^{p+1}}{2 (p+1)} \]

[In]

Int[x^(1 + p)*(b + 2*c*x^2)*(b*x + c*x^3)^p,x]

[Out]

(x^(1 + p)*(b*x + c*x^3)^(1 + p))/(2*(1 + p))

Rule 1604

Int[(Pp_)*(Qq_)^(m_.)*(Rr_)^(n_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x], r = Expon[Rr, x]}, S
imp[Coeff[Pp, x, p]*x^(p - q - r + 1)*Qq^(m + 1)*(Rr^(n + 1)/((p + m*q + n*r + 1)*Coeff[Qq, x, q]*Coeff[Rr, x,
 r])), x] /; NeQ[p + m*q + n*r + 1, 0] && EqQ[(p + m*q + n*r + 1)*Coeff[Qq, x, q]*Coeff[Rr, x, r]*Pp, Coeff[Pp
, x, p]*x^(p - q - r)*((p - q - r + 1)*Qq*Rr + (m + 1)*x*Rr*D[Qq, x] + (n + 1)*x*Qq*D[Rr, x])]] /; FreeQ[{m, n
}, x] && PolyQ[Pp, x] && PolyQ[Qq, x] && PolyQ[Rr, x] && NeQ[m, -1] && NeQ[n, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {x^{1+p} \left (b x+c x^3\right )^{1+p}}{2 (1+p)} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.06 (sec) , antiderivative size = 97, normalized size of antiderivative = 3.59 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {x^{2+p} \left (x \left (b+c x^2\right )\right )^p \left (1+\frac {c x^2}{b}\right )^{-p} \left (b (2+p) \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,-\frac {c x^2}{b}\right )+2 c (1+p) x^2 \operatorname {Hypergeometric2F1}\left (-p,2+p,3+p,-\frac {c x^2}{b}\right )\right )}{2 (1+p) (2+p)} \]

[In]

Integrate[x^(1 + p)*(b + 2*c*x^2)*(b*x + c*x^3)^p,x]

[Out]

(x^(2 + p)*(x*(b + c*x^2))^p*(b*(2 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, -((c*x^2)/b)] + 2*c*(1 + p)*x^2*Hy
pergeometric2F1[-p, 2 + p, 3 + p, -((c*x^2)/b)]))/(2*(1 + p)*(2 + p)*(1 + (c*x^2)/b)^p)

Maple [A] (verified)

Time = 1.44 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15

method result size
gosper \(\frac {x^{2+p} \left (c \,x^{2}+b \right ) \left (c \,x^{3}+b x \right )^{p}}{2+2 p}\) \(31\)
parallelrisch \(\frac {x^{3} x^{1+p} {\left (x \left (c \,x^{2}+b \right )\right )}^{p} b c +x \,x^{1+p} {\left (x \left (c \,x^{2}+b \right )\right )}^{p} b^{2}}{2 b \left (1+p \right )}\) \(55\)
risch \(\frac {\left (c \,x^{2}+b \right ) x \,x^{1+p} \left (c \,x^{2}+b \right )^{p} x^{p} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i x \left (c \,x^{2}+b \right )\right ) \pi p \left (-\operatorname {csgn}\left (i x \left (c \,x^{2}+b \right )\right )+\operatorname {csgn}\left (i \left (c \,x^{2}+b \right )\right )\right ) \left (-\operatorname {csgn}\left (i x \left (c \,x^{2}+b \right )\right )+\operatorname {csgn}\left (i x \right )\right )}{2}}}{2+2 p}\) \(97\)

[In]

int(x^(1+p)*(2*c*x^2+b)*(c*x^3+b*x)^p,x,method=_RETURNVERBOSE)

[Out]

1/2*x^(2+p)/(1+p)*(c*x^2+b)*(c*x^3+b*x)^p

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {{\left (c x^{3} + b x\right )} {\left (c x^{3} + b x\right )}^{p} x^{p + 1}}{2 \, {\left (p + 1\right )}} \]

[In]

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

[Out]

1/2*(c*x^3 + b*x)*(c*x^3 + b*x)^p*x^(p + 1)/(p + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (20) = 40\).

Time = 28.85 (sec) , antiderivative size = 80, normalized size of antiderivative = 2.96 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\begin {cases} \frac {b x x^{p + 1} \left (b x + c x^{3}\right )^{p}}{2 p + 2} + \frac {c x^{3} x^{p + 1} \left (b x + c x^{3}\right )^{p}}{2 p + 2} & \text {for}\: p \neq -1 \\\log {\left (x \right )} + \frac {\log {\left (x - \sqrt {- \frac {b}{c}} \right )}}{2} + \frac {\log {\left (x + \sqrt {- \frac {b}{c}} \right )}}{2} & \text {otherwise} \end {cases} \]

[In]

integrate(x**(1+p)*(2*c*x**2+b)*(c*x**3+b*x)**p,x)

[Out]

Piecewise((b*x*x**(p + 1)*(b*x + c*x**3)**p/(2*p + 2) + c*x**3*x**(p + 1)*(b*x + c*x**3)**p/(2*p + 2), Ne(p, -
1)), (log(x) + log(x - sqrt(-b/c))/2 + log(x + sqrt(-b/c))/2, True))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {{\left (c x^{4} + b x^{2}\right )} e^{\left (p \log \left (c x^{2} + b\right ) + 2 \, p \log \left (x\right )\right )}}{2 \, {\left (p + 1\right )}} \]

[In]

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

[Out]

1/2*(c*x^4 + b*x^2)*e^(p*log(c*x^2 + b) + 2*p*log(x))/(p + 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (25) = 50\).

Time = 0.37 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.00 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx=\frac {c x^{3} e^{\left (p \log \left (c x^{2} + b\right ) + 2 \, p \log \left (x\right ) + \log \left (x\right )\right )} + b x e^{\left (p \log \left (c x^{2} + b\right ) + 2 \, p \log \left (x\right ) + \log \left (x\right )\right )}}{2 \, {\left (p + 1\right )}} \]

[In]

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

[Out]

1/2*(c*x^3*e^(p*log(c*x^2 + b) + 2*p*log(x) + log(x)) + b*x*e^(p*log(c*x^2 + b) + 2*p*log(x) + log(x)))/(p + 1
)

Mupad [B] (verification not implemented)

Time = 9.53 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.67 \[ \int x^{1+p} \left (b+2 c x^2\right ) \left (b x+c x^3\right )^p \, dx={\left (c\,x^3+b\,x\right )}^p\,\left (\frac {b\,x\,x^{p+1}}{2\,p+2}+\frac {c\,x^{p+1}\,x^3}{2\,p+2}\right ) \]

[In]

int(x^(p + 1)*(b*x + c*x^3)^p*(b + 2*c*x^2),x)

[Out]

(b*x + c*x^3)^p*((b*x*x^(p + 1))/(2*p + 2) + (c*x^(p + 1)*x^3)/(2*p + 2))