Integrand size = 22, antiderivative size = 99 \[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\frac {2 B x^3 \left (a+b x^n\right )^{3/2}}{3 b (2+n)}+\frac {\left (A-\frac {2 a B}{b (2+n)}\right ) x^3 \sqrt {a+b x^n} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3}{n},\frac {3+n}{n},-\frac {b x^n}{a}\right )}{3 \sqrt {1+\frac {b x^n}{a}}} \] Output:
2/3*B*x^3*(a+b*x^n)^(3/2)/b/(2+n)+1/3*(A-2*a*B/b/(2+n))*x^3*(a+b*x^n)^(1/2 )*hypergeom([-1/2, 3/n],[(3+n)/n],-b*x^n/a)/(1+b*x^n/a)^(1/2)
Time = 0.09 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.02 \[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\frac {x^3 \sqrt {a+b x^n} \left (A (3+n) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3}{n},\frac {3+n}{n},-\frac {b x^n}{a}\right )+3 B x^n \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3+n}{n},2+\frac {3}{n},-\frac {b x^n}{a}\right )\right )}{3 (3+n) \sqrt {1+\frac {b x^n}{a}}} \] Input:
Integrate[x^2*Sqrt[a + b*x^n]*(A + B*x^n),x]
Output:
(x^3*Sqrt[a + b*x^n]*(A*(3 + n)*Hypergeometric2F1[-1/2, 3/n, (3 + n)/n, -( (b*x^n)/a)] + 3*B*x^n*Hypergeometric2F1[-1/2, (3 + n)/n, 2 + 3/n, -((b*x^n )/a)]))/(3*(3 + n)*Sqrt[1 + (b*x^n)/a])
Time = 0.40 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {959, 889, 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 x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx\) |
\(\Big \downarrow \) 959 |
\(\displaystyle \left (A-\frac {2 a B}{b (n+2)}\right ) \int x^2 \sqrt {b x^n+a}dx+\frac {2 B x^3 \left (a+b x^n\right )^{3/2}}{3 b (n+2)}\) |
\(\Big \downarrow \) 889 |
\(\displaystyle \frac {\sqrt {a+b x^n} \left (A-\frac {2 a B}{b (n+2)}\right ) \int x^2 \sqrt {\frac {b x^n}{a}+1}dx}{\sqrt {\frac {b x^n}{a}+1}}+\frac {2 B x^3 \left (a+b x^n\right )^{3/2}}{3 b (n+2)}\) |
\(\Big \downarrow \) 888 |
\(\displaystyle \frac {x^3 \sqrt {a+b x^n} \left (A-\frac {2 a B}{b (n+2)}\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {3}{n},\frac {n+3}{n},-\frac {b x^n}{a}\right )}{3 \sqrt {\frac {b x^n}{a}+1}}+\frac {2 B x^3 \left (a+b x^n\right )^{3/2}}{3 b (n+2)}\) |
Input:
Int[x^2*Sqrt[a + b*x^n]*(A + B*x^n),x]
Output:
(2*B*x^3*(a + b*x^n)^(3/2))/(3*b*(2 + n)) + ((A - (2*a*B)/(b*(2 + n)))*x^3 *Sqrt[a + b*x^n]*Hypergeometric2F1[-1/2, 3/n, (3 + n)/n, -((b*x^n)/a)])/(3 *Sqrt[1 + (b*x^n)/a])
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[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^I ntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^FracPart[p]) Int[(c*x) ^m*(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] && !IGtQ[p, 0 ] && !(ILtQ[p, 0] || GtQ[a, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n _)), x_Symbol] :> Simp[d*(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Simp[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m + n*(p + 1) + 1)) Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0] && NeQ[m + n*(p + 1) + 1, 0]
\[\int x^{2} \sqrt {a +b \,x^{n}}\, \left (A +B \,x^{n}\right )d x\]
Input:
int(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x)
Output:
int(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x)
Exception generated. \[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\text {Exception raised: TypeError} \] Input:
integrate(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x, algorithm="fricas")
Output:
Exception raised: TypeError >> Error detected within library code: inte grate: implementation incomplete (has polynomial part)
Result contains complex when optimal does not.
Time = 2.13 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.17 \[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\frac {A a^{\frac {3}{n}} a^{\frac {1}{2} - \frac {3}{n}} x^{3} \Gamma \left (\frac {3}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{2}, \frac {3}{n} \\ 1 + \frac {3}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n \Gamma \left (1 + \frac {3}{n}\right )} + \frac {B a^{- \frac {1}{2} - \frac {3}{n}} a^{1 + \frac {3}{n}} x^{n + 3} \Gamma \left (1 + \frac {3}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{2}, 1 + \frac {3}{n} \\ 2 + \frac {3}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n \Gamma \left (2 + \frac {3}{n}\right )} \] Input:
integrate(x**2*(a+b*x**n)**(1/2)*(A+B*x**n),x)
Output:
A*a**(3/n)*a**(1/2 - 3/n)*x**3*gamma(3/n)*hyper((-1/2, 3/n), (1 + 3/n,), b *x**n*exp_polar(I*pi)/a)/(n*gamma(1 + 3/n)) + B*a**(-1/2 - 3/n)*a**(1 + 3/ n)*x**(n + 3)*gamma(1 + 3/n)*hyper((-1/2, 1 + 3/n), (2 + 3/n,), b*x**n*exp _polar(I*pi)/a)/(n*gamma(2 + 3/n))
\[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\int { {\left (B x^{n} + A\right )} \sqrt {b x^{n} + a} x^{2} \,d x } \] Input:
integrate(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x, algorithm="maxima")
Output:
integrate((B*x^n + A)*sqrt(b*x^n + a)*x^2, x)
\[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\int { {\left (B x^{n} + A\right )} \sqrt {b x^{n} + a} x^{2} \,d x } \] Input:
integrate(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x, algorithm="giac")
Output:
integrate((B*x^n + A)*sqrt(b*x^n + a)*x^2, x)
Timed out. \[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\int x^2\,\left (A+B\,x^n\right )\,\sqrt {a+b\,x^n} \,d x \] Input:
int(x^2*(A + B*x^n)*(a + b*x^n)^(1/2),x)
Output:
int(x^2*(A + B*x^n)*(a + b*x^n)^(1/2), x)
\[ \int x^2 \sqrt {a+b x^n} \left (A+B x^n\right ) \, dx=\frac {2 x^{n} \sqrt {x^{n} b +a}\, b n \,x^{3}+12 x^{n} \sqrt {x^{n} b +a}\, b \,x^{3}+8 \sqrt {x^{n} b +a}\, a n \,x^{3}+12 \sqrt {x^{n} b +a}\, a \,x^{3}+3 \left (\int \frac {\sqrt {x^{n} b +a}\, x^{2}}{x^{n} b \,n^{2}+8 x^{n} b n +12 x^{n} b +a \,n^{2}+8 a n +12 a}d x \right ) a^{2} n^{4}+24 \left (\int \frac {\sqrt {x^{n} b +a}\, x^{2}}{x^{n} b \,n^{2}+8 x^{n} b n +12 x^{n} b +a \,n^{2}+8 a n +12 a}d x \right ) a^{2} n^{3}+36 \left (\int \frac {\sqrt {x^{n} b +a}\, x^{2}}{x^{n} b \,n^{2}+8 x^{n} b n +12 x^{n} b +a \,n^{2}+8 a n +12 a}d x \right ) a^{2} n^{2}}{3 n^{2}+24 n +36} \] Input:
int(x^2*(a+b*x^n)^(1/2)*(A+B*x^n),x)
Output:
(2*x**n*sqrt(x**n*b + a)*b*n*x**3 + 12*x**n*sqrt(x**n*b + a)*b*x**3 + 8*sq rt(x**n*b + a)*a*n*x**3 + 12*sqrt(x**n*b + a)*a*x**3 + 3*int((sqrt(x**n*b + a)*x**2)/(x**n*b*n**2 + 8*x**n*b*n + 12*x**n*b + a*n**2 + 8*a*n + 12*a), x)*a**2*n**4 + 24*int((sqrt(x**n*b + a)*x**2)/(x**n*b*n**2 + 8*x**n*b*n + 12*x**n*b + a*n**2 + 8*a*n + 12*a),x)*a**2*n**3 + 36*int((sqrt(x**n*b + a) *x**2)/(x**n*b*n**2 + 8*x**n*b*n + 12*x**n*b + a*n**2 + 8*a*n + 12*a),x)*a **2*n**2)/(3*(n**2 + 8*n + 12))