Integrand size = 20, antiderivative size = 84 \[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\frac {(A b-a B) x^3}{a b n \left (a+b x^n\right )}+\frac {(3 a B-A b (3-n)) x^3 \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {3+n}{n},-\frac {b x^n}{a}\right )}{3 a^2 b n} \] Output:
(A*b-B*a)*x^3/a/b/n/(a+b*x^n)+1/3*(3*B*a-A*b*(3-n))*x^3*hypergeom([1, 3/n] ,[(3+n)/n],-b*x^n/a)/a^2/b/n
Time = 0.08 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.89 \[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\frac {A x^3 \operatorname {Hypergeometric2F1}\left (2,\frac {3}{n},\frac {3+n}{n},-\frac {b x^n}{a}\right )}{3 a^2}+\frac {B x^{3+n} \operatorname {Hypergeometric2F1}\left (2,\frac {3+n}{n},2+\frac {3}{n},-\frac {b x^n}{a}\right )}{a^2 (3+n)} \] Input:
Integrate[(x^2*(A + B*x^n))/(a + b*x^n)^2,x]
Output:
(A*x^3*Hypergeometric2F1[2, 3/n, (3 + n)/n, -((b*x^n)/a)])/(3*a^2) + (B*x^ (3 + n)*Hypergeometric2F1[2, (3 + n)/n, 2 + 3/n, -((b*x^n)/a)])/(a^2*(3 + n))
Time = 0.36 (sec) , antiderivative size = 84, 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.100, Rules used = {957, 888}
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 (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx\) |
\(\Big \downarrow \) 957 |
\(\displaystyle \frac {(3 a B-A b (3-n)) \int \frac {x^2}{b x^n+a}dx}{a b n}+\frac {x^3 (A b-a B)}{a b n \left (a+b x^n\right )}\) |
\(\Big \downarrow \) 888 |
\(\displaystyle \frac {x^3 (3 a B-A b (3-n)) \operatorname {Hypergeometric2F1}\left (1,\frac {3}{n},\frac {n+3}{n},-\frac {b x^n}{a}\right )}{3 a^2 b n}+\frac {x^3 (A b-a B)}{a b n \left (a+b x^n\right )}\) |
Input:
Int[(x^2*(A + B*x^n))/(a + b*x^n)^2,x]
Output:
((A*b - a*B)*x^3)/(a*b*n*(a + b*x^n)) + ((3*a*B - A*b*(3 - n))*x^3*Hyperge ometric2F1[1, 3/n, (3 + n)/n, -((b*x^n)/a)])/(3*a^2*b*n)
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p *((c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/n, (m + 1)/n + 1 , (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] && !IGtQ[p, 0] && (ILt Q[p, 0] || GtQ[a, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n _)), x_Symbol] :> Simp[(-(b*c - a*d))*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a *b*e*n*(p + 1))), x] - Simp[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*b*n* (p + 1)) Int[(e*x)^m*(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && (( !IntegerQ[p + 1/2] && N eQ[p, -5/4]) || !RationalQ[m] || (IGtQ[n, 0] && ILtQ[p + 1/2, 0] && LeQ[-1 , m, (-n)*(p + 1)]))
\[\int \frac {x^{2} \left (A +B \,x^{n}\right )}{\left (a +b \,x^{n}\right )^{2}}d x\]
Input:
int(x^2*(A+B*x^n)/(a+b*x^n)^2,x)
Output:
int(x^2*(A+B*x^n)/(a+b*x^n)^2,x)
\[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} x^{2}}{{\left (b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(x^2*(A+B*x^n)/(a+b*x^n)^2,x, algorithm="fricas")
Output:
integral((B*x^2*x^n + A*x^2)/(b^2*x^(2*n) + 2*a*b*x^n + a^2), x)
Result contains complex when optimal does not.
Time = 6.19 (sec) , antiderivative size = 767, normalized size of antiderivative = 9.13 \[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx =\text {Too large to display} \] Input:
integrate(x**2*(A+B*x**n)/(a+b*x**n)**2,x)
Output:
A*(3*a*a**(3/n)*a**(-2 - 3/n)*n*x**3*lerchphi(b*x**n*exp_polar(I*pi)/a, 1, 3/n)*gamma(3/n)/(a*n**3*gamma(1 + 3/n) + b*n**3*x**n*gamma(1 + 3/n)) + 3* a*a**(3/n)*a**(-2 - 3/n)*n*x**3*gamma(3/n)/(a*n**3*gamma(1 + 3/n) + b*n**3 *x**n*gamma(1 + 3/n)) - 9*a*a**(3/n)*a**(-2 - 3/n)*x**3*lerchphi(b*x**n*ex p_polar(I*pi)/a, 1, 3/n)*gamma(3/n)/(a*n**3*gamma(1 + 3/n) + b*n**3*x**n*g amma(1 + 3/n)) + 3*a**(3/n)*a**(-2 - 3/n)*b*n*x**3*x**n*lerchphi(b*x**n*ex p_polar(I*pi)/a, 1, 3/n)*gamma(3/n)/(a*n**3*gamma(1 + 3/n) + b*n**3*x**n*g amma(1 + 3/n)) - 9*a**(3/n)*a**(-2 - 3/n)*b*x**3*x**n*lerchphi(b*x**n*exp_ polar(I*pi)/a, 1, 3/n)*gamma(3/n)/(a*n**3*gamma(1 + 3/n) + b*n**3*x**n*gam ma(1 + 3/n))) + B*(a*a**(-3 - 3/n)*a**(1 + 3/n)*n**2*x**(n + 3)*gamma(1 + 3/n)/(a*n**3*gamma(2 + 3/n) + b*n**3*x**n*gamma(2 + 3/n)) - 3*a*a**(-3 - 3 /n)*a**(1 + 3/n)*n*x**(n + 3)*lerchphi(b*x**n*exp_polar(I*pi)/a, 1, 1 + 3/ n)*gamma(1 + 3/n)/(a*n**3*gamma(2 + 3/n) + b*n**3*x**n*gamma(2 + 3/n)) + 3 *a*a**(-3 - 3/n)*a**(1 + 3/n)*n*x**(n + 3)*gamma(1 + 3/n)/(a*n**3*gamma(2 + 3/n) + b*n**3*x**n*gamma(2 + 3/n)) - 9*a*a**(-3 - 3/n)*a**(1 + 3/n)*x**( n + 3)*lerchphi(b*x**n*exp_polar(I*pi)/a, 1, 1 + 3/n)*gamma(1 + 3/n)/(a*n* *3*gamma(2 + 3/n) + b*n**3*x**n*gamma(2 + 3/n)) - 3*a**(-3 - 3/n)*a**(1 + 3/n)*b*n*x**n*x**(n + 3)*lerchphi(b*x**n*exp_polar(I*pi)/a, 1, 1 + 3/n)*ga mma(1 + 3/n)/(a*n**3*gamma(2 + 3/n) + b*n**3*x**n*gamma(2 + 3/n)) - 9*a**( -3 - 3/n)*a**(1 + 3/n)*b*x**n*x**(n + 3)*lerchphi(b*x**n*exp_polar(I*pi...
\[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} x^{2}}{{\left (b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(x^2*(A+B*x^n)/(a+b*x^n)^2,x, algorithm="maxima")
Output:
-(B*a - A*b)*x^3/(a*b^2*n*x^n + a^2*b*n) + (A*b*(n - 3) + 3*B*a)*integrate (x^2/(a*b^2*n*x^n + a^2*b*n), x)
\[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\int { \frac {{\left (B x^{n} + A\right )} x^{2}}{{\left (b x^{n} + a\right )}^{2}} \,d x } \] Input:
integrate(x^2*(A+B*x^n)/(a+b*x^n)^2,x, algorithm="giac")
Output:
integrate((B*x^n + A)*x^2/(b*x^n + a)^2, x)
Timed out. \[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\int \frac {x^2\,\left (A+B\,x^n\right )}{{\left (a+b\,x^n\right )}^2} \,d x \] Input:
int((x^2*(A + B*x^n))/(a + b*x^n)^2,x)
Output:
int((x^2*(A + B*x^n))/(a + b*x^n)^2, x)
\[ \int \frac {x^2 \left (A+B x^n\right )}{\left (a+b x^n\right )^2} \, dx=\int \frac {x^{2}}{x^{n} b +a}d x \] Input:
int(x^2*(A+B*x^n)/(a+b*x^n)^2,x)
Output:
int(x**2/(x**n*b + a),x)