Integrand size = 26, antiderivative size = 224 \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {e^2 x}{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 \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{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 \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )} \] Output:
e^2*x/c+(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*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/c/(b-( -4*a*c+b^2)^(1/2))+(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*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/ 2)))/c/(b+(-4*a*c+b^2)^(1/2))
Time = 0.85 (sec) , antiderivative size = 216, normalized size of antiderivative = 0.96 \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {x \left (e^2+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\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 )}{b-\sqrt {b^2-4 a c}}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\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 )}{b+\sqrt {b^2-4 a c}}\right )}{c} \] Input:
Integrate[(d + e*x^n)^2/(a + b*x^n + c*x^(2*n)),x]
Output:
(x*(e^2 + ((2*c*d*e - b*e^2 + (2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/Sq rt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])/(b - Sqrt[b^2 - 4*a*c]) + ((2*c*d*e - b*e^2 - (2*c^2* d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b + Sqrt[b^2 - 4*a*c])))/c
Time = 0.58 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1754, 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 {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx\) |
\(\Big \downarrow \) 1754 |
\(\displaystyle \int \left (\frac {-a e^2+x^n \left (2 c d e-b e^2\right )+c d^2}{c \left (a+b x^n+c x^{2 n}\right )}+\frac {e^2}{c}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x \left (\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\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 )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {x \left (-\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\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 )}{c \left (\sqrt {b^2-4 a c}+b\right )}+\frac {e^2 x}{c}\) |
Input:
Int[(d + e*x^n)^2/(a + b*x^n + c*x^(2*n)),x]
Output:
(e^2*x)/c + ((2*c*d*e - b*e^2 + (2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/ Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/( b - Sqrt[b^2 - 4*a*c])])/(c*(b - Sqrt[b^2 - 4*a*c])) + ((2*c*d*e - b*e^2 - (2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/Sqrt[b^2 - 4*a*c])*x*Hypergeome tric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(c*(b + Sqrt[b^2 - 4*a*c]))
Int[((d_) + (e_.)*(x_)^(n_))^(q_)/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_ )), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q/(a + b*x^n + c*x^(2*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] && IntegerQ[q]
\[\int \frac {\left (d +e \,x^{n}\right )^{2}}{a +b \,x^{n}+c \,x^{2 n}}d x\]
Input:
int((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
Output:
int((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
\[ \int \frac {\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}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:
integrate((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")
Output:
integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)/(c*x^(2*n) + b*x^n + a), x)
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int \frac {\left (d + e x^{n}\right )^{2}}{a + b x^{n} + c x^{2 n}}\, dx \] Input:
integrate((d+e*x**n)**2/(a+b*x**n+c*x**(2*n)),x)
Output:
Integral((d + e*x**n)**2/(a + b*x**n + c*x**(2*n)), x)
\[ \int \frac {\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}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:
integrate((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")
Output:
e^2*x/c - integrate(-(c*d^2 - a*e^2 + (2*c*d*e - b*e^2)*x^n)/(c^2*x^(2*n) + b*c*x^n + a*c), x)
\[ \int \frac {\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}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:
integrate((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")
Output:
integrate((e*x^n + d)^2/(c*x^(2*n) + b*x^n + a), x)
Timed out. \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int \frac {{\left (d+e\,x^n\right )}^2}{a+b\,x^n+c\,x^{2\,n}} \,d x \] Input:
int((d + e*x^n)^2/(a + b*x^n + c*x^(2*n)),x)
Output:
int((d + e*x^n)^2/(a + b*x^n + c*x^(2*n)), x)
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {\left (\int \frac {x^{2 n}}{x^{2 n} c +x^{n} b +a}d x \right ) b \,e^{2}-2 \left (\int \frac {x^{2 n}}{x^{2 n} c +x^{n} b +a}d x \right ) c d e -2 \left (\int \frac {1}{x^{2 n} c +x^{n} b +a}d x \right ) a d e +\left (\int \frac {1}{x^{2 n} c +x^{n} b +a}d x \right ) b \,d^{2}+2 d e x}{b} \] Input:
int((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)
Output:
(int(x**(2*n)/(x**(2*n)*c + x**n*b + a),x)*b*e**2 - 2*int(x**(2*n)/(x**(2* n)*c + x**n*b + a),x)*c*d*e - 2*int(1/(x**(2*n)*c + x**n*b + a),x)*a*d*e + int(1/(x**(2*n)*c + x**n*b + a),x)*b*d**2 + 2*d*e*x)/b