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

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

Optimal result

Integrand size = 22, antiderivative size = 96 \[ \int \frac {\left (a+\frac {b}{x^2}\right )^p \left (c+\frac {d}{x^2}\right )^q}{x} \, dx=\frac {\left (a+\frac {b}{x^2}\right )^{1+p} \left (c+\frac {d}{x^2}\right )^q \left (\frac {b \left (c+\frac {d}{x^2}\right )}{b c-a d}\right )^{-q} \operatorname {AppellF1}\left (1+p,1,-q,2+p,1+\frac {b}{a x^2},-\frac {d \left (a+\frac {b}{x^2}\right )}{b c-a d}\right )}{2 a (1+p)} \] Output:

1/2*(a+b/x^2)^(p+1)*(c+d/x^2)^q*AppellF1(p+1,-q,1,2+p,-d*(a+b/x^2)/(-a*d+b 
*c),1+b/a/x^2)/a/(p+1)/((b*(c+d/x^2)/(-a*d+b*c))^q)
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.99 \[ \int \frac {\left (a+\frac {b}{x^2}\right )^p \left (c+\frac {d}{x^2}\right )^q}{x} \, dx=-\frac {\left (a+\frac {b}{x^2}\right )^p \left (c+\frac {d}{x^2}\right )^q \left (1+\frac {a x^2}{b}\right )^{-p} \left (1+\frac {c x^2}{d}\right )^{-q} \operatorname {AppellF1}\left (-p-q,-p,-q,1-p-q,-\frac {a x^2}{b},-\frac {c x^2}{d}\right )}{2 (p+q)} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.39 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {948, 154, 153}

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+\frac {b}{x^2}\right )^p \left (c+\frac {d}{x^2}\right )^q}{x} \, dx\)

\(\Big \downarrow \) 948

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

\(\Big \downarrow \) 154

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

\(\Big \downarrow \) 153

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 153
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(b*e - a*f)^p*((a + b*x)^(m + 1)/(b^(p + 1)*(m + 1)*Simp 
lify[b/(b*c - a*d)]^n))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/(b*c 
 - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, m, 
n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[p] && GtQ[Simplify[b/( 
b*c - a*d)], 0] &&  !(GtQ[Simplify[d/(d*a - c*b)], 0] && SimplerQ[c + d*x, 
a + b*x])
 

rule 154
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(c + d*x)^FracPart[n]/(Simplify[b/(b*c - a*d)]^IntPart[n 
]*(b*((c + d*x)/(b*c - a*d)))^FracPart[n])   Int[(a + b*x)^m*Simp[b*(c/(b*c 
 - a*d)) + b*d*(x/(b*c - a*d)), x]^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, 
 d, e, f, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[p] &&  !G 
tQ[Simplify[b/(b*c - a*d)], 0] &&  !SimplerQ[c + d*x, a + b*x]
 

rule 948
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^ 
p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ 
[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]
 
Maple [F]

\[\int \frac {\left (a +\frac {b}{x^{2}}\right )^{p} \left (c +\frac {d}{x^{2}}\right )^{q}}{x}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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