\(\int \frac {x^{-2 n} (d+e x^n)}{a+c x^{2 n}} \, dx\) [25]

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

Optimal result

Integrand size = 24, antiderivative size = 100 \[ \int \frac {x^{-2 n} \left (d+e x^n\right )}{a+c x^{2 n}} \, dx=\frac {d x^{1-2 n} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} \left (-2+\frac {1}{n}\right ),\frac {1}{2 n},-\frac {c x^{2 n}}{a}\right )}{a (1-2 n)}+\frac {e x^{1-n} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} \left (-1+\frac {1}{n}\right ),\frac {1+n}{2 n},-\frac {c x^{2 n}}{a}\right )}{a (1-n)} \] Output:

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

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.93 \[ \int \frac {x^{-2 n} \left (d+e x^n\right )}{a+c x^{2 n}} \, dx=\frac {x^{1-2 n} \left (\frac {d \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} \left (-2+\frac {1}{n}\right ),\frac {1}{2 n},-\frac {c x^{2 n}}{a}\right )}{1-2 n}-\frac {e x^n \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} \left (-1+\frac {1}{n}\right ),\frac {1+n}{2 n},-\frac {c x^{2 n}}{a}\right )}{-1+n}\right )}{a} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.33, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {1885, 2009}

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^{-2 n} \left (d+e x^n\right )}{a+c x^{2 n}} \, dx\)

\(\Big \downarrow \) 1885

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((d - (Sqrt[-a]*e)/Sqrt[c])*x^(1 - 2*n)*Hypergeometric2F1[1, -2 + n^(-1), 
-1 + n^(-1), -((Sqrt[c]*x^n)/Sqrt[-a])])/(2*a*(1 - 2*n)) + ((d + (Sqrt[-a] 
*e)/Sqrt[c])*x^(1 - 2*n)*Hypergeometric2F1[1, -2 + n^(-1), -1 + n^(-1), (S 
qrt[c]*x^n)/Sqrt[-a]])/(2*a*(1 - 2*n))
 

Defintions of rubi rules used

rule 1885
Int[((f_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^ 
(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*(d + e*x^n)^q*(a + c* 
x^(2*n))^p, x], x] /; FreeQ[{a, c, d, e, f, m, n, p, q}, x] && EqQ[n2, 2*n] 
 &&  !RationalQ[n] && (IGtQ[p, 0] || IGtQ[q, 0])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
Maple [F]

\[\int \frac {\left (d +e \,x^{n}\right ) x^{-2 n}}{a +c \,x^{2 n}}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral((e*x^n + d)/(c*x^(4*n) + a*x^(2*n)), x)
 

Sympy [F]

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

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

Output:

Integral((d + e*x**n)/(x**(2*n)*(a + c*x**(2*n))), x)
 

Maxima [F]

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

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

Output:

-(d*(n - 1)*x/x^(2*n) + e*(2*n - 1)*x/x^n)/((2*n^2 - 3*n + 1)*a) - integra 
te((c*e*x^n + c*d)/(a*c*x^(2*n) + a^2), x)
 

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 20.92 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.95 \[ \int \frac {x^{-2 n} \left (d+e x^n\right )}{a+c x^{2 n}} \, dx=-\frac {d\,x^{1-2\,n}\,{{}}_2{\mathrm {F}}_1\left (1,-\frac {n-\frac {1}{2}}{n};\ \frac {1}{2\,n};\ -\frac {c\,x^{2\,n}}{a}\right )}{a\,\left (2\,n-1\right )}-\frac {e\,x\,{{}}_2{\mathrm {F}}_1\left (1,-\frac {n-1}{2\,n};\ \frac {n+1}{2\,n};\ -\frac {c\,x^{2\,n}}{a}\right )}{a\,x^n\,\left (n-1\right )} \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

( - 2*x**(2*n)*int(x**n/(x**(2*n)*c + a),x)*c*e*n**2 + 3*x**(2*n)*int(x**n 
/(x**(2*n)*c + a),x)*c*e*n - x**(2*n)*int(x**n/(x**(2*n)*c + a),x)*c*e - 2 
*x**(2*n)*int(1/(x**(2*n)*c + a),x)*c*d*n**2 + 3*x**(2*n)*int(1/(x**(2*n)* 
c + a),x)*c*d*n - x**(2*n)*int(1/(x**(2*n)*c + a),x)*c*d - 2*x**n*e*n*x + 
x**n*e*x - d*n*x + d*x)/(x**(2*n)*a*(2*n**2 - 3*n + 1))