### 3.87 $$\int (f x)^m (d+e x^n)^3 (a+c x^{2 n})^p \, dx$$

Optimal. Leaf size=358 $\frac{3 d^2 e x^{n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+n+1}{2 n},-p;\frac{m+3 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+n+1}+\frac{d^3 (f x)^{m+1} \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+1}{2 n},-p;\frac{m+1}{2 n}+1;-\frac{c x^{2 n}}{a}\right )}{f (m+1)}+\frac{3 d e^2 x^{2 n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+2 n+1}{2 n},-p;\frac{m+4 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+2 n+1}+\frac{e^3 x^{3 n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+3 n+1}{2 n},-p;\frac{m+5 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+3 n+1}$

[Out]

(d^3*(f*x)^(1 + m)*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m)/(2*n), -p, 1 + (1 + m)/(2*n), -((c*x^(2*n))/a)]
)/(f*(1 + m)*(1 + (c*x^(2*n))/a)^p) + (3*d^2*e*x^(1 + n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m +
n)/(2*n), -p, (1 + m + 3*n)/(2*n), -((c*x^(2*n))/a)])/((1 + m + n)*(1 + (c*x^(2*n))/a)^p) + (3*d*e^2*x^(1 + 2*
n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m + 2*n)/(2*n), -p, (1 + m + 4*n)/(2*n), -((c*x^(2*n))/a)]
)/((1 + m + 2*n)*(1 + (c*x^(2*n))/a)^p) + (e^3*x^(1 + 3*n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m
+ 3*n)/(2*n), -p, (1 + m + 5*n)/(2*n), -((c*x^(2*n))/a)])/((1 + m + 3*n)*(1 + (c*x^(2*n))/a)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.236908, antiderivative size = 358, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 4, integrand size = 26, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.154, Rules used = {1561, 365, 364, 20} $\frac{3 d^2 e x^{n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+n+1}{2 n},-p;\frac{m+3 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+n+1}+\frac{d^3 (f x)^{m+1} \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+1}{2 n},-p;\frac{m+1}{2 n}+1;-\frac{c x^{2 n}}{a}\right )}{f (m+1)}+\frac{3 d e^2 x^{2 n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+2 n+1}{2 n},-p;\frac{m+4 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+2 n+1}+\frac{e^3 x^{3 n+1} (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \, _2F_1\left (\frac{m+3 n+1}{2 n},-p;\frac{m+5 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+3 n+1}$

Antiderivative was successfully veriﬁed.

[In]

Int[(f*x)^m*(d + e*x^n)^3*(a + c*x^(2*n))^p,x]

[Out]

(d^3*(f*x)^(1 + m)*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m)/(2*n), -p, 1 + (1 + m)/(2*n), -((c*x^(2*n))/a)]
)/(f*(1 + m)*(1 + (c*x^(2*n))/a)^p) + (3*d^2*e*x^(1 + n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m +
n)/(2*n), -p, (1 + m + 3*n)/(2*n), -((c*x^(2*n))/a)])/((1 + m + n)*(1 + (c*x^(2*n))/a)^p) + (3*d*e^2*x^(1 + 2*
n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m + 2*n)/(2*n), -p, (1 + m + 4*n)/(2*n), -((c*x^(2*n))/a)]
)/((1 + m + 2*n)*(1 + (c*x^(2*n))/a)^p) + (e^3*x^(1 + 3*n)*(f*x)^m*(a + c*x^(2*n))^p*Hypergeometric2F1[(1 + m
+ 3*n)/(2*n), -p, (1 + m + 5*n)/(2*n), -((c*x^(2*n))/a)])/((1 + m + 3*n)*(1 + (c*x^(2*n))/a)^p)

Rule 1561

Int[((f_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[Expan
dIntegrand[(f*x)^m*(d + e*x^n)^q*(a + c*x^(2*n))^p, x], x] /; FreeQ[{a, c, d, e, f, m, n, p, q}, x] && EqQ[n2,
2*n] && (IGtQ[p, 0] || IGtQ[q, 0])

Rule 365

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 364

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

Rule 20

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(b^IntPart[n]*(b*v)^FracPart[n])/(a^IntPart[n
]*(a*v)^FracPart[n]), Int[u*(a*v)^(m + n), x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
&&  !IntegerQ[m + n]

Rubi steps

\begin{align*} \int (f x)^m \left (d+e x^n\right )^3 \left (a+c x^{2 n}\right )^p \, dx &=\int \left (d^3 (f x)^m \left (a+c x^{2 n}\right )^p+3 d^2 e x^n (f x)^m \left (a+c x^{2 n}\right )^p+3 d e^2 x^{2 n} (f x)^m \left (a+c x^{2 n}\right )^p+e^3 x^{3 n} (f x)^m \left (a+c x^{2 n}\right )^p\right ) \, dx\\ &=d^3 \int (f x)^m \left (a+c x^{2 n}\right )^p \, dx+\left (3 d^2 e\right ) \int x^n (f x)^m \left (a+c x^{2 n}\right )^p \, dx+\left (3 d e^2\right ) \int x^{2 n} (f x)^m \left (a+c x^{2 n}\right )^p \, dx+e^3 \int x^{3 n} (f x)^m \left (a+c x^{2 n}\right )^p \, dx\\ &=\left (3 d^2 e x^{-m} (f x)^m\right ) \int x^{m+n} \left (a+c x^{2 n}\right )^p \, dx+\left (3 d e^2 x^{-m} (f x)^m\right ) \int x^{m+2 n} \left (a+c x^{2 n}\right )^p \, dx+\left (e^3 x^{-m} (f x)^m\right ) \int x^{m+3 n} \left (a+c x^{2 n}\right )^p \, dx+\left (d^3 \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p}\right ) \int (f x)^m \left (1+\frac{c x^{2 n}}{a}\right )^p \, dx\\ &=\frac{d^3 (f x)^{1+m} \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p} \, _2F_1\left (\frac{1+m}{2 n},-p;1+\frac{1+m}{2 n};-\frac{c x^{2 n}}{a}\right )}{f (1+m)}+\left (3 d^2 e x^{-m} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p}\right ) \int x^{m+n} \left (1+\frac{c x^{2 n}}{a}\right )^p \, dx+\left (3 d e^2 x^{-m} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p}\right ) \int x^{m+2 n} \left (1+\frac{c x^{2 n}}{a}\right )^p \, dx+\left (e^3 x^{-m} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p}\right ) \int x^{m+3 n} \left (1+\frac{c x^{2 n}}{a}\right )^p \, dx\\ &=\frac{d^3 (f x)^{1+m} \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p} \, _2F_1\left (\frac{1+m}{2 n},-p;1+\frac{1+m}{2 n};-\frac{c x^{2 n}}{a}\right )}{f (1+m)}+\frac{3 d^2 e x^{1+n} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p} \, _2F_1\left (\frac{1+m+n}{2 n},-p;\frac{1+m+3 n}{2 n};-\frac{c x^{2 n}}{a}\right )}{1+m+n}+\frac{3 d e^2 x^{1+2 n} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p} \, _2F_1\left (\frac{1+m+2 n}{2 n},-p;\frac{1+m+4 n}{2 n};-\frac{c x^{2 n}}{a}\right )}{1+m+2 n}+\frac{e^3 x^{1+3 n} (f x)^m \left (a+c x^{2 n}\right )^p \left (1+\frac{c x^{2 n}}{a}\right )^{-p} \, _2F_1\left (\frac{1+m+3 n}{2 n},-p;\frac{1+m+5 n}{2 n};-\frac{c x^{2 n}}{a}\right )}{1+m+3 n}\\ \end{align*}

Mathematica [A]  time = 0.313728, size = 249, normalized size = 0.7 $x (f x)^m \left (a+c x^{2 n}\right )^p \left (\frac{c x^{2 n}}{a}+1\right )^{-p} \left (e x^n \left (\frac{3 d^2 \, _2F_1\left (\frac{m+n+1}{2 n},-p;\frac{m+3 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+n+1}+e x^n \left (\frac{3 d \, _2F_1\left (\frac{m+2 n+1}{2 n},-p;\frac{m+4 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+2 n+1}+\frac{e x^n \, _2F_1\left (\frac{m+3 n+1}{2 n},-p;\frac{m+5 n+1}{2 n};-\frac{c x^{2 n}}{a}\right )}{m+3 n+1}\right )\right )+\frac{d^3 \, _2F_1\left (\frac{m+1}{2 n},-p;\frac{m+1}{2 n}+1;-\frac{c x^{2 n}}{a}\right )}{m+1}\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(f*x)^m*(d + e*x^n)^3*(a + c*x^(2*n))^p,x]

[Out]

(x*(f*x)^m*(a + c*x^(2*n))^p*((d^3*Hypergeometric2F1[(1 + m)/(2*n), -p, 1 + (1 + m)/(2*n), -((c*x^(2*n))/a)])/
(1 + m) + e*x^n*((3*d^2*Hypergeometric2F1[(1 + m + n)/(2*n), -p, (1 + m + 3*n)/(2*n), -((c*x^(2*n))/a)])/(1 +
m + n) + e*x^n*((3*d*Hypergeometric2F1[(1 + m + 2*n)/(2*n), -p, (1 + m + 4*n)/(2*n), -((c*x^(2*n))/a)])/(1 + m
+ 2*n) + (e*x^n*Hypergeometric2F1[(1 + m + 3*n)/(2*n), -p, (1 + m + 5*n)/(2*n), -((c*x^(2*n))/a)])/(1 + m + 3
*n)))))/(1 + (c*x^(2*n))/a)^p

________________________________________________________________________________________

Maple [F]  time = 0.074, size = 0, normalized size = 0. \begin{align*} \int \left ( fx \right ) ^{m} \left ( d+e{x}^{n} \right ) ^{3} \left ( a+c{x}^{2\,n} \right ) ^{p}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(d+e*x^n)^3*(a+c*x^(2*n))^p,x)

[Out]

int((f*x)^m*(d+e*x^n)^3*(a+c*x^(2*n))^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (e x^{n} + d\right )}^{3}{\left (c x^{2 \, n} + a\right )}^{p} \left (f x\right )^{m}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(d+e*x^n)^3*(a+c*x^(2*n))^p,x, algorithm="maxima")

[Out]

integrate((e*x^n + d)^3*(c*x^(2*n) + a)^p*(f*x)^m, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (e^{3} x^{3 \, n} + 3 \, d e^{2} x^{2 \, n} + 3 \, d^{2} e x^{n} + d^{3}\right )}{\left (c x^{2 \, n} + a\right )}^{p} \left (f x\right )^{m}, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(d+e*x^n)^3*(a+c*x^(2*n))^p,x, algorithm="fricas")

[Out]

integral((e^3*x^(3*n) + 3*d*e^2*x^(2*n) + 3*d^2*e*x^n + d^3)*(c*x^(2*n) + a)^p*(f*x)^m, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**m*(d+e*x**n)**3*(a+c*x**(2*n))**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(d+e*x^n)^3*(a+c*x^(2*n))^p,x, algorithm="giac")

[Out]

Exception raised: TypeError