\(\int \frac {x^4 (d+e x^n)^2}{a+b x^n+c x^{2 n}} \, dx\) [134]

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

Optimal result

Integrand size = 29, antiderivative size = 247 \[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {e^2 x^5}{5 c}+\frac {\left (e (2 c d-b e)+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x^5 \operatorname {Hypergeometric2F1}\left (1,\frac {5}{n},\frac {5+n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{5 c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (e (2 c d-b e)-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x^5 \operatorname {Hypergeometric2F1}\left (1,\frac {5}{n},\frac {5+n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{5 c \left (b+\sqrt {b^2-4 a c}\right )} \] Output:

1/5*e^2*x^5/c+1/5*(e*(-b*e+2*c*d)+(2*c^2*d^2+b^2*e^2-2*c*e*(a*e+b*d))/(-4* 
a*c+b^2)^(1/2))*x^5*hypergeom([1, 5/n],[(5+n)/n],-2*c*x^n/(b-(-4*a*c+b^2)^ 
(1/2)))/c/(b-(-4*a*c+b^2)^(1/2))+1/5*(e*(-b*e+2*c*d)-(2*c^2*d^2+b^2*e^2-2* 
c*e*(a*e+b*d))/(-4*a*c+b^2)^(1/2))*x^5*hypergeom([1, 5/n],[(5+n)/n],-2*c*x 
^n/(b+(-4*a*c+b^2)^(1/2)))/c/(b+(-4*a*c+b^2)^(1/2))
 

Mathematica [A] (warning: unable to verify)

Time = 1.41 (sec) , antiderivative size = 355, normalized size of antiderivative = 1.44 \[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {2^{-\frac {5+n}{n}} x^5 \left (2^{\frac {5+n}{n}} c \sqrt {b^2-4 a c} d^2-\left (-a \sqrt {b^2-4 a c} e^2+c d \left (\sqrt {b^2-4 a c} d-4 a e\right )+b \left (c d^2+a e^2\right )\right ) \left (\frac {c x^n}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )^{-5/n} \operatorname {Hypergeometric2F1}\left (-\frac {5}{n},-\frac {5}{n},\frac {-5+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )+\left (a \sqrt {b^2-4 a c} e^2-c d \left (\sqrt {b^2-4 a c} d+4 a e\right )+b \left (c d^2+a e^2\right )\right ) \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-5/n} \operatorname {Hypergeometric2F1}\left (-\frac {5}{n},-\frac {5}{n},\frac {-5+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )\right )}{5 a c \sqrt {b^2-4 a c}} \] Input:

Integrate[(x^4*(d + e*x^n)^2)/(a + b*x^n + c*x^(2*n)),x]
 

Output:

(x^5*(2^((5 + n)/n)*c*Sqrt[b^2 - 4*a*c]*d^2 - ((-(a*Sqrt[b^2 - 4*a*c]*e^2) 
 + c*d*(Sqrt[b^2 - 4*a*c]*d - 4*a*e) + b*(c*d^2 + a*e^2))*Hypergeometric2F 
1[-5/n, -5/n, (-5 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 
 2*c*x^n)])/((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(5/n) + ((a*Sqrt[b 
^2 - 4*a*c]*e^2 - c*d*(Sqrt[b^2 - 4*a*c]*d + 4*a*e) + b*(c*d^2 + a*e^2))*H 
ypergeometric2F1[-5/n, -5/n, (-5 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt 
[b^2 - 4*a*c] + 2*c*x^n)])/((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(5/ 
n)))/(5*2^((5 + n)/n)*a*c*Sqrt[b^2 - 4*a*c])
 

Rubi [A] (verified)

Time = 0.93 (sec) , antiderivative size = 430, normalized size of antiderivative = 1.74, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1880, 1008, 25, 959, 888}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx\)

\(\Big \downarrow \) 1880

\(\displaystyle \frac {2 c \int \frac {x^4 \left (e x^n+d\right )^2}{2 c x^n+b-\sqrt {b^2-4 a c}}dx}{\sqrt {b^2-4 a c}}-\frac {2 c \int \frac {x^4 \left (e x^n+d\right )^2}{2 c x^n+b+\sqrt {b^2-4 a c}}dx}{\sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 1008

\(\displaystyle \frac {2 c \left (\frac {\int -\frac {x^4 \left (e \left (\left (b-\sqrt {b^2-4 a c}\right ) e (n+5)-2 c d (2 n+5)\right ) x^n+d \left (5 \left (b-\sqrt {b^2-4 a c}\right ) e-2 c d (n+5)\right )\right )}{2 c x^n+b-\sqrt {b^2-4 a c}}dx}{2 c (n+5)}+\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}-\frac {2 c \left (\frac {\int -\frac {x^4 \left (e \left (\left (b+\sqrt {b^2-4 a c}\right ) e (n+5)-2 c d (2 n+5)\right ) x^n+d \left (5 \left (b+\sqrt {b^2-4 a c}\right ) e-2 c d (n+5)\right )\right )}{2 c x^n+b+\sqrt {b^2-4 a c}}dx}{2 c (n+5)}+\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\int \frac {x^4 \left (e \left (\left (b-\sqrt {b^2-4 a c}\right ) e (n+5)-2 c d (2 n+5)\right ) x^n+d \left (5 \left (b-\sqrt {b^2-4 a c}\right ) e-2 c d (n+5)\right )\right )}{2 c x^n+b-\sqrt {b^2-4 a c}}dx}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}-\frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\int \frac {x^4 \left (e \left (\left (b+\sqrt {b^2-4 a c}\right ) e (n+5)-2 c d (2 n+5)\right ) x^n+d \left (5 \left (b+\sqrt {b^2-4 a c}\right ) e-2 c d (n+5)\right )\right )}{2 c x^n+b+\sqrt {b^2-4 a c}}dx}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 959

\(\displaystyle \frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\frac {e x^5 \left (e (n+5) \left (b-\sqrt {b^2-4 a c}\right )-2 c d (2 n+5)\right )}{10 c}-\frac {(n+5) \left (-2 c e \left (-d \sqrt {b^2-4 a c}+a e+b d\right )+b e^2 \left (b-\sqrt {b^2-4 a c}\right )+2 c^2 d^2\right ) \int \frac {x^4}{2 c x^n+b-\sqrt {b^2-4 a c}}dx}{c}}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}-\frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\frac {e x^5 \left (e (n+5) \left (\sqrt {b^2-4 a c}+b\right )-2 c d (2 n+5)\right )}{10 c}-\frac {(n+5) \left (-2 c e \left (d \sqrt {b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt {b^2-4 a c}+b\right )+2 c^2 d^2\right ) \int \frac {x^4}{2 c x^n+b+\sqrt {b^2-4 a c}}dx}{c}}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}\)

\(\Big \downarrow \) 888

\(\displaystyle \frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\frac {e x^5 \left (e (n+5) \left (b-\sqrt {b^2-4 a c}\right )-2 c d (2 n+5)\right )}{10 c}-\frac {(n+5) x^5 \left (-2 c e \left (-d \sqrt {b^2-4 a c}+a e+b d\right )+b e^2 \left (b-\sqrt {b^2-4 a c}\right )+2 c^2 d^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {5}{n},\frac {n+5}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{5 c \left (b-\sqrt {b^2-4 a c}\right )}}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}-\frac {2 c \left (\frac {e x^5 \left (d+e x^n\right )}{2 c (n+5)}-\frac {\frac {e x^5 \left (e (n+5) \left (\sqrt {b^2-4 a c}+b\right )-2 c d (2 n+5)\right )}{10 c}-\frac {(n+5) x^5 \left (-2 c e \left (d \sqrt {b^2-4 a c}+a e+b d\right )+b e^2 \left (\sqrt {b^2-4 a c}+b\right )+2 c^2 d^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {5}{n},\frac {n+5}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{5 c \left (\sqrt {b^2-4 a c}+b\right )}}{2 c (n+5)}\right )}{\sqrt {b^2-4 a c}}\)

Input:

Int[(x^4*(d + e*x^n)^2)/(a + b*x^n + c*x^(2*n)),x]
 

Output:

(2*c*((e*x^5*(d + e*x^n))/(2*c*(5 + n)) - ((e*((b - Sqrt[b^2 - 4*a*c])*e*( 
5 + n) - 2*c*d*(5 + 2*n))*x^5)/(10*c) - ((2*c^2*d^2 + b*(b - Sqrt[b^2 - 4* 
a*c])*e^2 - 2*c*e*(b*d - Sqrt[b^2 - 4*a*c]*d + a*e))*(5 + n)*x^5*Hypergeom 
etric2F1[1, 5/n, (5 + n)/n, (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(5*c*(b - 
 Sqrt[b^2 - 4*a*c])))/(2*c*(5 + n))))/Sqrt[b^2 - 4*a*c] - (2*c*((e*x^5*(d 
+ e*x^n))/(2*c*(5 + n)) - ((e*((b + Sqrt[b^2 - 4*a*c])*e*(5 + n) - 2*c*d*( 
5 + 2*n))*x^5)/(10*c) - ((2*c^2*d^2 + b*(b + Sqrt[b^2 - 4*a*c])*e^2 - 2*c* 
e*(b*d + Sqrt[b^2 - 4*a*c]*d + a*e))*(5 + n)*x^5*Hypergeometric2F1[1, 5/n, 
 (5 + n)/n, (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(5*c*(b + Sqrt[b^2 - 4*a* 
c])))/(2*c*(5 + n))))/Sqrt[b^2 - 4*a*c]
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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

rule 959
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n 
_)), x_Symbol] :> Simp[d*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p 
+ 1) + 1))), x] - Simp[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m + n*(p 
 + 1) + 1))   Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, 
 n, p}, x] && NeQ[b*c - a*d, 0] && NeQ[m + n*(p + 1) + 1, 0]
 

rule 1008
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ 
))^(q_), x_Symbol] :> Simp[d*(e*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n) 
^(q - 1)/(b*e*(m + n*(p + q) + 1))), x] + Simp[1/(b*(m + n*(p + q) + 1)) 
Int[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^(q - 2)*Simp[c*((c*b - a*d)*(m + 1) + 
 c*b*n*(p + q)) + (d*(c*b - a*d)*(m + 1) + d*n*(q - 1)*(b*c - a*d) + c*b*d* 
n*(p + q))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c 
 - a*d, 0] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]
 

rule 1880
Int[(((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(n_))^(q_))/((a_) + (c_.)*(x_)^( 
n2_.) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{r = Rt[b^2 - 4*a*c, 2]}, Simp[ 
2*(c/r)   Int[(f*x)^m*((d + e*x^n)^q/(b - r + 2*c*x^n)), x], x] - Simp[2*(c 
/r)   Int[(f*x)^m*((d + e*x^n)^q/(b + r + 2*c*x^n)), x], x]] /; FreeQ[{a, b 
, c, d, e, f, m, n, q}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] &&  !Rati 
onalQ[n]
 
Maple [F]

\[\int \frac {x^{4} \left (d +e \,x^{n}\right )^{2}}{a +b \,x^{n}+c \,x^{2 n}}d x\]

Input:

int(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
 

Output:

int(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
 

Fricas [F]

\[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2} x^{4}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:

integrate(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")
 

Output:

integral((e^2*x^4*x^(2*n) + 2*d*e*x^4*x^n + d^2*x^4)/(c*x^(2*n) + b*x^n + 
a), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\text {Timed out} \] Input:

integrate(x**4*(d+e*x**n)**2/(a+b*x**n+c*x**(2*n)),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2} x^{4}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:

integrate(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")
 

Output:

1/5*e^2*x^5/c - integrate(-((2*c*d*e - b*e^2)*x^4*x^n + (c*d^2 - a*e^2)*x^ 
4)/(c^2*x^(2*n) + b*c*x^n + a*c), x)
 

Giac [F]

\[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2} x^{4}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:

integrate(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")
 

Output:

integrate((e*x^n + d)^2*x^4/(c*x^(2*n) + b*x^n + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int \frac {x^4\,{\left (d+e\,x^n\right )}^2}{a+b\,x^n+c\,x^{2\,n}} \,d x \] Input:

int((x^4*(d + e*x^n)^2)/(a + b*x^n + c*x^(2*n)),x)
 

Output:

int((x^4*(d + e*x^n)^2)/(a + b*x^n + c*x^(2*n)), x)
 

Reduce [F]

\[ \int \frac {x^4 \left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {-10 \left (\int \frac {x^{4}}{x^{2 n} c +x^{n} b +a}d x \right ) a d e +5 \left (\int \frac {x^{4}}{x^{2 n} c +x^{n} b +a}d x \right ) b \,d^{2}+5 \left (\int \frac {x^{2 n} x^{4}}{x^{2 n} c +x^{n} b +a}d x \right ) b \,e^{2}-10 \left (\int \frac {x^{2 n} x^{4}}{x^{2 n} c +x^{n} b +a}d x \right ) c d e +2 d e \,x^{5}}{5 b} \] Input:

int(x^4*(d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
 

Output:

( - 10*int(x**4/(x**(2*n)*c + x**n*b + a),x)*a*d*e + 5*int(x**4/(x**(2*n)* 
c + x**n*b + a),x)*b*d**2 + 5*int((x**(2*n)*x**4)/(x**(2*n)*c + x**n*b + a 
),x)*b*e**2 - 10*int((x**(2*n)*x**4)/(x**(2*n)*c + x**n*b + a),x)*c*d*e + 
2*d*e*x**5)/(5*b)