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

   Optimal result
   Rubi [C] (verified)
   Mathematica [C] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 38, antiderivative size = 27 \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, 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 [C] (verified)

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

Time = 0.07 (sec) , antiderivative size = 116, normalized size of antiderivative = 4.30, number of steps used = 7, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2057, 372, 371} \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, dx=\frac {b x^{p+2} \left (b x+c x^3\right )^p \left (\frac {c x^2}{b}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,-\frac {c x^2}{b}\right )}{2 (p+1)}+\frac {c x^{p+4} \left (b x+c x^3\right )^p \left (\frac {c x^2}{b}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-p,p+2,p+3,-\frac {c x^2}{b}\right )}{p+2} \]

[In]

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

[Out]

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

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 372

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/
(1 + b*(x^n/a))^FracPart[p]), Int[(c*x)^m*(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 2057

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Dist[c^IntPart[m]*(c*x)^FracPa
rt[m]*((a*x^j + b*x^n)^FracPart[p]/(x^(FracPart[m] + j*FracPart[p])*(a + b*x^(n - j))^FracPart[p])), Int[x^(m
+ j*p)*(a + b*x^(n - j))^p, x], x] /; FreeQ[{a, b, c, j, m, n, p}, x] &&  !IntegerQ[p] && NeQ[n, j] && PosQ[n
- j]

Rubi steps \begin{align*} \text {integral}& = b \int x^{1+p} \left (b x+c x^3\right )^p \, dx+(2 c) \int x^{3+p} \left (b x+c x^3\right )^p \, dx \\ & = \left (b x^{-p} \left (b+c x^2\right )^{-p} \left (b x+c x^3\right )^p\right ) \int x^{1+2 p} \left (b+c x^2\right )^p \, dx+\left (2 c x^{-p} \left (b+c x^2\right )^{-p} \left (b x+c x^3\right )^p\right ) \int x^{3+2 p} \left (b+c x^2\right )^p \, dx \\ & = \left (b x^{-p} \left (1+\frac {c x^2}{b}\right )^{-p} \left (b x+c x^3\right )^p\right ) \int x^{1+2 p} \left (1+\frac {c x^2}{b}\right )^p \, dx+\left (2 c x^{-p} \left (1+\frac {c x^2}{b}\right )^{-p} \left (b x+c x^3\right )^p\right ) \int x^{3+2 p} \left (1+\frac {c x^2}{b}\right )^p \, dx \\ & = \frac {b x^{2+p} \left (1+\frac {c x^2}{b}\right )^{-p} \left (b x+c x^3\right )^p \, _2F_1\left (-p,1+p;2+p;-\frac {c x^2}{b}\right )}{2 (1+p)}+\frac {c x^{4+p} \left (1+\frac {c x^2}{b}\right )^{-p} \left (b x+c x^3\right )^p \, _2F_1\left (-p,2+p;3+p;-\frac {c x^2}{b}\right )}{2+p} \\ \end{align*}

Mathematica [C] (verified)

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

Time = 0.00 (sec) , antiderivative size = 97, normalized size of antiderivative = 3.59 \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, 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[b*x^(1 + p)*(b*x + c*x^3)^p + 2*c*x^(3 + p)*(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 [C] (warning: unable to verify)

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

Time = 4.74 (sec) , antiderivative size = 97, normalized size of antiderivative = 3.59

method result size
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(b*x^(1+p)*(c*x^3+b*x)^p+2*c*x^(3+p)*(c*x^3+b*x)^p,x,method=_RETURNVERBOSE)

[Out]

1/2*(c*x^2+b)*x*x^(1+p)/(1+p)*(c*x^2+b)^p*x^p*exp(-1/2*I*csgn(I*x*(c*x^2+b))*Pi*p*(-csgn(I*x*(c*x^2+b))+csgn(I
*(c*x^2+b)))*(-csgn(I*x*(c*x^2+b))+csgn(I*x)))

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, 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(b*x^(1+p)*(c*x^3+b*x)^p+2*c*x^(3+p)*(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.31 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.00 \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, 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(b*x^(1+p)*(c*x^3+b*x)^p+2*c*x^(3+p)*(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 [F(-1)]

Timed out. \[ \int \left (b x^{1+p} \left (b x+c x^3\right )^p+2 c x^{3+p} \left (b x+c x^3\right )^p\right ) \, dx=\int b\,x^{p+1}\,{\left (c\,x^3+b\,x\right )}^p+2\,c\,x^{p+3}\,{\left (c\,x^3+b\,x\right )}^p \,d x \]

[In]

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

[Out]

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