\(\int \frac {(5-2 x)^n (4+3 x)^m}{(2+3 x+x^2)^2} \, dx\) [723]

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

Optimal result

Integrand size = 25, antiderivative size = 229 \[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=-\frac {2^{1-m} 23^m (5-2 x)^{1+n} \operatorname {AppellF1}\left (1+n,-m,1,2+n,\frac {3}{23} (5-2 x),\frac {1}{9} (5-2 x)\right )}{9 (1+n)}+\frac {2^{1-m} 23^m (5-2 x)^{1+n} \operatorname {AppellF1}\left (1+n,-m,1,2+n,\frac {3}{23} (5-2 x),\frac {1}{7} (5-2 x)\right )}{7 (1+n)}-\frac {2^{1-m} 23^m (5-2 x)^{1+n} \operatorname {AppellF1}\left (1+n,-m,2,2+n,\frac {3}{23} (5-2 x),\frac {1}{9} (5-2 x)\right )}{81 (1+n)}-\frac {2^{1-m} 23^m (5-2 x)^{1+n} \operatorname {AppellF1}\left (1+n,-m,2,2+n,\frac {3}{23} (5-2 x),\frac {1}{7} (5-2 x)\right )}{49 (1+n)} \] Output:

-1/9*2^(1-m)*23^m*(5-2*x)^(1+n)*AppellF1(1+n,1,-m,2+n,5/9-2/9*x,15/23-6/23 
*x)/(1+n)+2^(1-m)*23^m*(5-2*x)^(1+n)*AppellF1(1+n,1,-m,2+n,5/7-2/7*x,15/23 
-6/23*x)/(7+7*n)-2^(1-m)*23^m*(5-2*x)^(1+n)*AppellF1(1+n,2,-m,2+n,5/9-2/9* 
x,15/23-6/23*x)/(81+81*n)-2^(1-m)*23^m*(5-2*x)^(1+n)*AppellF1(1+n,2,-m,2+n 
,5/7-2/7*x,15/23-6/23*x)/(49+49*n)
 

Mathematica [A] (warning: unable to verify)

Time = 0.57 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.12 \[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\frac {2 (5-2 x)^n \left (-\frac {3969 (4+3 x)^m \left (1-\frac {7}{2 (1+x)}\right )^{-n} \left (1+\frac {1}{3+3 x}\right )^{-m} \operatorname {AppellF1}\left (-m-n,-n,-m,1-m-n,\frac {7}{2 (1+x)},-\frac {1}{3 (1+x)}\right )}{m+n}+\frac {3969 (4+3 x)^m \left (1-\frac {9}{2 (2+x)}\right )^{-n} \left (1-\frac {2}{3 (2+x)}\right )^{-m} \operatorname {AppellF1}\left (-m-n,-n,-m,1-m-n,\frac {9}{2 (2+x)},\frac {2}{3 (2+x)}\right )}{m+n}+\frac {\left (\frac {23}{2}\right )^m (-5+2 x) \left (49 \operatorname {AppellF1}\left (1+n,2,-m,2+n,\frac {1}{9} (5-2 x),\frac {3}{23} (5-2 x)\right )+81 \operatorname {AppellF1}\left (1+n,2,-m,2+n,\frac {1}{7} (5-2 x),\frac {3}{23} (5-2 x)\right )\right )}{1+n}\right )}{3969} \] Input:

Integrate[((5 - 2*x)^n*(4 + 3*x)^m)/(2 + 3*x + x^2)^2,x]
 

Output:

(2*(5 - 2*x)^n*((-3969*(4 + 3*x)^m*AppellF1[-m - n, -n, -m, 1 - m - n, 7/( 
2*(1 + x)), -1/3*1/(1 + x)])/((m + n)*(1 - 7/(2*(1 + x)))^n*(1 + (3 + 3*x) 
^(-1))^m) + (3969*(4 + 3*x)^m*AppellF1[-m - n, -n, -m, 1 - m - n, 9/(2*(2 
+ x)), 2/(3*(2 + x))])/((m + n)*(1 - 9/(2*(2 + x)))^n*(1 - 2/(3*(2 + x)))^ 
m) + ((23/2)^m*(-5 + 2*x)*(49*AppellF1[1 + n, 2, -m, 2 + n, (5 - 2*x)/9, ( 
3*(5 - 2*x))/23] + 81*AppellF1[1 + n, 2, -m, 2 + n, (5 - 2*x)/7, (3*(5 - 2 
*x))/23]))/(1 + n)))/3969
 

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 203, normalized size of antiderivative = 0.89, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1289, 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 {(3 x+4)^m (5-2 x)^n}{\left (x^2+3 x+2\right )^2} \, dx\)

\(\Big \downarrow \) 1289

\(\displaystyle \int \left (\frac {4 (3 x+4)^m (5-2 x)^n}{-2 x-2}+\frac {4 (3 x+4)^m (5-2 x)^n}{(-2 x-2)^2}+\frac {4 (3 x+4)^m (5-2 x)^n}{2 x+4}+\frac {4 (3 x+4)^m (5-2 x)^n}{(2 x+4)^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\left (\frac {23}{3}\right )^n (3 x+4)^{m+1} \operatorname {AppellF1}\left (m+1,-n,1,m+2,\frac {2}{23} (3 x+4),\frac {1}{2} (-3 x-4)\right )}{m+1}+\frac {2 \left (\frac {23}{3}\right )^n (3 x+4)^{m+1} \operatorname {AppellF1}\left (m+1,-n,1,m+2,\frac {2}{23} (3 x+4),3 x+4\right )}{m+1}+\frac {3^{1-n} 23^n (3 x+4)^{m+1} \operatorname {AppellF1}\left (m+1,-n,2,m+2,\frac {2}{23} (3 x+4),\frac {1}{2} (-3 x-4)\right )}{4 (m+1)}+\frac {3^{1-n} 23^n (3 x+4)^{m+1} \operatorname {AppellF1}\left (m+1,-n,2,m+2,\frac {2}{23} (3 x+4),3 x+4\right )}{m+1}\)

Input:

Int[((5 - 2*x)^n*(4 + 3*x)^m)/(2 + 3*x + x^2)^2,x]
 

Output:

((23/3)^n*(4 + 3*x)^(1 + m)*AppellF1[1 + m, -n, 1, 2 + m, (2*(4 + 3*x))/23 
, (-4 - 3*x)/2])/(1 + m) + (2*(23/3)^n*(4 + 3*x)^(1 + m)*AppellF1[1 + m, - 
n, 1, 2 + m, (2*(4 + 3*x))/23, 4 + 3*x])/(1 + m) + (3^(1 - n)*23^n*(4 + 3* 
x)^(1 + m)*AppellF1[1 + m, -n, 2, 2 + m, (2*(4 + 3*x))/23, (-4 - 3*x)/2])/ 
(4*(1 + m)) + (3^(1 - n)*23^n*(4 + 3*x)^(1 + m)*AppellF1[1 + m, -n, 2, 2 + 
 m, (2*(4 + 3*x))/23, 4 + 3*x])/(1 + m)
 

Defintions of rubi rules used

rule 1289
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + 
 g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && ( 
IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0]))
 

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

\[\int \frac {\left (5-2 x \right )^{n} \left (3 x +4\right )^{m}}{\left (x^{2}+3 x +2\right )^{2}}d x\]

Input:

int((5-2*x)^n*(3*x+4)^m/(x^2+3*x+2)^2,x)
 

Output:

int((5-2*x)^n*(3*x+4)^m/(x^2+3*x+2)^2,x)
 

Fricas [F]

\[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int { \frac {{\left (3 \, x + 4\right )}^{m} {\left (-2 \, x + 5\right )}^{n}}{{\left (x^{2} + 3 \, x + 2\right )}^{2}} \,d x } \] Input:

integrate((5-2*x)^n*(4+3*x)^m/(x^2+3*x+2)^2,x, algorithm="fricas")
 

Output:

integral((3*x + 4)^m*(-2*x + 5)^n/(x^4 + 6*x^3 + 13*x^2 + 12*x + 4), x)
 

Sympy [F]

\[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int \frac {\left (5 - 2 x\right )^{n} \left (3 x + 4\right )^{m}}{\left (x + 1\right )^{2} \left (x + 2\right )^{2}}\, dx \] Input:

integrate((5-2*x)**n*(4+3*x)**m/(x**2+3*x+2)**2,x)
 

Output:

Integral((5 - 2*x)**n*(3*x + 4)**m/((x + 1)**2*(x + 2)**2), x)
 

Maxima [F]

\[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int { \frac {{\left (3 \, x + 4\right )}^{m} {\left (-2 \, x + 5\right )}^{n}}{{\left (x^{2} + 3 \, x + 2\right )}^{2}} \,d x } \] Input:

integrate((5-2*x)^n*(4+3*x)^m/(x^2+3*x+2)^2,x, algorithm="maxima")
 

Output:

integrate((3*x + 4)^m*(-2*x + 5)^n/(x^2 + 3*x + 2)^2, x)
 

Giac [F]

\[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int { \frac {{\left (3 \, x + 4\right )}^{m} {\left (-2 \, x + 5\right )}^{n}}{{\left (x^{2} + 3 \, x + 2\right )}^{2}} \,d x } \] Input:

integrate((5-2*x)^n*(4+3*x)^m/(x^2+3*x+2)^2,x, algorithm="giac")
 

Output:

integrate((3*x + 4)^m*(-2*x + 5)^n/(x^2 + 3*x + 2)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int \frac {{\left (5-2\,x\right )}^n\,{\left (3\,x+4\right )}^m}{{\left (x^2+3\,x+2\right )}^2} \,d x \] Input:

int(((5 - 2*x)^n*(3*x + 4)^m)/(3*x + x^2 + 2)^2,x)
 

Output:

int(((5 - 2*x)^n*(3*x + 4)^m)/(3*x + x^2 + 2)^2, x)
 

Reduce [F]

\[ \int \frac {(5-2 x)^n (4+3 x)^m}{\left (2+3 x+x^2\right )^2} \, dx=\int \frac {\left (3 x +4\right )^{m} \left (-2 x +5\right )^{n}}{x^{4}+6 x^{3}+13 x^{2}+12 x +4}d x \] Input:

int((5-2*x)^n*(4+3*x)^m/(x^2+3*x+2)^2,x)
 

Output:

int(((3*x + 4)**m*( - 2*x + 5)**n)/(x**4 + 6*x**3 + 13*x**2 + 12*x + 4),x)