\(\int \frac {(a+b x^n)^p (c+d x^n)}{x^3} \, dx\) [420]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [C] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 110 \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=-\frac {d \left (a+b x^n\right )^{1+p}}{b (2-n-n p) x^2}-\frac {\left (c-\frac {2 a d}{b (2-n-n p)}\right ) \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 x^2} \] Output:

-d*(a+b*x^n)^(p+1)/b/(-n*p-n+2)/x^2-1/2*(c-2*a*d/b/(-n*p-n+2))*(a+b*x^n)^p 
*hypergeom([-p, -2/n],[-(2-n)/n],-b*x^n/a)/x^2/((1+b*x^n/a)^p)
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.91 \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\frac {\left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (-c (-2+n) \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,\frac {-2+n}{n},-\frac {b x^n}{a}\right )+2 d x^n \operatorname {Hypergeometric2F1}\left (\frac {-2+n}{n},-p,2-\frac {2}{n},-\frac {b x^n}{a}\right )\right )}{2 (-2+n) x^2} \] Input:

Integrate[((a + b*x^n)^p*(c + d*x^n))/x^3,x]
 

Output:

((a + b*x^n)^p*(-(c*(-2 + n)*Hypergeometric2F1[-2/n, -p, (-2 + n)/n, -((b* 
x^n)/a)]) + 2*d*x^n*Hypergeometric2F1[(-2 + n)/n, -p, 2 - 2/n, -((b*x^n)/a 
)]))/(2*(-2 + n)*x^2*(1 + (b*x^n)/a)^p)
 

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 110, 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.150, 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 (c+d x^n\right ) \left (a+b x^n\right )^p}{x^3} \, dx\)

\(\Big \downarrow \) 959

\(\displaystyle \left (c-\frac {2 a d}{b (n (-p)-n+2)}\right ) \int \frac {\left (b x^n+a\right )^p}{x^3}dx-\frac {d \left (a+b x^n\right )^{p+1}}{b x^2 (n (-p)-n+2)}\)

\(\Big \downarrow \) 889

\(\displaystyle \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \left (c-\frac {2 a d}{b (n (-p)-n+2)}\right ) \int \frac {\left (\frac {b x^n}{a}+1\right )^p}{x^3}dx-\frac {d \left (a+b x^n\right )^{p+1}}{b x^2 (n (-p)-n+2)}\)

\(\Big \downarrow \) 888

\(\displaystyle -\frac {\left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \left (c-\frac {2 a d}{b (n (-p)-n+2)}\right ) \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,-\frac {2-n}{n},-\frac {b x^n}{a}\right )}{2 x^2}-\frac {d \left (a+b x^n\right )^{p+1}}{b x^2 (n (-p)-n+2)}\)

Input:

Int[((a + b*x^n)^p*(c + d*x^n))/x^3,x]
 

Output:

-((d*(a + b*x^n)^(1 + p))/(b*(2 - n - n*p)*x^2)) - ((c - (2*a*d)/(b*(2 - n 
 - n*p)))*(a + b*x^n)^p*Hypergeometric2F1[-2/n, -p, -((2 - n)/n), -((b*x^n 
)/a)])/(2*x^2*(1 + (b*x^n)/a)^p)
 

Defintions of rubi rules used

rule 888
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])
 

rule 889
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])
 

rule 959
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]
 
Maple [F]

\[\int \frac {\left (a +b \,x^{n}\right )^{p} \left (c +d \,x^{n}\right )}{x^{3}}d x\]

Input:

int((a+b*x^n)^p*(c+d*x^n)/x^3,x)
 

Output:

int((a+b*x^n)^p*(c+d*x^n)/x^3,x)
 

Fricas [F]

\[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\int { \frac {{\left (d x^{n} + c\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:

integrate((a+b*x^n)^p*(c+d*x^n)/x^3,x, algorithm="fricas")
 

Output:

integral((d*x^n + c)*(b*x^n + a)^p/x^3, x)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 6.38 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.02 \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\frac {a^{1 - \frac {2}{n}} a^{p - 1 + \frac {2}{n}} d 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 )} + \frac {a^{- \frac {2}{n}} a^{p + \frac {2}{n}} c \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 )} \] Input:

integrate((a+b*x**n)**p*(c+d*x**n)/x**3,x)
 

Output:

a**(1 - 2/n)*a**(p - 1 + 2/n)*d*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)) + a**(p + 2/ 
n)*c*gamma(-2/n)*hyper((-2/n, -p), (1 - 2/n,), b*x**n*exp_polar(I*pi)/a)/( 
a**(2/n)*n*x**2*gamma(1 - 2/n))
                                                                                    
                                                                                    
 

Maxima [F]

\[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\int { \frac {{\left (d x^{n} + c\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:

integrate((a+b*x^n)^p*(c+d*x^n)/x^3,x, algorithm="maxima")
 

Output:

integrate((d*x^n + c)*(b*x^n + a)^p/x^3, x)
 

Giac [F]

\[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\int { \frac {{\left (d x^{n} + c\right )} {\left (b x^{n} + a\right )}^{p}}{x^{3}} \,d x } \] Input:

integrate((a+b*x^n)^p*(c+d*x^n)/x^3,x, algorithm="giac")
 

Output:

integrate((d*x^n + c)*(b*x^n + a)^p/x^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\int \frac {{\left (a+b\,x^n\right )}^p\,\left (c+d\,x^n\right )}{x^3} \,d x \] Input:

int(((a + b*x^n)^p*(c + d*x^n))/x^3,x)
 

Output:

int(((a + b*x^n)^p*(c + d*x^n))/x^3, x)
 

Reduce [F]

\[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^3} \, dx=\text {too large to display} \] Input:

int((a+b*x^n)^p*(c+d*x^n)/x^3,x)
 

Output:

(x**n*(x**n*b + a)**p*b*d*n*p - 2*x**n*(x**n*b + a)**p*b*d + (x**n*b + a)* 
*p*a*d*n*p + (x**n*b + a)**p*b*c*n*p + (x**n*b + a)**p*b*c*n - 2*(x**n*b + 
 a)**p*b*c + 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*d*n**3 
*p**3*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*d*n**3 
*p**2*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*d*n**2 
*p**2*x**2 - 4*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*d*n**2 
*p*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*d*n*p*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*b*c*n**4*p**4*x**...