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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {1752, 778}

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

\(\Big \downarrow \) 1752

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

\(\Big \downarrow \) 778

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 778
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F 
1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p 
, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p] || 
GtQ[a, 0])
 

rule 1752
Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), 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^n), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   I 
nt[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2 
, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 
 - 4*a*c] ||  !IGtQ[n/2, 0])
 
Maple [F]

\[\int \frac {d +e \,x^{n}}{a +b \,x^{n}+c \,x^{2 n}}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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