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

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

Optimal result

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

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

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(2232\) vs. \(2(414)=828\).

Time = 6.57 (sec) , antiderivative size = 2232, normalized size of antiderivative = 5.39 \[ \int \frac {x^2}{\left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx=\text {Result too large to show} \] Input:

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

Output:

(e^2*x^3)/(d*(c*d^2 - b*d*e + a*e^2)*n*(d + e*x^n)) + (e^2*(-3*c*d^2 + 3*b 
*d*e - 3*a*e^2 + 3*c*d^2*n - 2*b*d*e*n + a*e^2*n)*x^3*Hypergeometric2F1[1, 
 3/n, 1 + 3/n, -((e*x^n)/d)])/(3*d^2*(c*d^2 - b*d*e + a*e^2)^2*n) - (2*c^2 
*d*e*x^(3 + n)*(x^n)^(3/n - (3 + n)/n)*(-(Hypergeometric2F1[-3/n, -3/n, (- 
3 + n)/n, -1/2*(-b - Sqrt[b^2 - 4*a*c])/(c*(-1/2*(-b - Sqrt[b^2 - 4*a*c])/ 
c + x^n))]/(Sqrt[b^2 - 4*a*c]*(x^n/(-1/2*(-b - Sqrt[b^2 - 4*a*c])/c + x^n) 
)^(3/n))) + Hypergeometric2F1[-3/n, -3/n, (-3 + n)/n, -1/2*(-b + Sqrt[b^2 
- 4*a*c])/(c*(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))]/(Sqrt[b^2 - 4*a*c]* 
(x^n/(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))^(3/n))))/(3*(c*d^2 - b*d*e + 
 a*e^2)^2) + (b*c*e^2*x^(3 + n)*(x^n)^(3/n - (3 + n)/n)*(-(Hypergeometric2 
F1[-3/n, -3/n, (-3 + n)/n, -1/2*(-b - Sqrt[b^2 - 4*a*c])/(c*(-1/2*(-b - Sq 
rt[b^2 - 4*a*c])/c + x^n))]/(Sqrt[b^2 - 4*a*c]*(x^n/(-1/2*(-b - Sqrt[b^2 - 
 4*a*c])/c + x^n))^(3/n))) + Hypergeometric2F1[-3/n, -3/n, (-3 + n)/n, -1/ 
2*(-b + Sqrt[b^2 - 4*a*c])/(c*(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))]/(S 
qrt[b^2 - 4*a*c]*(x^n/(-1/2*(-b + Sqrt[b^2 - 4*a*c])/c + x^n))^(3/n))))/(3 
*(c*d^2 - b*d*e + a*e^2)^2) - (c^2*d^2*x^3*((1 - Hypergeometric2F1[-3/n, - 
3/n, (-3 + n)/n, -1/2*(-b - Sqrt[b^2 - 4*a*c])/(c*(-1/2*(-b - Sqrt[b^2 - 4 
*a*c])/c + x^n))]/(x^n/(-1/2*(-b - Sqrt[b^2 - 4*a*c])/c + x^n))^(3/n))/((b 
*(-b - Sqrt[b^2 - 4*a*c]))/(2*c) + (-b - Sqrt[b^2 - 4*a*c])^2/(2*c)) + (1 
- Hypergeometric2F1[-3/n, -3/n, (-3 + n)/n, -1/2*(-b + Sqrt[b^2 - 4*a*c...
 

Rubi [A] (verified)

Time = 1.19 (sec) , antiderivative size = 554, normalized size of antiderivative = 1.34, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {1880, 1006, 1067, 2009}

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^2}{\left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx\)

\(\Big \downarrow \) 1880

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

\(\Big \downarrow \) 1006

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

\(\Big \downarrow \) 1067

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(2*c*(-((e*x^3)/(d*(2*c*d - b*e + Sqrt[b^2 - 4*a*c]*e)*n*(d + e*x^n))) + ( 
(4*c^2*d*n*x^3*Hypergeometric2F1[1, 3/n, (3 + n)/n, (-2*c*x^n)/(b - Sqrt[b 
^2 - 4*a*c])])/(3*(b - Sqrt[b^2 - 4*a*c])*(2*c*d - (b - Sqrt[b^2 - 4*a*c]) 
*e)) + (e*(2*c*d*(3 - 2*n) - (b - Sqrt[b^2 - 4*a*c])*e*(3 - n))*x^3*Hyperg 
eometric2F1[1, 3/n, (3 + n)/n, -((e*x^n)/d)])/(3*d*(2*c*d - (b - Sqrt[b^2 
- 4*a*c])*e)))/(d*(2*c*d - b*e + Sqrt[b^2 - 4*a*c]*e)*n)))/Sqrt[b^2 - 4*a* 
c] - (2*c*(-((e*x^3)/(d*(2*c*d - (b + Sqrt[b^2 - 4*a*c])*e)*n*(d + e*x^n)) 
) + ((4*c^2*d*n*x^3*Hypergeometric2F1[1, 3/n, (3 + n)/n, (-2*c*x^n)/(b + S 
qrt[b^2 - 4*a*c])])/(3*(b + Sqrt[b^2 - 4*a*c])*(2*c*d - (b + Sqrt[b^2 - 4* 
a*c])*e)) + (e*(c*d*(6 - 4*n) - (b + Sqrt[b^2 - 4*a*c])*e*(3 - n))*x^3*Hyp 
ergeometric2F1[1, 3/n, (3 + n)/n, -((e*x^n)/d)])/(3*d*(2*c*d - (b + Sqrt[b 
^2 - 4*a*c])*e)))/(d*(2*c*d - (b + Sqrt[b^2 - 4*a*c])*e)*n)))/Sqrt[b^2 - 4 
*a*c]
 

Defintions of rubi rules used

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

rule 1067
Int[(((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((e_) + (f_.)*(x_)^(n 
_)))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegrand[(g*x)^m*(a 
+ b*x^n)^p*((e + f*x^n)/(c + d*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, g, 
 m, n, p}, 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]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-2)]

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

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

Output:

Exception raised: HeuristicGCDFailed >> no luck
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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