\(\int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx\) [468]

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 = 29, antiderivative size = 78 \[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\frac {B (g x)^{1+m}}{b g m (a+b x)}+\frac {(A b m-a B (1+m)) (g x)^{1+m} \operatorname {Hypergeometric2F1}\left (2,1+m,2+m,-\frac {b x}{a}\right )}{a^2 b g m (1+m)} \] Output:

B*(g*x)^(1+m)/b/g/m/(b*x+a)+(A*b*m-a*B*(1+m))*(g*x)^(1+m)*hypergeom([2, 1+ 
m],[2+m],-b*x/a)/a^2/b/g/m/(1+m)
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.82 \[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\frac {x (g x)^m \left (\frac {a (A b-a B)}{a+b x}+\frac {(-A b m+a B (1+m)) \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,-\frac {b x}{a}\right )}{1+m}\right )}{a^2 b} \] Input:

Integrate[((g*x)^m*(A + B*x))/(a^2 + 2*a*b*x + b^2*x^2),x]
 

Output:

(x*(g*x)^m*((a*(A*b - a*B))/(a + b*x) + ((-(A*b*m) + a*B*(1 + m))*Hypergeo 
metric2F1[1, 1 + m, 2 + m, -((b*x)/a)])/(1 + m)))/(a^2*b)
 

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.06, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {1184, 27, 87, 74}

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) (g x)^m}{a^2+2 a b x+b^2 x^2} \, dx\)

\(\Big \downarrow \) 1184

\(\displaystyle b^2 \int \frac {(g x)^m (A+B x)}{b^2 (a+b x)^2}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \int \frac {(A+B x) (g x)^m}{(a+b x)^2}dx\)

\(\Big \downarrow \) 87

\(\displaystyle \frac {(g x)^{m+1} (A b-a B)}{a b g (a+b x)}-\frac {(A b m-a B (m+1)) \int \frac {(g x)^m}{a+b x}dx}{a b}\)

\(\Big \downarrow \) 74

\(\displaystyle \frac {(g x)^{m+1} (A b-a B)}{a b g (a+b x)}-\frac {(g x)^{m+1} (A b m-a B (m+1)) \operatorname {Hypergeometric2F1}\left (1,m+1,m+2,-\frac {b x}{a}\right )}{a^2 b g (m+1)}\)

Input:

Int[((g*x)^m*(A + B*x))/(a^2 + 2*a*b*x + b^2*x^2),x]
 

Output:

((A*b - a*B)*(g*x)^(1 + m))/(a*b*g*(a + b*x)) - ((A*b*m - a*B*(1 + m))*(g* 
x)^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m, -((b*x)/a)])/(a^2*b*g*(1 + m 
))
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 74
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x 
)^(m + 1)/(b*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] 
/; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[c, 0] 
 &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))
 

rule 87
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p 
+ 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p 
+ 1)))/(f*(p + 1)*(c*f - d*e))   Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] 
/; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege 
rQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ[p, n]))))
 

rule 1184
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ 
) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[1/c^p   Int[(d + e*x)^m*(f + g*x 
)^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && E 
qQ[b^2 - 4*a*c, 0] && IntegerQ[p]
 
Maple [F]

\[\int \frac {\left (g x \right )^{m} \left (B x +A \right )}{b^{2} x^{2}+2 a b x +a^{2}}d x\]

Input:

int((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x)
 

Output:

int((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x)
 

Fricas [F]

\[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\int { \frac {{\left (B x + A\right )} \left (g x\right )^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}} \,d x } \] Input:

integrate((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")
 

Output:

integral((B*x + A)*(g*x)^m/(b^2*x^2 + 2*a*b*x + a^2), x)
 

Sympy [F]

\[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\int \frac {\left (g x\right )^{m} \left (A + B x\right )}{\left (a + b x\right )^{2}}\, dx \] Input:

integrate((g*x)**m*(B*x+A)/(b**2*x**2+2*a*b*x+a**2),x)
 

Output:

Integral((g*x)**m*(A + B*x)/(a + b*x)**2, x)
 

Maxima [F]

\[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\int { \frac {{\left (B x + A\right )} \left (g x\right )^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}} \,d x } \] Input:

integrate((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")
 

Output:

integrate((B*x + A)*(g*x)^m/(b^2*x^2 + 2*a*b*x + a^2), x)
 

Giac [F]

\[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\int { \frac {{\left (B x + A\right )} \left (g x\right )^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}} \,d x } \] Input:

integrate((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")
 

Output:

integrate((B*x + A)*(g*x)^m/(b^2*x^2 + 2*a*b*x + a^2), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\int \frac {{\left (g\,x\right )}^m\,\left (A+B\,x\right )}{a^2+2\,a\,b\,x+b^2\,x^2} \,d x \] Input:

int(((g*x)^m*(A + B*x))/(a^2 + b^2*x^2 + 2*a*b*x),x)
 

Output:

int(((g*x)^m*(A + B*x))/(a^2 + b^2*x^2 + 2*a*b*x), x)
 

Reduce [F]

\[ \int \frac {(g x)^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx=\frac {g^{m} \left (x^{m}-\left (\int \frac {x^{m}}{b \,x^{2}+a x}d x \right ) a m \right )}{b m} \] Input:

int((g*x)^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x)
 

Output:

(g**m*(x**m - int(x**m/(a*x + b*x**2),x)*a*m))/(b*m)