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

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 = 412 \[ \int \frac {1}{x^2 \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx=\frac {e^2}{d \left (c d^2-b d e+a e^2\right ) n x \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 ) \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\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 x}+\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 ) \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\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 x}-\frac {e^2 \left (c d^2 (1+3 n)+e (a e (1+n)-b (d+2 d n))\right ) \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )^2 n x} \] Output:

e^2/d/(a*e^2-b*d*e+c*d^2)/n/x/(d+e*x^n)+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))*hypergeom([1, -1/n],[-(1-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/x+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))*hypergeom([1, -1/n],[-(1-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/x-e^ 
2*(c*d^2*(1+3*n)+e*(a*e*(1+n)-b*(2*d*n+d)))*hypergeom([1, -1/n],[-(1-n)/n] 
,-e*x^n/d)/d^2/(a*e^2-b*d*e+c*d^2)^2/n/x
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(1226\) vs. \(2(412)=824\).

Time = 6.36 (sec) , antiderivative size = 1226, normalized size of antiderivative = 2.98 \[ \int \frac {1}{x^2 \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx =\text {Too large to display} \] Input:

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

Output:

((c*d*e^2)/(d*n + e*n*x^n) - (b*e^3)/(d*n + e*n*x^n) + (a*e^4)/(d^2*n + d* 
e*n*x^n) - (e^2*(c*d^2*(1 + 3*n) + e*(a*e*(1 + n) - b*(d + 2*d*n)))*Hyperg 
eometric2F1[1, -n^(-1), (-1 + n)/n, -((e*x^n)/d)])/(d^2*n) + (2^(1 + n^(-1 
))*c*(c^2*d^2 + b^2*e^2 - c*e*(2*b*d + a*e))*((c*x^n)/(b - Sqrt[b^2 - 4*a* 
c] + 2*c*x^n))^n^(-1)*Hypergeometric2F1[1 + n^(-1), 1 + n^(-1), 2 + n^(-1) 
, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(Sqrt[b^2 - 
4*a*c]*(1 + n)*(-b + Sqrt[b^2 - 4*a*c] - 2*c*x^n)) + (2^(1 + n^(-1))*c^2*d 
^2*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(1 + n^(-1))*Hypergeometric 
2F1[1 + n^(-1), 1 + n^(-1), 2 + n^(-1), (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[ 
b^2 - 4*a*c] + 2*c*x^n)])/(Sqrt[b^2 - 4*a*c]*(1 + n)*x^n) - (2^(2 + n^(-1) 
)*b*c*d*e*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(1 + n^(-1))*Hyperge 
ometric2F1[1 + n^(-1), 1 + n^(-1), 2 + n^(-1), (b + Sqrt[b^2 - 4*a*c])/(b 
+ Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(Sqrt[b^2 - 4*a*c]*(1 + n)*x^n) + (2^(1 + 
 n^(-1))*b^2*e^2*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(1 + n^(-1))* 
Hypergeometric2F1[1 + n^(-1), 1 + n^(-1), 2 + n^(-1), (b + Sqrt[b^2 - 4*a* 
c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(Sqrt[b^2 - 4*a*c]*(1 + n)*x^n) - 
(2^(1 + n^(-1))*a*c*e^2*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^(1 + n 
^(-1))*Hypergeometric2F1[1 + n^(-1), 1 + n^(-1), 2 + n^(-1), (b + Sqrt[b^2 
 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(Sqrt[b^2 - 4*a*c]*(1 + n)* 
x^n) + (2^(1 + n^(-1))*c^2*d*e*((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^...
 

Rubi [A] (verified)

Time = 1.24 (sec) , antiderivative size = 553, 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 {1}{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 {1}{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 {1}{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 {-2 c e (n+1) x^n+2 c d n-b e (n+1)+\sqrt {b^2-4 a c} e (n+1)}{x^2 \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}{d n x \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 {-2 c e (n+1) x^n+2 c d n-b e (n+1)-\sqrt {b^2-4 a c} e (n+1)}{x^2 \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}{d n x \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 d n c^2}{\left (2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e\right ) x^2 \left (2 c x^n+b-\sqrt {b^2-4 a c}\right )}+\frac {e \left (\left (b-\sqrt {b^2-4 a c}\right ) e (n+1)-2 c (2 n d+d)\right )}{\left (2 c d-\left (b-\sqrt {b^2-4 a c}\right ) e\right ) x^2 \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}{d n x \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 d n c^2}{\left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e\right ) x^2 \left (2 c x^n+b+\sqrt {b^2-4 a c}\right )}+\frac {e \left (\left (b+\sqrt {b^2-4 a c}\right ) e (n+1)-2 c (2 n d+d)\right )}{\left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) e\right ) x^2 \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}{d n x \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 \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{x \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 \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {e x^n}{d}\right ) \left (e (n+1) \left (b-\sqrt {b^2-4 a c}\right )-2 c (2 d n+d)\right )}{d x \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}{d n x \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 \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{x \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 \operatorname {Hypergeometric2F1}\left (1,-\frac {1}{n},-\frac {1-n}{n},-\frac {e x^n}{d}\right ) \left (e (n+1) \left (\sqrt {b^2-4 a c}+b\right )-2 c (2 d n+d)\right )}{d x \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}{d n x \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[1/(x^2*(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))),x]
 

Output:

(2*c*(-(e/(d*(2*c*d - b*e + Sqrt[b^2 - 4*a*c]*e)*n*x*(d + e*x^n))) + ((-4* 
c^2*d*n*Hypergeometric2F1[1, -n^(-1), -((1 - n)/n), (-2*c*x^n)/(b - Sqrt[b 
^2 - 4*a*c])])/((b - Sqrt[b^2 - 4*a*c])*(2*c*d - (b - Sqrt[b^2 - 4*a*c])*e 
)*x) - (e*((b - Sqrt[b^2 - 4*a*c])*e*(1 + n) - 2*c*(d + 2*d*n))*Hypergeome 
tric2F1[1, -n^(-1), -((1 - n)/n), -((e*x^n)/d)])/(d*(2*c*d - (b - Sqrt[b^2 
 - 4*a*c])*e)*x))/(d*(2*c*d - b*e + Sqrt[b^2 - 4*a*c]*e)*n)))/Sqrt[b^2 - 4 
*a*c] - (2*c*(-(e/(d*(2*c*d - (b + Sqrt[b^2 - 4*a*c])*e)*n*x*(d + e*x^n))) 
 + ((-4*c^2*d*n*Hypergeometric2F1[1, -n^(-1), -((1 - n)/n), (-2*c*x^n)/(b 
+ Sqrt[b^2 - 4*a*c])])/((b + Sqrt[b^2 - 4*a*c])*(2*c*d - (b + Sqrt[b^2 - 4 
*a*c])*e)*x) - (e*((b + Sqrt[b^2 - 4*a*c])*e*(1 + n) - 2*c*(d + 2*d*n))*Hy 
pergeometric2F1[1, -n^(-1), -((1 - n)/n), -((e*x^n)/d)])/(d*(2*c*d - (b + 
Sqrt[b^2 - 4*a*c])*e)*x))/(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 {1}{x^{2} \left (d +e \,x^{n}\right )^{2} \left (a +b \,x^{n}+c \,x^{2 n}\right )}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-2)]

Exception generated. \[ \int \frac {1}{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(1/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 {1}{x^2 \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} {\left (e x^{n} + d\right )}^{2} x^{2}} \,d x } \] Input:

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

Output:

(c*d^2*e^2*(3*n + 1) - b*d*e^3*(2*n + 1) + a*e^4*(n + 1))*integrate(1/((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^2*x^n + (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)*x^2), x) + e^2/((c*d^3*e* 
n - b*d^2*e^2*n + a*d*e^3*n)*x*x^n + (c*d^4*n - b*d^3*e*n + a*d^2*e^2*n)*x 
) + integrate((c^2*d^2 - 2*b*c*d*e + b^2*e^2 - a*c*e^2 - (2*c^2*d*e - b*c* 
e^2)*x^n)/((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*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^2*x^n + (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)*x^2), x 
)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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