Integrand size = 16, antiderivative size = 283 \[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {x \left (b^2-2 a c+b c x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {c \left (4 a c (1-2 n)-b^2 (1-n)-b \sqrt {b^2-4 a c} (1-n)\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-4 a c-b \sqrt {b^2-4 a c}\right ) n}-\frac {c \left (4 a c (1-2 n)-b^2 (1-n)+b \sqrt {b^2-4 a c} (1-n)\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-4 a c+b \sqrt {b^2-4 a c}\right ) n} \] Output:
x*(b^2-2*a*c+b*c*x^n)/a/(-4*a*c+b^2)/n/(a+b*x^n+c*x^(2*n))-c*(4*a*c*(1-2*n )-b^2*(1-n)-b*(-4*a*c+b^2)^(1/2)*(1-n))*x*hypergeom([1, 1/n],[1+1/n],-2*c* x^n/(b-(-4*a*c+b^2)^(1/2)))/a/(-4*a*c+b^2)/(b^2-4*a*c-b*(-4*a*c+b^2)^(1/2) )/n-c*(4*a*c*(1-2*n)-b^2*(1-n)+b*(-4*a*c+b^2)^(1/2)*(1-n))*x*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/a/(-4*a*c+b^2)/(b*(-4*a*c+b ^2)^(1/2)-4*a*c+b^2)/n
Time = 4.56 (sec) , antiderivative size = 456, normalized size of antiderivative = 1.61 \[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=-\frac {x \left (\frac {4 a^2 c n-b^2 (-1+n) x^n \left (b+c x^n\right )+a \left (-b^2 n+b c (-3+4 n) x^n+2 c^2 (-1+2 n) x^{2 n}\right )}{a+x^n \left (b+c x^n\right )}+\frac {2^{-1/n} a c \left (4 a c \sqrt {b^2-4 a c} (1-2 n)+b^3 (-1+n)-4 a b c (-1+n)+b^2 \sqrt {b^2-4 a c} (-1+n)\right ) \left (\frac {c x^n}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )^{-1/n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b-\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}+2 c x^n}\right )}{\sqrt {b^2-4 a c} \left (-b^2+4 a c+b \sqrt {b^2-4 a c}\right )}+\frac {2^{-1/n} a c \left (-b^2 (-1+n)+b \sqrt {b^2-4 a c} (-1+n)+4 a c (-1+2 n)\right ) \left (\frac {c x^n}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )^{-1/n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-\frac {1}{n},\frac {-1+n}{n},\frac {b+\sqrt {b^2-4 a c}}{b+\sqrt {b^2-4 a c}+2 c x^n}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )}\right )}{a^2 \left (b^2-4 a c\right ) n} \] Input:
Integrate[(a + b*x^n + c*x^(2*n))^(-2),x]
Output:
-((x*((4*a^2*c*n - b^2*(-1 + n)*x^n*(b + c*x^n) + a*(-(b^2*n) + b*c*(-3 + 4*n)*x^n + 2*c^2*(-1 + 2*n)*x^(2*n)))/(a + x^n*(b + c*x^n)) + (a*c*(4*a*c* Sqrt[b^2 - 4*a*c]*(1 - 2*n) + b^3*(-1 + n) - 4*a*b*c*(-1 + n) + b^2*Sqrt[b ^2 - 4*a*c]*(-1 + n))*Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(2^n^(-1)*Sqrt[b^2 - 4*a*c]*(-b^2 + 4*a*c + b*Sqrt[b^2 - 4*a*c])*((c*x^n)/(b - Sqrt[b^2 - 4* a*c] + 2*c*x^n))^n^(-1)) + (a*c*(-(b^2*(-1 + n)) + b*Sqrt[b^2 - 4*a*c]*(-1 + n) + 4*a*c*(-1 + 2*n))*Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(2^n^(-1)*Sqrt [b^2 - 4*a*c]*(b + Sqrt[b^2 - 4*a*c])*((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2* c*x^n))^n^(-1))))/(a^2*(b^2 - 4*a*c)*n))
Time = 0.56 (sec) , antiderivative size = 277, normalized size of antiderivative = 0.98, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1683, 25, 1752, 778}
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}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx\) |
\(\Big \downarrow \) 1683 |
\(\displaystyle \frac {x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}-\frac {\int -\frac {-b c (1-n) x^n+2 a c (1-2 n)-b^2 (1-n)}{b x^n+c x^{2 n}+a}dx}{a n \left (b^2-4 a c\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {-b c (1-n) x^n+2 a c (1-2 n)-b^2 (1-n)}{b x^n+c x^{2 n}+a}dx}{a n \left (b^2-4 a c\right )}+\frac {x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}\) |
\(\Big \downarrow \) 1752 |
\(\displaystyle \frac {\frac {c \left (-b (1-n) \sqrt {b^2-4 a c}+4 a c (1-2 n)-\left (b^2 (1-n)\right )\right ) \int \frac {1}{c x^n+\frac {1}{2} \left (b-\sqrt {b^2-4 a c}\right )}dx}{2 \sqrt {b^2-4 a c}}-\frac {c \left (b (1-n) \sqrt {b^2-4 a c}+4 a c (1-2 n)-\left (b^2 (1-n)\right )\right ) \int \frac {1}{c x^n+\frac {1}{2} \left (b+\sqrt {b^2-4 a c}\right )}dx}{2 \sqrt {b^2-4 a c}}}{a n \left (b^2-4 a c\right )}+\frac {x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}\) |
\(\Big \downarrow \) 778 |
\(\displaystyle \frac {\frac {c x \left (-b (1-n) \sqrt {b^2-4 a c}+4 a c (1-2 n)-\left (b^2 (1-n)\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )}-\frac {c x \left (b (1-n) \sqrt {b^2-4 a c}+4 a c (1-2 n)-\left (b^2 (1-n)\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (\sqrt {b^2-4 a c}+b\right )}}{a n \left (b^2-4 a c\right )}+\frac {x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}\) |
Input:
Int[(a + b*x^n + c*x^(2*n))^(-2),x]
Output:
(x*(b^2 - 2*a*c + b*c*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) + ((c*(4*a*c*(1 - 2*n) - b^2*(1 - n) - b*Sqrt[b^2 - 4*a*c]*(1 - n))*x*Hyperg eometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(S qrt[b^2 - 4*a*c]*(b - Sqrt[b^2 - 4*a*c])) - (c*(4*a*c*(1 - 2*n) - b^2*(1 - n) + b*Sqrt[b^2 - 4*a*c]*(1 - n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(- 1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(b + Sqrt[b^2 - 4*a*c])))/(a*(b^2 - 4*a*c)*n)
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F 1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, n, p}, x] && !IGtQ[p , 0] && !IntegerQ[1/n] && !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p] || GtQ[a, 0])
Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(- x)*(b^2 - 2*a*c + b*c*x^n)*((a + b*x^n + c*x^(2*n))^(p + 1)/(a*n*(p + 1)*(b ^2 - 4*a*c))), x] + Simp[1/(a*n*(p + 1)*(b^2 - 4*a*c)) Int[(b^2 - 2*a*c + n*(p + 1)*(b^2 - 4*a*c) + b*c*(n*(2*p + 3) + 1)*x^n)*(a + b*x^n + c*x^(2*n ))^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4 *a*c, 0] && ILtQ[p, -1]
Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x _Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q)) Int[1/(b/2 - q/2 + c*x^n), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q)) I nt[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2 , 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] || !IGtQ[n/2, 0])
\[\int \frac {1}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{2}}d x\]
Input:
int(1/(a+b*x^n+c*x^(2*n))^2,x)
Output:
int(1/(a+b*x^n+c*x^(2*n))^2,x)
\[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="fricas")
Output:
integral(1/(c^2*x^(4*n) + b^2*x^(2*n) + 2*a*b*x^n + a^2 + 2*(b*c*x^n + a*c )*x^(2*n)), x)
Timed out. \[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Timed out} \] Input:
integrate(1/(a+b*x**n+c*x**(2*n))**2,x)
Output:
Timed out
\[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="maxima")
Output:
(b*c*x*x^n + (b^2 - 2*a*c)*x)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2* c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n) - integrate(-(b*c*(n - 1)*x^ n - 2*a*c*(2*n - 1) + b^2*(n - 1))/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4 *a^2*c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n), x)
\[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="giac")
Output:
integrate((c*x^(2*n) + b*x^n + a)^(-2), x)
Timed out. \[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int \frac {1}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \] Input:
int(1/(a + b*x^n + c*x^(2*n))^2,x)
Output:
int(1/(a + b*x^n + c*x^(2*n))^2, x)
\[ \int \frac {1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int \frac {1}{x^{4 n} c^{2}+2 x^{3 n} b c +2 x^{2 n} a c +x^{2 n} b^{2}+2 x^{n} a b +a^{2}}d x \] Input:
int(1/(a+b*x^n+c*x^(2*n))^2,x)
Output:
int(1/(x**(4*n)*c**2 + 2*x**(3*n)*b*c + 2*x**(2*n)*a*c + x**(2*n)*b**2 + 2 *x**n*a*b + a**2),x)