Integrand size = 24, antiderivative size = 104 \[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=-\frac {2 p \left (a+b x^n\right )^{1+p}}{(2-n-n p) x^2}+\frac {a (2-n) (1+p) \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,-\frac {2-n}{n},-\frac {b x^n}{a}\right )}{(2-n-n p) x^2} \] Output:
-2*p*(a+b*x^n)^(p+1)/(-n*p-n+2)/x^2+a*(2-n)*(p+1)*(a+b*x^n)^p*hypergeom([- p, -2/n],[-(2-n)/n],-b*x^n/a)/(-n*p-n+2)/x^2/((1+b*x^n/a)^p)
Time = 0.09 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.93 \[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=\frac {\left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (a (-2+n) \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,\frac {-2+n}{n},-\frac {b x^n}{a}\right )+2 b p x^n \operatorname {Hypergeometric2F1}\left (\frac {-2+n}{n},-p,2-\frac {2}{n},-\frac {b x^n}{a}\right )\right )}{(-2+n) x^2} \] Input:
Integrate[((a + b*x^n)^p*(-2*a + 2*b*p*x^n))/x^3,x]
Output:
((a + b*x^n)^p*(a*(-2 + n)*Hypergeometric2F1[-2/n, -p, (-2 + n)/n, -((b*x^ n)/a)] + 2*b*p*x^n*Hypergeometric2F1[(-2 + n)/n, -p, 2 - 2/n, -((b*x^n)/a) ]))/((-2 + n)*x^2*(1 + (b*x^n)/a)^p)
Time = 0.40 (sec) , antiderivative size = 104, 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.125, 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 \frac {\left (a+b x^n\right )^p \left (2 b p x^n-2 a\right )}{x^3} \, dx\) |
\(\Big \downarrow \) 959 |
\(\displaystyle -\frac {2 a (2-n) (p+1) \int \frac {\left (b x^n+a\right )^p}{x^3}dx}{n (-p)-n+2}-\frac {2 p \left (a+b x^n\right )^{p+1}}{x^2 (n (-p)-n+2)}\) |
\(\Big \downarrow \) 889 |
\(\displaystyle -\frac {2 a (2-n) (p+1) \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \int \frac {\left (\frac {b x^n}{a}+1\right )^p}{x^3}dx}{n (-p)-n+2}-\frac {2 p \left (a+b x^n\right )^{p+1}}{x^2 (n (-p)-n+2)}\) |
\(\Big \downarrow \) 888 |
\(\displaystyle \frac {a (2-n) (p+1) \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,-\frac {2-n}{n},-\frac {b x^n}{a}\right )}{x^2 (n (-p)-n+2)}-\frac {2 p \left (a+b x^n\right )^{p+1}}{x^2 (n (-p)-n+2)}\) |
Input:
Int[((a + b*x^n)^p*(-2*a + 2*b*p*x^n))/x^3,x]
Output:
(-2*p*(a + b*x^n)^(1 + p))/((2 - n - n*p)*x^2) + (a*(2 - n)*(1 + p)*(a + b *x^n)^p*Hypergeometric2F1[-2/n, -p, -((2 - n)/n), -((b*x^n)/a)])/((2 - n - n*p)*x^2*(1 + (b*x^n)/a)^p)
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 \frac {\left (a +b \,x^{n}\right )^{p} \left (-2 a +2 b p \,x^{n}\right )}{x^{3}}d x\]
Input:
int((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x)
Output:
int((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x)
\[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=\int { \frac {2 \, {\left (b p x^{n} - a\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:
integrate((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x, algorithm="fricas")
Output:
integral(2*(b*p*x^n - a)*(b*x^n + a)^p/x^3, x)
Result contains complex when optimal does not.
Time = 6.02 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.12 \[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=- \frac {2 a a^{- \frac {2}{n}} a^{p + \frac {2}{n}} \Gamma \left (- \frac {2}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {2}{n}, - p \\ 1 - \frac {2}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n x^{2} \Gamma \left (1 - \frac {2}{n}\right )} + \frac {2 a^{1 - \frac {2}{n}} a^{p - 1 + \frac {2}{n}} b p x^{n - 2} \Gamma \left (1 - \frac {2}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, 1 - \frac {2}{n} \\ 2 - \frac {2}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n \Gamma \left (2 - \frac {2}{n}\right )} \] Input:
integrate((a+b*x**n)**p*(-2*a+2*b*p*x**n)/x**3,x)
Output:
-2*a*a**(p + 2/n)*gamma(-2/n)*hyper((-2/n, -p), (1 - 2/n,), b*x**n*exp_pol ar(I*pi)/a)/(a**(2/n)*n*x**2*gamma(1 - 2/n)) + 2*a**(1 - 2/n)*a**(p - 1 + 2/n)*b*p*x**(n - 2)*gamma(1 - 2/n)*hyper((-p, 1 - 2/n), (2 - 2/n,), b*x**n *exp_polar(I*pi)/a)/(n*gamma(2 - 2/n))
\[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=\int { \frac {2 \, {\left (b p x^{n} - a\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:
integrate((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x, algorithm="maxima")
Output:
2*integrate((b*p*x^n - a)*(b*x^n + a)^p/x^3, x)
\[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=\int { \frac {2 \, {\left (b p x^{n} - a\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:
integrate((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x, algorithm="giac")
Output:
integrate(2*(b*p*x^n - a)*(b*x^n + a)^p/x^3, x)
Timed out. \[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx=\int -\frac {\left (2\,a-2\,b\,p\,x^n\right )\,{\left (a+b\,x^n\right )}^p}{x^3} \,d x \] Input:
int(-((2*a - 2*b*p*x^n)*(a + b*x^n)^p)/x^3,x)
Output:
int(-((2*a - 2*b*p*x^n)*(a + b*x^n)^p)/x^3, x)
\[ \int \frac {\left (a+b x^n\right )^p \left (-2 a+2 b p x^n\right )}{x^3} \, dx =\text {Too large to display} \] Input:
int((a+b*x^n)^p*(-2*a+2*b*p*x^n)/x^3,x)
Output:
(2*(x**n*(x**n*b + a)**p*b*n*p**2 - 2*x**n*(x**n*b + a)**p*b*p + (x**n*b + a)**p*a*n*p**2 - (x**n*b + a)**p*a*n*p - (x**n*b + a)**p*a*n + 2*(x**n*b + a)**p*a - int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x** 3 - 4*x**n*b*n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n**2*p*x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**4*p**4 *x**2 - 2*int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x**3 - 4*x**n*b*n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n**2*p*x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**4*p**3*x **2 - int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x**3 - 4* x**n*b*n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n **2*p*x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**4*p**2*x**2 + 2*int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x**3 - 4*x* *n*b*n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n** 2*p*x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**3*p**4*x**2 + 8*int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x**3 - 4*x**n *b*n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n**2* p*x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**3*p**3*x**2 + 8* int((x**n*b + a)**p/(x**n*b*n**2*p**2*x**3 + x**n*b*n**2*p*x**3 - 4*x**n*b *n*p*x**3 - 2*x**n*b*n*x**3 + 4*x**n*b*x**3 + a*n**2*p**2*x**3 + a*n**2*p* x**3 - 4*a*n*p*x**3 - 2*a*n*x**3 + 4*a*x**3),x)*a**2*n**3*p**2*x**2 + 2...