\(\int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx\) [188]

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

Optimal result

Integrand size = 26, antiderivative size = 205 \[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=-\frac {2 x^{-n/2}}{a n}+\frac {\sqrt {2} \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b-\sqrt {b^2-4 a c}} n}+\frac {\sqrt {2} \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{a^{3/2} \sqrt {b+\sqrt {b^2-4 a c}} n} \] Output:

-2/a/n/(x^(1/2*n))+2^(1/2)*(b-(-2*a*c+b^2)/(-4*a*c+b^2)^(1/2))*arctan(2^(1 
/2)*a^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2)/(x^(1/2*n)))/a^(3/2)/(b-(-4*a*c+b 
^2)^(1/2))^(1/2)/n+2^(1/2)*(b+(-2*a*c+b^2)/(-4*a*c+b^2)^(1/2))*arctan(2^(1 
/2)*a^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2)/(x^(1/2*n)))/a^(3/2)/(b+(-4*a*c+b 
^2)^(1/2))^(1/2)/n
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.35 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.62 \[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\frac {4 c x^{-n/2} \left (\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}+\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}\right )}{n} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1717, 1679, 1442, 1480, 218}

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 {x^{-\frac {n}{2}-1}}{a+b x^n+c x^{2 n}} \, dx\)

\(\Big \downarrow \) 1717

\(\displaystyle -\frac {2 \int \frac {1}{b x^n+c x^{2 n}+a}dx^{-n/2}}{n}\)

\(\Big \downarrow \) 1679

\(\displaystyle -\frac {2 \int \frac {x^{-2 n}}{a x^{-2 n}+b x^{-n}+c}dx^{-n/2}}{n}\)

\(\Big \downarrow \) 1442

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

\(\Big \downarrow \) 1480

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

\(\Big \downarrow \) 218

\(\displaystyle -\frac {2 \left (\frac {x^{-n/2}}{a}-\frac {\frac {\left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {a} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\left (\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}+b\right ) \arctan \left (\frac {\sqrt {2} \sqrt {a} x^{-n/2}}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {a} \sqrt {\sqrt {b^2-4 a c}+b}}}{a}\right )}{n}\)

Input:

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

Output:

(-2*(1/(a*x^(n/2)) - (((b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[ 
2]*Sqrt[a])/(Sqrt[b - Sqrt[b^2 - 4*a*c]]*x^(n/2))])/(Sqrt[2]*Sqrt[a]*Sqrt[ 
b - Sqrt[b^2 - 4*a*c]]) + ((b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(S 
qrt[2]*Sqrt[a])/(Sqrt[b + Sqrt[b^2 - 4*a*c]]*x^(n/2))])/(Sqrt[2]*Sqrt[a]*S 
qrt[b + Sqrt[b^2 - 4*a*c]]))/a))/n
 

Defintions of rubi rules used

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 1442
Int[((d_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] 
:> Simp[d^3*(d*x)^(m - 3)*((a + b*x^2 + c*x^4)^(p + 1)/(c*(m + 4*p + 1))), 
x] - Simp[d^4/(c*(m + 4*p + 1))   Int[(d*x)^(m - 4)*Simp[a*(m - 3) + b*(m + 
 2*p - 1)*x^2, x]*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, p}, x 
] && NeQ[b^2 - 4*a*c, 0] && GtQ[m, 3] && NeQ[m + 4*p + 1, 0] && IntegerQ[2* 
p] && (IntegerQ[p] || IntegerQ[m])
 

rule 1480
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q))   Int[1/( 
b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   Int[1/(b/2 
+ q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] 
 && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
 

rule 1679
Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^( 
2*n*p)*(c + b/x^n + a/x^(2*n))^p, x] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] 
 && LtQ[n, 0] && IntegerQ[p]
 

rule 1717
Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] 
 :> Simp[1/(m + 1)   Subst[Int[(a + b*x^Simplify[n/(m + 1)] + c*x^Simplify[ 
2*(n/(m + 1))])^p, x], x, x^(m + 1)], x] /; FreeQ[{a, b, c, m, n, p}, x] && 
 EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IntegerQ[Simplify[n/(m + 1)]] &&  ! 
IntegerQ[n]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.33 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.31

method result size
risch \(-\frac {2 x^{-\frac {n}{2}}}{a n}+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (16 a^{5} c^{2} n^{4}-8 a^{4} b^{2} c \,n^{4}+a^{3} b^{4} n^{4}\right ) \textit {\_Z}^{4}+\left (12 a^{2} b \,c^{2} n^{2}-7 a \,b^{3} c \,n^{2}+b^{5} n^{2}\right ) \textit {\_Z}^{2}+c^{3}\right )}{\sum }\textit {\_R} \ln \left (x^{\frac {n}{2}}+\left (-\frac {8 n^{3} a^{5} c^{2}}{a \,c^{3}-b^{2} c^{2}}+\frac {6 n^{3} b^{2} a^{4} c}{a \,c^{3}-b^{2} c^{2}}-\frac {n^{3} b^{4} a^{3}}{a \,c^{3}-b^{2} c^{2}}\right ) \textit {\_R}^{3}+\left (-\frac {5 n b \,a^{2} c^{2}}{a \,c^{3}-b^{2} c^{2}}+\frac {5 n \,b^{3} a c}{a \,c^{3}-b^{2} c^{2}}-\frac {n \,b^{5}}{a \,c^{3}-b^{2} c^{2}}\right ) \textit {\_R} \right )\right )\) \(268\)

Input:

int(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)
 

Output:

-2/a/n/(x^(1/2*n))+sum(_R*ln(x^(1/2*n)+(-8/(a*c^3-b^2*c^2)*n^3*a^5*c^2+6/( 
a*c^3-b^2*c^2)*n^3*b^2*a^4*c-1/(a*c^3-b^2*c^2)*n^3*b^4*a^3)*_R^3+(-5/(a*c^ 
3-b^2*c^2)*n*b*a^2*c^2+5/(a*c^3-b^2*c^2)*n*b^3*a*c-1/(a*c^3-b^2*c^2)*n*b^5 
)*_R),_R=RootOf((16*a^5*c^2*n^4-8*a^4*b^2*c*n^4+a^3*b^4*n^4)*_Z^4+(12*a^2* 
b*c^2*n^2-7*a*b^3*c*n^2+b^5*n^2)*_Z^2+c^3))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1229 vs. \(2 (169) = 338\).

Time = 0.10 (sec) , antiderivative size = 1229, normalized size of antiderivative = 6.00 \[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\text {Too large to display} \] Input:

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

Output:

1/2*(sqrt(2)*a*n*sqrt(-((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^ 
2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) + b^3 - 3*a*b*c)/((a^3*b^2 - 4*a^4*c)*n^ 
2))*log(-(4*(b^2*c - a*c^2)*x*x^(-1/2*n - 1) + sqrt(2)*((a^3*b^3 - 4*a^4*b 
*c)*n^3*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) - (b^4 
 - 5*a*b^2*c + 4*a^2*c^2)*n)*sqrt(-((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2* 
a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) + b^3 - 3*a*b*c)/((a^3*b^2 - 
 4*a^4*c)*n^2)))/x) - sqrt(2)*a*n*sqrt(-((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 
 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) + b^3 - 3*a*b*c)/((a^3* 
b^2 - 4*a^4*c)*n^2))*log(-(4*(b^2*c - a*c^2)*x*x^(-1/2*n - 1) - sqrt(2)*(( 
a^3*b^3 - 4*a^4*b*c)*n^3*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^ 
7*c)*n^4)) - (b^4 - 5*a*b^2*c + 4*a^2*c^2)*n)*sqrt(-((a^3*b^2 - 4*a^4*c)*n 
^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) + b^3 - 3*a 
*b*c)/((a^3*b^2 - 4*a^4*c)*n^2)))/x) - sqrt(2)*a*n*sqrt(((a^3*b^2 - 4*a^4* 
c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) - b^3 + 
 3*a*b*c)/((a^3*b^2 - 4*a^4*c)*n^2))*log(-(4*(b^2*c - a*c^2)*x*x^(-1/2*n - 
 1) + sqrt(2)*((a^3*b^3 - 4*a^4*b*c)*n^3*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/ 
((a^6*b^2 - 4*a^7*c)*n^4)) + (b^4 - 5*a*b^2*c + 4*a^2*c^2)*n)*sqrt(((a^3*b 
^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^ 
4)) - b^3 + 3*a*b*c)/((a^3*b^2 - 4*a^4*c)*n^2)))/x) + sqrt(2)*a*n*sqrt(((a 
^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^...
 

Sympy [F]

\[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\int \frac {x^{- \frac {n}{2} - 1}}{a + b x^{n} + c x^{2 n}}\, dx \] Input:

integrate(x**(-1-1/2*n)/(a+b*x**n+c*x**(2*n)),x)
 

Output:

Integral(x**(-n/2 - 1)/(a + b*x**n + c*x**(2*n)), x)
 

Maxima [F]

\[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {x^{-\frac {1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:

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

Output:

-2/(a*n*x^(1/2*n)) - integrate((c*x^(3/2*n) + b*x^(1/2*n))/(a*c*x*x^(2*n) 
+ a*b*x*x^n + a^2*x), x)
 

Giac [F]

\[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {x^{-\frac {1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a} \,d x } \] Input:

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

Output:

integrate(x^(-1/2*n - 1)/(c*x^(2*n) + b*x^n + a), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {x^{-1-\frac {n}{2}}}{a+b x^n+c x^{2 n}} \, dx=\int \frac {1}{x^{\frac {5 n}{2}} c x +x^{\frac {3 n}{2}} b x +x^{\frac {n}{2}} a x}d x \] Input:

int(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x)
 

Output:

int(1/(x**((5*n)/2)*c*x + x**((3*n)/2)*b*x + x**(n/2)*a*x),x)