Integrand size = 31, antiderivative size = 270 \[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=-\frac {b (2 a d (A d (1+m)-B c (1+m+n))-b c (A d (1+m+n)-B c (1+m+2 n))) (e x)^{1+m}}{c d^3 e (1+m) n}-\frac {b^2 (A d (1+m+n)-B c (1+m+2 n)) x^n (e x)^{1+m}}{c d^2 e n (1+m+n)}-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{c d e n \left (c+d x^n\right )}-\frac {(b c-a d) (a d (B c (1+m)-A d (1+m-n))+b c (A d (1+m+n)-B c (1+m+2 n))) (e x)^{1+m} \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{n},\frac {1+m+n}{n},-\frac {d x^n}{c}\right )}{c^2 d^3 e (1+m) n} \] Output:
-b*(2*a*d*(A*d*(1+m)-B*c*(1+m+n))-b*c*(A*d*(1+m+n)-B*c*(1+m+2*n)))*(e*x)^( 1+m)/c/d^3/e/(1+m)/n-b^2*(A*d*(1+m+n)-B*c*(1+m+2*n))*x^n*(e*x)^(1+m)/c/d^2 /e/n/(1+m+n)-(-A*d+B*c)*(e*x)^(1+m)*(a+b*x^n)^2/c/d/e/n/(c+d*x^n)-(-a*d+b* c)*(a*d*(B*c*(1+m)-A*d*(1+m-n))+b*c*(A*d*(1+m+n)-B*c*(1+m+2*n)))*(e*x)^(1+ m)*hypergeom([1, (1+m)/n],[(1+m+n)/n],-d*x^n/c)/c^2/d^3/e/(1+m)/n
Time = 0.38 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.60 \[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\frac {x (e x)^m \left (\frac {b (-2 b B c+A b d+2 a B d)}{1+m}+\frac {b^2 B d x^n}{1+m+n}+\frac {(b c-a d) (3 b B c-2 A b d-a B d) \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{n},\frac {1+m+n}{n},-\frac {d x^n}{c}\right )}{c (1+m)}-\frac {(b c-a d)^2 (B c-A d) \operatorname {Hypergeometric2F1}\left (2,\frac {1+m}{n},\frac {1+m+n}{n},-\frac {d x^n}{c}\right )}{c^2 (1+m)}\right )}{d^3} \] Input:
Integrate[((e*x)^m*(a + b*x^n)^2*(A + B*x^n))/(c + d*x^n)^2,x]
Output:
(x*(e*x)^m*((b*(-2*b*B*c + A*b*d + 2*a*B*d))/(1 + m) + (b^2*B*d*x^n)/(1 + m + n) + ((b*c - a*d)*(3*b*B*c - 2*A*b*d - a*B*d)*Hypergeometric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c*(1 + m)) - ((b*c - a*d)^2*(B*c - A*d)*Hypergeometric2F1[2, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c^2*(1 + m))))/d^3
Time = 1.15 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.97, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {1064, 25, 1040, 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 {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx\) |
\(\Big \downarrow \) 1064 |
\(\displaystyle -\frac {\int -\frac {(e x)^m \left (b x^n+a\right ) \left (a (B c (m+1)-A d (m-n+1))-b (A d (m+n+1)-B c (m+2 n+1)) x^n\right )}{d x^n+c}dx}{c d n}-\frac {(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {(e x)^m \left (b x^n+a\right ) \left (a (B c (m+1)-A d (m-n+1))-b (A d (m+n+1)-B c (m+2 n+1)) x^n\right )}{d x^n+c}dx}{c d n}-\frac {(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}\) |
\(\Big \downarrow \) 1040 |
\(\displaystyle \frac {\int \left (\frac {b^2 (B c (m+2 n+1)-A d (m+n+1)) x^n (e x)^m}{d}+\frac {b (b c (A d (m+n+1)-B c (m+2 n+1))-2 a d (A d (m+1)-B c (m+n+1))) (e x)^m}{d^2}+\frac {(b c-a d) (-a d (B c (m+1)-A d (m-n+1))-b c (A d (m+n+1)-B c (m+2 n+1))) (e x)^m}{d^2 \left (d x^n+c\right )}\right )dx}{c d n}-\frac {(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {(e x)^{m+1} (b c-a d) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{n},\frac {m+n+1}{n},-\frac {d x^n}{c}\right ) (a d (B c (m+1)-A d (m-n+1))+b c (A d (m+n+1)-B c (m+2 n+1)))}{c d^2 e (m+1)}-\frac {b (e x)^{m+1} (2 a d (A d (m+1)-B c (m+n+1))-b c (A d (m+n+1)-B c (m+2 n+1)))}{d^2 e (m+1)}-\frac {b^2 x^{n+1} (e x)^m (A d (m+n+1)-B c (m+2 n+1))}{d (m+n+1)}}{c d n}-\frac {(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{c d e n \left (c+d x^n\right )}\) |
Input:
Int[((e*x)^m*(a + b*x^n)^2*(A + B*x^n))/(c + d*x^n)^2,x]
Output:
-(((B*c - A*d)*(e*x)^(1 + m)*(a + b*x^n)^2)/(c*d*e*n*(c + d*x^n))) + (-((b ^2*(A*d*(1 + m + n) - B*c*(1 + m + 2*n))*x^(1 + n)*(e*x)^m)/(d*(1 + m + n) )) - (b*(2*a*d*(A*d*(1 + m) - B*c*(1 + m + n)) - b*c*(A*d*(1 + m + n) - B* c*(1 + m + 2*n)))*(e*x)^(1 + m))/(d^2*e*(1 + m)) - ((b*c - a*d)*(a*d*(B*c* (1 + m) - A*d*(1 + m - n)) + b*c*(A*d*(1 + m + n) - B*c*(1 + m + 2*n)))*(e *x)^(1 + m)*Hypergeometric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/ (c*d^2*e*(1 + m)))/(c*d*n)
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n _))^(q_.)*((e_) + (f_.)*(x_)^(n_))^(r_.), x_Symbol] :> Int[ExpandIntegrand[ (g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^r, x], x] /; FreeQ[{a, b, c , d, e, f, g, m, n}, x] && IGtQ[p, -2] && IGtQ[q, 0] && IGtQ[r, 0]
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_ ))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^( m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^q/(a*b*g*n*(p + 1))), x] + Simp[1/( a*b*n*(p + 1)) Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1)*Simp[c *(b*e*n*(p + 1) + (b*e - a*f)*(m + 1)) + d*(b*e*n*(p + 1) + (b*e - a*f)*(m + n*q + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && LtQ [p, -1] && GtQ[q, 0] && !(EqQ[q, 1] && SimplerQ[b*c - a*d, b*e - a*f])
\[\int \frac {\left (e x \right )^{m} \left (a +b \,x^{n}\right )^{2} \left (A +B \,x^{n}\right )}{\left (c +d \,x^{n}\right )^{2}}d x\]
Input:
int((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x)
Output:
int((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x)
\[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} {\left (b x^{n} + a\right )}^{2} \left (e x\right )^{m}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \] Input:
integrate((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="fricas")
Output:
integral((B*b^2*x^(3*n) + A*a^2 + (2*B*a*b + A*b^2)*x^(2*n) + (B*a^2 + 2*A *a*b)*x^n)*(e*x)^m/(d^2*x^(2*n) + 2*c*d*x^n + c^2), x)
\[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\int \frac {\left (e x\right )^{m} \left (A + B x^{n}\right ) \left (a + b x^{n}\right )^{2}}{\left (c + d x^{n}\right )^{2}}\, dx \] Input:
integrate((e*x)**m*(a+b*x**n)**2*(A+B*x**n)/(c+d*x**n)**2,x)
Output:
Integral((e*x)**m*(A + B*x**n)*(a + b*x**n)**2/(c + d*x**n)**2, x)
\[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} {\left (b x^{n} + a\right )}^{2} \left (e x\right )^{m}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \] Input:
integrate((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="maxima")
Output:
-((b^2*c^2*d*e^m*(m + n + 1) + a^2*d^3*e^m*(m - n + 1) - 2*a*b*c*d^2*e^m*( m + 1))*A - (b^2*c^3*e^m*(m + 2*n + 1) - 2*a*b*c^2*d*e^m*(m + n + 1) + a^2 *c*d^2*e^m*(m + 1))*B)*integrate(x^m/(c*d^4*n*x^n + c^2*d^3*n), x) + ((m*n + n)*B*b^2*c*d^2*e^m*x*e^(m*log(x) + 2*n*log(x)) + (((m^2 + 2*m*(n + 1) + n^2 + 2*n + 1)*b^2*c^2*d*e^m - 2*(m^2 + m*(n + 2) + n + 1)*a*b*c*d^2*e^m + (m^2 + m*(n + 2) + n + 1)*a^2*d^3*e^m)*A - ((m^2 + m*(3*n + 2) + 2*n^2 + 3*n + 1)*b^2*c^3*e^m - 2*(m^2 + 2*m*(n + 1) + n^2 + 2*n + 1)*a*b*c^2*d*e^ m + (m^2 + m*(n + 2) + n + 1)*a^2*c*d^2*e^m)*B)*x*x^m + ((m*n + n^2 + n)*A *b^2*c*d^2*e^m - ((m*n + 2*n^2 + n)*b^2*c^2*d*e^m - 2*(m*n + n^2 + n)*a*b* c*d^2*e^m)*B)*x*e^(m*log(x) + n*log(x)))/((m^2*n + (n^2 + 2*n)*m + n^2 + n )*c*d^4*x^n + (m^2*n + (n^2 + 2*n)*m + n^2 + n)*c^2*d^3)
\[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} {\left (b x^{n} + a\right )}^{2} \left (e x\right )^{m}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \] Input:
integrate((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="giac")
Output:
integrate((B*x^n + A)*(b*x^n + a)^2*(e*x)^m/(d*x^n + c)^2, x)
Timed out. \[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\int \frac {{\left (e\,x\right )}^m\,\left (A+B\,x^n\right )\,{\left (a+b\,x^n\right )}^2}{{\left (c+d\,x^n\right )}^2} \,d x \] Input:
int(((e*x)^m*(A + B*x^n)*(a + b*x^n)^2)/(c + d*x^n)^2,x)
Output:
int(((e*x)^m*(A + B*x^n)*(a + b*x^n)^2)/(c + d*x^n)^2, x)
\[ \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx=\text {too large to display} \] Input:
int((e*x)^m*(a+b*x^n)^2*(A+B*x^n)/(c+d*x^n)^2,x)
Output:
(e**m*(x**(m + 2*n)*b**3*c**2*m*x + x**(m + 2*n)*b**3*c**2*x - x**(m + n)* a**3*d**2*m*x + x**(m + n)*a**3*d**2*n*x - x**(m + n)*a**3*d**2*x + 3*x**( m + n)*a**2*b*c*d*m*x + 3*x**(m + n)*a**2*b*c*d*x + x**m*a**3*c*d*m*x + x* *m*a**3*c*d*n*x + x**m*a**3*c*d*x + x**n*int(x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x**n*c*d*m + 2*x**n*c*d*n + 2*x**n* c*d + c**2*m + c**2*n + c**2),x)*a**3*d**4*m**3 + 3*x**n*int(x**(m + 2*n)/ (x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x**n*c*d*m + 2*x**n *c*d*n + 2*x**n*c*d + c**2*m + c**2*n + c**2),x)*a**3*d**4*m**2 - x**n*int (x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x**n* c*d*m + 2*x**n*c*d*n + 2*x**n*c*d + c**2*m + c**2*n + c**2),x)*a**3*d**4*m *n**2 + 3*x**n*int(x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2 *n)*d**2 + 2*x**n*c*d*m + 2*x**n*c*d*n + 2*x**n*c*d + c**2*m + c**2*n + c* *2),x)*a**3*d**4*m - x**n*int(x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d** 2*n + x**(2*n)*d**2 + 2*x**n*c*d*m + 2*x**n*c*d*n + 2*x**n*c*d + c**2*m + c**2*n + c**2),x)*a**3*d**4*n**2 + x**n*int(x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x**n*c*d*m + 2*x**n*c*d*n + 2*x**n*c *d + c**2*m + c**2*n + c**2),x)*a**3*d**4 - 3*x**n*int(x**(m + 2*n)/(x**(2 *n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x**n*c*d*m + 2*x**n*c*d*n + 2*x**n*c*d + c**2*m + c**2*n + c**2),x)*a**2*b*c*d**3*m**3 - 3*x**n*int (x**(m + 2*n)/(x**(2*n)*d**2*m + x**(2*n)*d**2*n + x**(2*n)*d**2 + 2*x*...