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

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 = 108 \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^2} \, dx=-\frac {d \left (a+b x^n\right )^{1+p}}{b (1-n-n p) x}-\frac {\left (c-\frac {a d}{b (1-n-n p)}\right ) \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{n},-p,-\frac {1-n}{n},-\frac {b x^n}{a}\right )}{x} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 108, 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^2} \, dx\)

\(\Big \downarrow \) 959

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

\(\Big \downarrow \) 889

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

\(\Big \downarrow \) 888

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

Input:

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

Output:

-((d*(a + b*x^n)^(1 + p))/(b*(1 - n - n*p)*x)) - ((c - (a*d)/(b*(1 - n - n 
*p)))*(a + b*x^n)^p*Hypergeometric2F1[-n^(-1), -p, -((1 - n)/n), -((b*x^n) 
/a)])/(x*(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^{2}}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 4.26 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.02 \[ \int \frac {\left (a+b x^n\right )^p \left (c+d x^n\right )}{x^2} \, dx=\frac {a^{1 - \frac {1}{n}} a^{p - 1 + \frac {1}{n}} d x^{n - 1} \Gamma \left (1 - \frac {1}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, 1 - \frac {1}{n} \\ 2 - \frac {1}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n \Gamma \left (2 - \frac {1}{n}\right )} + \frac {a^{- \frac {1}{n}} a^{p + \frac {1}{n}} c \Gamma \left (- \frac {1}{n}\right ) {{}_{2}F_{1}\left (\begin {matrix} - \frac {1}{n}, - p \\ 1 - \frac {1}{n} \end {matrix}\middle | {\frac {b x^{n} e^{i \pi }}{a}} \right )}}{n x \Gamma \left (1 - \frac {1}{n}\right )} \] Input:

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

Output:

a**(1 - 1/n)*a**(p - 1 + 1/n)*d*x**(n - 1)*gamma(1 - 1/n)*hyper((-p, 1 - 1 
/n), (2 - 1/n,), b*x**n*exp_polar(I*pi)/a)/(n*gamma(2 - 1/n)) + a**(p + 1/ 
n)*c*gamma(-1/n)*hyper((-1/n, -p), (1 - 1/n,), b*x**n*exp_polar(I*pi)/a)/( 
a**(1/n)*n*x*gamma(1 - 1/n))
                                                                                    
                                                                                    
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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