\(\int \frac {A+B x^n+C x^{2 n}}{a+b x^n+c x^{2 n}} \, dx\) [10]

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

Optimal result

Integrand size = 31, antiderivative size = 204 \[ \int \frac {A+B x^n+C x^{2 n}}{a+b x^n+c x^{2 n}} \, dx=\frac {C x}{c}+\frac {\left (B c-b C-\frac {b B c-b^2 C-2 c (A c-a C)}{\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 )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (B c-b C+\frac {b B c-b^2 C-2 c (A c-a C)}{\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 )}{c \left (b+\sqrt {b^2-4 a c}\right )} \] Output:

C*x/c+(B*c-C*b-(b*B*c-b^2*C-2*c*(A*c-C*a))/(-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)))/c/(b-(-4*a*c+b^2)^(1/2) 
)+(B*c-C*b+(b*B*c-b^2*C-2*c*(A*c-C*a))/(-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)))/c/(b+(-4*a*c+b^2)^(1/2))
 

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.96 \[ \int \frac {A+B x^n+C x^{2 n}}{a+b x^n+c x^{2 n}} \, dx=\frac {x \left (C+\frac {\left (B c-b C+\frac {-b B c+b^2 C+2 c (A c-a C)}{\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 )}{b-\sqrt {b^2-4 a c}}+\frac {\left (B c-b C+\frac {b B c-b^2 C+2 c (-A c+a C)}{\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 )}{b+\sqrt {b^2-4 a c}}\right )}{c} \] Input:

Integrate[(A + B*x^n + C*x^(2*n))/(a + b*x^n + c*x^(2*n)),x]
 

Output:

(x*(C + ((B*c - b*C + (-(b*B*c) + b^2*C + 2*c*(A*c - a*C))/Sqrt[b^2 - 4*a* 
c])*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]) + ((B*c - b*C + (b*B*c - b^2*C + 2*c*(-(A* 
c) + a*C))/Sqrt[b^2 - 4*a*c])*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])))/c
 

Rubi [F]

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

\(\Big \downarrow \) 2329

\(\displaystyle \int \frac {A+B x^n+C x^{2 n}}{a+b x^n+c x^{2 n}}dx\)

Input:

Int[(A + B*x^n + C*x^(2*n))/(a + b*x^n + c*x^(2*n)),x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 2329
Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.))^(p_.), x_Symbol] :> 
 Unintegrable[Pq*(a + b*x^n + c*x^(2*n))^p, x] /; FreeQ[{a, b, c, n, p}, x] 
 && EqQ[n2, 2*n] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])
 
Maple [F]

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

Input:

int((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x)
 

Output:

int((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x)
 

Fricas [F]

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

integrate((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")
 

Output:

integral((C*x^(2*n) + B*x^n + A)/(c*x^(2*n) + b*x^n + a), x)
 

Sympy [F]

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

integrate((A+B*x**n+C*x**(2*n))/(a+b*x**n+c*x**(2*n)),x)
 

Output:

Integral((A + B*x**n + C*x**(2*n))/(a + b*x**n + c*x**(2*n)), x)
 

Maxima [F]

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

integrate((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")
 

Output:

C*x/c + integrate(-(C*a - A*c + (C*b - B*c)*x^n)/(c^2*x^(2*n) + b*c*x^n + 
a*c), x)
 

Giac [F]

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

integrate((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")
 

Output:

integrate((C*x^(2*n) + B*x^n + A)/(c*x^(2*n) + b*x^n + a), x)
 

Mupad [F(-1)]

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

int((A + C*x^(2*n) + B*x^n)/(a + b*x^n + c*x^(2*n)),x)
 

Output:

int((A + C*x^(2*n) + B*x^n)/(a + b*x^n + c*x^(2*n)), x)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 1, normalized size of antiderivative = 0.00 \[ \int \frac {A+B x^n+C x^{2 n}}{a+b x^n+c x^{2 n}} \, dx=x \] Input:

int((A+B*x^n+C*x^(2*n))/(a+b*x^n+c*x^(2*n)),x)
 

Output:

x