\(\int (d+e x)^m (f+g x)^3 (a d e+(c d^2+a e^2) x+c d e x^2)^{-m} \, dx\) [112]

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

Optimal result

Integrand size = 44, antiderivative size = 260 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\frac {(c d f-a e g)^3 (d+e x)^{-1+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{1-m}}{c^4 d^4 (1-m)}+\frac {3 g (c d f-a e g)^2 (d+e x)^{-2+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{2-m}}{c^4 d^4 (2-m)}+\frac {3 g^2 (c d f-a e g) (d+e x)^{-3+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{3-m}}{c^4 d^4 (3-m)}+\frac {g^3 (d+e x)^{-4+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{4-m}}{c^4 d^4 (4-m)} \] Output:

(-a*e*g+c*d*f)^3*(e*x+d)^(-1+m)*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1-m)/c^ 
4/d^4/(1-m)+3*g*(-a*e*g+c*d*f)^2*(e*x+d)^(-2+m)*(a*d*e+(a*e^2+c*d^2)*x+c*d 
*e*x^2)^(2-m)/c^4/d^4/(2-m)+3*g^2*(-a*e*g+c*d*f)*(e*x+d)^(-3+m)*(a*d*e+(a* 
e^2+c*d^2)*x+c*d*e*x^2)^(3-m)/c^4/d^4/(3-m)+g^3*(e*x+d)^(-4+m)*(a*d*e+(a*e 
^2+c*d^2)*x+c*d*e*x^2)^(4-m)/c^4/d^4/(4-m)
 

Mathematica [A] (verified)

Time = 0.44 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.52 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\frac {(d+e x)^{-1+m} ((a e+c d x) (d+e x))^{1-m} \left (-\frac {(c d f-a e g)^3}{-1+m}-\frac {3 g (c d f-a e g)^2 (a e+c d x)}{-2+m}+\frac {3 g^2 (-c d f+a e g) (a e+c d x)^2}{-3+m}-\frac {g^3 (a e+c d x)^3}{-4+m}\right )}{c^4 d^4} \] Input:

Integrate[((d + e*x)^m*(f + g*x)^3)/(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2 
)^m,x]
 

Output:

((d + e*x)^(-1 + m)*((a*e + c*d*x)*(d + e*x))^(1 - m)*(-((c*d*f - a*e*g)^3 
/(-1 + m)) - (3*g*(c*d*f - a*e*g)^2*(a*e + c*d*x))/(-2 + m) + (3*g^2*(-(c* 
d*f) + a*e*g)*(a*e + c*d*x)^2)/(-3 + m) - (g^3*(a*e + c*d*x)^3)/(-4 + m))) 
/(c^4*d^4)
 

Rubi [A] (verified)

Time = 1.00 (sec) , antiderivative size = 324, normalized size of antiderivative = 1.25, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1253, 1253, 1221, 1122}

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

\(\Big \downarrow \) 1253

\(\displaystyle \frac {3 (c d f-a e g) \int (d+e x)^m (f+g x)^2 \left (c d e x^2+\left (c d^2+a e^2\right ) x+a d e\right )^{-m}dx}{c d (4-m)}+\frac {(f+g x)^3 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (4-m)}\)

\(\Big \downarrow \) 1253

\(\displaystyle \frac {3 (c d f-a e g) \left (\frac {2 (c d f-a e g) \int (d+e x)^m (f+g x) \left (c d e x^2+\left (c d^2+a e^2\right ) x+a d e\right )^{-m}dx}{c d (3-m)}+\frac {(f+g x)^2 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (3-m)}\right )}{c d (4-m)}+\frac {(f+g x)^3 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (4-m)}\)

\(\Big \downarrow \) 1221

\(\displaystyle \frac {3 (c d f-a e g) \left (\frac {2 (c d f-a e g) \left (\frac {g (d+e x)^m \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d e (2-m)}-\frac {\left (a e^2 g+c d (d g (1-m)-e f (2-m))\right ) \int (d+e x)^m \left (c d e x^2+\left (c d^2+a e^2\right ) x+a d e\right )^{-m}dx}{c d e (2-m)}\right )}{c d (3-m)}+\frac {(f+g x)^2 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (3-m)}\right )}{c d (4-m)}+\frac {(f+g x)^3 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (4-m)}\)

\(\Big \downarrow \) 1122

\(\displaystyle \frac {3 (c d f-a e g) \left (\frac {2 (c d f-a e g) \left (\frac {g (d+e x)^m \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d e (2-m)}-\frac {(d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m} \left (a e^2 g+c d (d g (1-m)-e f (2-m))\right )}{c^2 d^2 e (1-m) (2-m)}\right )}{c d (3-m)}+\frac {(f+g x)^2 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (3-m)}\right )}{c d (4-m)}+\frac {(f+g x)^3 (d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d (4-m)}\)

Input:

Int[((d + e*x)^m*(f + g*x)^3)/(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^m,x]
 

Output:

((d + e*x)^(-1 + m)*(f + g*x)^3*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 
 - m))/(c*d*(4 - m)) + (3*(c*d*f - a*e*g)*(((d + e*x)^(-1 + m)*(f + g*x)^2 
*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 - m))/(c*d*(3 - m)) + (2*(c*d* 
f - a*e*g)*(-(((a*e^2*g + c*d*(d*g*(1 - m) - e*f*(2 - m)))*(d + e*x)^(-1 + 
 m)*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 - m))/(c^2*d^2*e*(1 - m)*(2 
 - m))) + (g*(d + e*x)^m*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 - m))/ 
(c*d*e*(2 - m))))/(c*d*(3 - m))))/(c*d*(4 - m))
 

Defintions of rubi rules used

rule 1122
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[e*(d + e*x)^(m - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(p + 1))), 
 x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && 
EqQ[m + p, 0]
 

rule 1221
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1 
)/(c*(m + 2*p + 2))), x] + Simp[(m*(g*(c*d - b*e) + c*e*f) + e*(p + 1)*(2*c 
*f - b*g))/(c*e*(m + 2*p + 2))   Int[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x 
] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] 
 && NeQ[m + 2*p + 2, 0]
 

rule 1253
Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) 
+ (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-e)*(d + e*x)^(m - 1)*(f + g*x)^n* 
((a + b*x + c*x^2)^(p + 1)/(c*(m - n - 1))), x] - Simp[n*((c*e*f + c*d*g - 
b*e*g)/(c*e*(m - n - 1)))   Int[(d + e*x)^m*(f + g*x)^(n - 1)*(a + b*x + c* 
x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d* 
e + a*e^2, 0] && EqQ[m + p, 0] && GtQ[n, 0] && NeQ[m - n - 1, 0] && (Intege 
rQ[2*p] || IntegerQ[n])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(526\) vs. \(2(260)=520\).

Time = 10.31 (sec) , antiderivative size = 527, normalized size of antiderivative = 2.03

method result size
gosper \(-\frac {\left (e x +d \right )^{m} \left (c^{3} d^{3} g^{3} m^{3} x^{3}+3 c^{3} d^{3} f \,g^{2} m^{3} x^{2}-6 c^{3} d^{3} g^{3} m^{2} x^{3}+3 a \,c^{2} d^{2} e \,g^{3} m^{2} x^{2}+3 c^{3} d^{3} f^{2} g \,m^{3} x -21 c^{3} d^{3} f \,g^{2} m^{2} x^{2}+11 c^{3} d^{3} g^{3} m \,x^{3}+6 a \,c^{2} d^{2} e f \,g^{2} m^{2} x -9 a \,c^{2} d^{2} e \,g^{3} m \,x^{2}+c^{3} d^{3} f^{3} m^{3}-24 c^{3} d^{3} f^{2} g \,m^{2} x +42 c^{3} d^{3} f \,g^{2} m \,x^{2}-6 x^{3} g^{3} d^{3} c^{3}+6 a^{2} c d \,e^{2} g^{3} m x +3 a \,c^{2} d^{2} e \,f^{2} g \,m^{2}-30 a \,c^{2} d^{2} e f \,g^{2} m x +6 a \,c^{2} d^{2} e \,g^{3} x^{2}-9 c^{3} d^{3} f^{3} m^{2}+57 c^{3} d^{3} f^{2} g m x -24 c^{3} d^{3} f \,g^{2} x^{2}+6 a^{2} c d \,e^{2} f \,g^{2} m -6 a^{2} c d \,e^{2} g^{3} x -21 a \,c^{2} d^{2} e \,f^{2} g m +24 a \,c^{2} d^{2} e f \,g^{2} x +26 c^{3} d^{3} f^{3} m -36 c^{3} d^{3} f^{2} g x +6 a^{3} e^{3} g^{3}-24 a^{2} c d \,e^{2} f \,g^{2}+36 a \,c^{2} d^{2} e \,f^{2} g -24 f^{3} d^{3} c^{3}\right ) \left (c d x +a e \right ) \left (c d \,x^{2} e +a \,e^{2} x +c \,d^{2} x +a d e \right )^{-m}}{d^{4} c^{4} \left (m^{4}-10 m^{3}+35 m^{2}-50 m +24\right )}\) \(527\)
orering \(-\frac {\left (c^{3} d^{3} g^{3} m^{3} x^{3}+3 c^{3} d^{3} f \,g^{2} m^{3} x^{2}-6 c^{3} d^{3} g^{3} m^{2} x^{3}+3 a \,c^{2} d^{2} e \,g^{3} m^{2} x^{2}+3 c^{3} d^{3} f^{2} g \,m^{3} x -21 c^{3} d^{3} f \,g^{2} m^{2} x^{2}+11 c^{3} d^{3} g^{3} m \,x^{3}+6 a \,c^{2} d^{2} e f \,g^{2} m^{2} x -9 a \,c^{2} d^{2} e \,g^{3} m \,x^{2}+c^{3} d^{3} f^{3} m^{3}-24 c^{3} d^{3} f^{2} g \,m^{2} x +42 c^{3} d^{3} f \,g^{2} m \,x^{2}-6 x^{3} g^{3} d^{3} c^{3}+6 a^{2} c d \,e^{2} g^{3} m x +3 a \,c^{2} d^{2} e \,f^{2} g \,m^{2}-30 a \,c^{2} d^{2} e f \,g^{2} m x +6 a \,c^{2} d^{2} e \,g^{3} x^{2}-9 c^{3} d^{3} f^{3} m^{2}+57 c^{3} d^{3} f^{2} g m x -24 c^{3} d^{3} f \,g^{2} x^{2}+6 a^{2} c d \,e^{2} f \,g^{2} m -6 a^{2} c d \,e^{2} g^{3} x -21 a \,c^{2} d^{2} e \,f^{2} g m +24 a \,c^{2} d^{2} e f \,g^{2} x +26 c^{3} d^{3} f^{3} m -36 c^{3} d^{3} f^{2} g x +6 a^{3} e^{3} g^{3}-24 a^{2} c d \,e^{2} f \,g^{2}+36 a \,c^{2} d^{2} e \,f^{2} g -24 f^{3} d^{3} c^{3}\right ) \left (c d x +a e \right ) \left (e x +d \right )^{m} {\left (a d e +\left (a \,e^{2}+c \,d^{2}\right ) x +c d \,x^{2} e \right )}^{-m}}{d^{4} c^{4} \left (m^{4}-10 m^{3}+35 m^{2}-50 m +24\right )}\) \(528\)
risch \(-\frac {\left (c^{4} d^{4} g^{3} m^{3} x^{4}+a \,c^{3} d^{3} e \,g^{3} m^{3} x^{3}+3 c^{4} d^{4} f \,g^{2} m^{3} x^{3}-6 c^{4} d^{4} g^{3} m^{2} x^{4}+3 a \,c^{3} d^{3} e f \,g^{2} m^{3} x^{2}-3 a \,c^{3} d^{3} e \,g^{3} m^{2} x^{3}+3 c^{4} d^{4} f^{2} g \,m^{3} x^{2}-21 c^{4} d^{4} f \,g^{2} m^{2} x^{3}+11 c^{4} d^{4} g^{3} m \,x^{4}+3 a^{2} c^{2} d^{2} e^{2} g^{3} m^{2} x^{2}+3 a \,c^{3} d^{3} e \,f^{2} g \,m^{3} x -15 a \,c^{3} d^{3} e f \,g^{2} m^{2} x^{2}+2 a \,c^{3} d^{3} e \,g^{3} m \,x^{3}+c^{4} d^{4} f^{3} m^{3} x -24 c^{4} d^{4} f^{2} g \,m^{2} x^{2}+42 c^{4} d^{4} f \,g^{2} m \,x^{3}-6 g^{3} x^{4} c^{4} d^{4}+6 a^{2} c^{2} d^{2} e^{2} f \,g^{2} m^{2} x -3 a^{2} c^{2} d^{2} e^{2} g^{3} m \,x^{2}+a \,c^{3} d^{3} e \,f^{3} m^{3}-21 a \,c^{3} d^{3} e \,f^{2} g \,m^{2} x +12 a \,c^{3} d^{3} e f \,g^{2} m \,x^{2}-9 c^{4} d^{4} f^{3} m^{2} x +57 c^{4} d^{4} f^{2} g m \,x^{2}-24 c^{4} d^{4} f \,g^{2} x^{3}+6 a^{3} c d \,e^{3} g^{3} m x +3 a^{2} c^{2} d^{2} e^{2} f^{2} g \,m^{2}-24 a^{2} c^{2} d^{2} e^{2} f \,g^{2} m x -9 a \,c^{3} d^{3} e \,f^{3} m^{2}+36 a \,c^{3} d^{3} e \,f^{2} g m x +26 c^{4} d^{4} f^{3} m x -36 c^{4} d^{4} f^{2} g \,x^{2}+6 a^{3} c d \,e^{3} f \,g^{2} m -21 a^{2} c^{2} d^{2} e^{2} f^{2} g m +26 a \,c^{3} d^{3} e \,f^{3} m -24 c^{4} d^{4} f^{3} x +6 g^{3} a^{4} e^{4}-24 a^{3} c d \,e^{3} f \,g^{2}+36 a^{2} c^{2} d^{2} e^{2} f^{2} g -24 a \,c^{3} d^{3} e \,f^{3}\right ) \left (c d x +a e \right )^{-m} {\mathrm e}^{\frac {i \pi \,\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right ) m \left (-\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right )+\operatorname {csgn}\left (i \left (c d x +a e \right )\right )\right ) \left (-\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right )+\operatorname {csgn}\left (i \left (e x +d \right )\right )\right )}{2}}}{\left (-3+m \right ) \left (-4+m \right ) \left (-2+m \right ) \left (m -1\right ) d^{4} c^{4}}\) \(797\)
parallelrisch \(\text {Expression too large to display}\) \(1091\)

Input:

int((e*x+d)^m*(g*x+f)^3/((a*d*e+(a*e^2+c*d^2)*x+c*d*x^2*e)^m),x,method=_RE 
TURNVERBOSE)
 

Output:

-(e*x+d)^m*(c^3*d^3*g^3*m^3*x^3+3*c^3*d^3*f*g^2*m^3*x^2-6*c^3*d^3*g^3*m^2* 
x^3+3*a*c^2*d^2*e*g^3*m^2*x^2+3*c^3*d^3*f^2*g*m^3*x-21*c^3*d^3*f*g^2*m^2*x 
^2+11*c^3*d^3*g^3*m*x^3+6*a*c^2*d^2*e*f*g^2*m^2*x-9*a*c^2*d^2*e*g^3*m*x^2+ 
c^3*d^3*f^3*m^3-24*c^3*d^3*f^2*g*m^2*x+42*c^3*d^3*f*g^2*m*x^2-6*c^3*d^3*g^ 
3*x^3+6*a^2*c*d*e^2*g^3*m*x+3*a*c^2*d^2*e*f^2*g*m^2-30*a*c^2*d^2*e*f*g^2*m 
*x+6*a*c^2*d^2*e*g^3*x^2-9*c^3*d^3*f^3*m^2+57*c^3*d^3*f^2*g*m*x-24*c^3*d^3 
*f*g^2*x^2+6*a^2*c*d*e^2*f*g^2*m-6*a^2*c*d*e^2*g^3*x-21*a*c^2*d^2*e*f^2*g* 
m+24*a*c^2*d^2*e*f*g^2*x+26*c^3*d^3*f^3*m-36*c^3*d^3*f^2*g*x+6*a^3*e^3*g^3 
-24*a^2*c*d*e^2*f*g^2+36*a*c^2*d^2*e*f^2*g-24*c^3*d^3*f^3)*(c*d*x+a*e)/((c 
*d*e*x^2+a*e^2*x+c*d^2*x+a*d*e)^m)/d^4/c^4/(m^4-10*m^3+35*m^2-50*m+24)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 705 vs. \(2 (254) = 508\).

Time = 0.11 (sec) , antiderivative size = 705, normalized size of antiderivative = 2.71 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {{\left (a c^{3} d^{3} e f^{3} m^{3} - 24 \, a c^{3} d^{3} e f^{3} + 36 \, a^{2} c^{2} d^{2} e^{2} f^{2} g - 24 \, a^{3} c d e^{3} f g^{2} + 6 \, a^{4} e^{4} g^{3} + {\left (c^{4} d^{4} g^{3} m^{3} - 6 \, c^{4} d^{4} g^{3} m^{2} + 11 \, c^{4} d^{4} g^{3} m - 6 \, c^{4} d^{4} g^{3}\right )} x^{4} - {\left (24 \, c^{4} d^{4} f g^{2} - {\left (3 \, c^{4} d^{4} f g^{2} + a c^{3} d^{3} e g^{3}\right )} m^{3} + 3 \, {\left (7 \, c^{4} d^{4} f g^{2} + a c^{3} d^{3} e g^{3}\right )} m^{2} - 2 \, {\left (21 \, c^{4} d^{4} f g^{2} + a c^{3} d^{3} e g^{3}\right )} m\right )} x^{3} - 3 \, {\left (3 \, a c^{3} d^{3} e f^{3} - a^{2} c^{2} d^{2} e^{2} f^{2} g\right )} m^{2} - 3 \, {\left (12 \, c^{4} d^{4} f^{2} g - {\left (c^{4} d^{4} f^{2} g + a c^{3} d^{3} e f g^{2}\right )} m^{3} + {\left (8 \, c^{4} d^{4} f^{2} g + 5 \, a c^{3} d^{3} e f g^{2} - a^{2} c^{2} d^{2} e^{2} g^{3}\right )} m^{2} - {\left (19 \, c^{4} d^{4} f^{2} g + 4 \, a c^{3} d^{3} e f g^{2} - a^{2} c^{2} d^{2} e^{2} g^{3}\right )} m\right )} x^{2} + {\left (26 \, a c^{3} d^{3} e f^{3} - 21 \, a^{2} c^{2} d^{2} e^{2} f^{2} g + 6 \, a^{3} c d e^{3} f g^{2}\right )} m - {\left (24 \, c^{4} d^{4} f^{3} - {\left (c^{4} d^{4} f^{3} + 3 \, a c^{3} d^{3} e f^{2} g\right )} m^{3} + 3 \, {\left (3 \, c^{4} d^{4} f^{3} + 7 \, a c^{3} d^{3} e f^{2} g - 2 \, a^{2} c^{2} d^{2} e^{2} f g^{2}\right )} m^{2} - 2 \, {\left (13 \, c^{4} d^{4} f^{3} + 18 \, a c^{3} d^{3} e f^{2} g - 12 \, a^{2} c^{2} d^{2} e^{2} f g^{2} + 3 \, a^{3} c d e^{3} g^{3}\right )} m\right )} x\right )} {\left (e x + d\right )}^{m}}{{\left (c^{4} d^{4} m^{4} - 10 \, c^{4} d^{4} m^{3} + 35 \, c^{4} d^{4} m^{2} - 50 \, c^{4} d^{4} m + 24 \, c^{4} d^{4}\right )} {\left (c d e x^{2} + a d e + {\left (c d^{2} + a e^{2}\right )} x\right )}^{m}} \] Input:

integrate((e*x+d)^m*(g*x+f)^3/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, alg 
orithm="fricas")
 

Output:

-(a*c^3*d^3*e*f^3*m^3 - 24*a*c^3*d^3*e*f^3 + 36*a^2*c^2*d^2*e^2*f^2*g - 24 
*a^3*c*d*e^3*f*g^2 + 6*a^4*e^4*g^3 + (c^4*d^4*g^3*m^3 - 6*c^4*d^4*g^3*m^2 
+ 11*c^4*d^4*g^3*m - 6*c^4*d^4*g^3)*x^4 - (24*c^4*d^4*f*g^2 - (3*c^4*d^4*f 
*g^2 + a*c^3*d^3*e*g^3)*m^3 + 3*(7*c^4*d^4*f*g^2 + a*c^3*d^3*e*g^3)*m^2 - 
2*(21*c^4*d^4*f*g^2 + a*c^3*d^3*e*g^3)*m)*x^3 - 3*(3*a*c^3*d^3*e*f^3 - a^2 
*c^2*d^2*e^2*f^2*g)*m^2 - 3*(12*c^4*d^4*f^2*g - (c^4*d^4*f^2*g + a*c^3*d^3 
*e*f*g^2)*m^3 + (8*c^4*d^4*f^2*g + 5*a*c^3*d^3*e*f*g^2 - a^2*c^2*d^2*e^2*g 
^3)*m^2 - (19*c^4*d^4*f^2*g + 4*a*c^3*d^3*e*f*g^2 - a^2*c^2*d^2*e^2*g^3)*m 
)*x^2 + (26*a*c^3*d^3*e*f^3 - 21*a^2*c^2*d^2*e^2*f^2*g + 6*a^3*c*d*e^3*f*g 
^2)*m - (24*c^4*d^4*f^3 - (c^4*d^4*f^3 + 3*a*c^3*d^3*e*f^2*g)*m^3 + 3*(3*c 
^4*d^4*f^3 + 7*a*c^3*d^3*e*f^2*g - 2*a^2*c^2*d^2*e^2*f*g^2)*m^2 - 2*(13*c^ 
4*d^4*f^3 + 18*a*c^3*d^3*e*f^2*g - 12*a^2*c^2*d^2*e^2*f*g^2 + 3*a^3*c*d*e^ 
3*g^3)*m)*x)*(e*x + d)^m/((c^4*d^4*m^4 - 10*c^4*d^4*m^3 + 35*c^4*d^4*m^2 - 
 50*c^4*d^4*m + 24*c^4*d^4)*(c*d*e*x^2 + a*d*e + (c*d^2 + a*e^2)*x)^m)
 

Sympy [F(-1)]

Timed out. \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\text {Timed out} \] Input:

integrate((e*x+d)**m*(g*x+f)**3/((a*d*e+(a*e**2+c*d**2)*x+c*d*e*x**2)**m), 
x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 331, normalized size of antiderivative = 1.27 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {{\left (c d x + a e\right )} f^{3}}{{\left (c d x + a e\right )}^{m} c d {\left (m - 1\right )}} - \frac {3 \, {\left (c^{2} d^{2} {\left (m - 1\right )} x^{2} + a c d e m x + a^{2} e^{2}\right )} f^{2} g}{{\left (m^{2} - 3 \, m + 2\right )} {\left (c d x + a e\right )}^{m} c^{2} d^{2}} - \frac {3 \, {\left ({\left (m^{2} - 3 \, m + 2\right )} c^{3} d^{3} x^{3} + {\left (m^{2} - m\right )} a c^{2} d^{2} e x^{2} + 2 \, a^{2} c d e^{2} m x + 2 \, a^{3} e^{3}\right )} f g^{2}}{{\left (m^{3} - 6 \, m^{2} + 11 \, m - 6\right )} {\left (c d x + a e\right )}^{m} c^{3} d^{3}} - \frac {{\left ({\left (m^{3} - 6 \, m^{2} + 11 \, m - 6\right )} c^{4} d^{4} x^{4} + {\left (m^{3} - 3 \, m^{2} + 2 \, m\right )} a c^{3} d^{3} e x^{3} + 3 \, {\left (m^{2} - m\right )} a^{2} c^{2} d^{2} e^{2} x^{2} + 6 \, a^{3} c d e^{3} m x + 6 \, a^{4} e^{4}\right )} g^{3}}{{\left (m^{4} - 10 \, m^{3} + 35 \, m^{2} - 50 \, m + 24\right )} {\left (c d x + a e\right )}^{m} c^{4} d^{4}} \] Input:

integrate((e*x+d)^m*(g*x+f)^3/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, alg 
orithm="maxima")
 

Output:

-(c*d*x + a*e)*f^3/((c*d*x + a*e)^m*c*d*(m - 1)) - 3*(c^2*d^2*(m - 1)*x^2 
+ a*c*d*e*m*x + a^2*e^2)*f^2*g/((m^2 - 3*m + 2)*(c*d*x + a*e)^m*c^2*d^2) - 
 3*((m^2 - 3*m + 2)*c^3*d^3*x^3 + (m^2 - m)*a*c^2*d^2*e*x^2 + 2*a^2*c*d*e^ 
2*m*x + 2*a^3*e^3)*f*g^2/((m^3 - 6*m^2 + 11*m - 6)*(c*d*x + a*e)^m*c^3*d^3 
) - ((m^3 - 6*m^2 + 11*m - 6)*c^4*d^4*x^4 + (m^3 - 3*m^2 + 2*m)*a*c^3*d^3* 
e*x^3 + 3*(m^2 - m)*a^2*c^2*d^2*e^2*x^2 + 6*a^3*c*d*e^3*m*x + 6*a^4*e^4)*g 
^3/((m^4 - 10*m^3 + 35*m^2 - 50*m + 24)*(c*d*x + a*e)^m*c^4*d^4)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1926 vs. \(2 (254) = 508\).

Time = 0.21 (sec) , antiderivative size = 1926, normalized size of antiderivative = 7.41 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\text {Too large to display} \] Input:

integrate((e*x+d)^m*(g*x+f)^3/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, alg 
orithm="giac")
 

Output:

-((e*x + d)^m*c^4*d^4*g^3*m^3*x^4*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) 
 + 3*(e*x + d)^m*c^4*d^4*f*g^2*m^3*x^3*e^(-m*log(c*d*x + a*e) - m*log(e*x 
+ d)) + (e*x + d)^m*a*c^3*d^3*e*g^3*m^3*x^3*e^(-m*log(c*d*x + a*e) - m*log 
(e*x + d)) - 6*(e*x + d)^m*c^4*d^4*g^3*m^2*x^4*e^(-m*log(c*d*x + a*e) - m* 
log(e*x + d)) + 3*(e*x + d)^m*c^4*d^4*f^2*g*m^3*x^2*e^(-m*log(c*d*x + a*e) 
 - m*log(e*x + d)) + 3*(e*x + d)^m*a*c^3*d^3*e*f*g^2*m^3*x^2*e^(-m*log(c*d 
*x + a*e) - m*log(e*x + d)) - 21*(e*x + d)^m*c^4*d^4*f*g^2*m^2*x^3*e^(-m*l 
og(c*d*x + a*e) - m*log(e*x + d)) - 3*(e*x + d)^m*a*c^3*d^3*e*g^3*m^2*x^3* 
e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + 11*(e*x + d)^m*c^4*d^4*g^3*m*x^ 
4*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + (e*x + d)^m*c^4*d^4*f^3*m^3*x 
*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + 3*(e*x + d)^m*a*c^3*d^3*e*f^2* 
g*m^3*x*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) - 24*(e*x + d)^m*c^4*d^4* 
f^2*g*m^2*x^2*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) - 15*(e*x + d)^m*a* 
c^3*d^3*e*f*g^2*m^2*x^2*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + 3*(e*x 
+ d)^m*a^2*c^2*d^2*e^2*g^3*m^2*x^2*e^(-m*log(c*d*x + a*e) - m*log(e*x + d) 
) + 42*(e*x + d)^m*c^4*d^4*f*g^2*m*x^3*e^(-m*log(c*d*x + a*e) - m*log(e*x 
+ d)) + 2*(e*x + d)^m*a*c^3*d^3*e*g^3*m*x^3*e^(-m*log(c*d*x + a*e) - m*log 
(e*x + d)) - 6*(e*x + d)^m*c^4*d^4*g^3*x^4*e^(-m*log(c*d*x + a*e) - m*log( 
e*x + d)) + (e*x + d)^m*a*c^3*d^3*e*f^3*m^3*e^(-m*log(c*d*x + a*e) - m*log 
(e*x + d)) - 9*(e*x + d)^m*c^4*d^4*f^3*m^2*x*e^(-m*log(c*d*x + a*e) - m...
 

Mupad [B] (verification not implemented)

Time = 6.36 (sec) , antiderivative size = 615, normalized size of antiderivative = 2.37 \[ \int (d+e x)^m (f+g x)^3 \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {\frac {g^3\,x^4\,{\left (d+e\,x\right )}^m\,\left (m^3-6\,m^2+11\,m-6\right )}{m^4-10\,m^3+35\,m^2-50\,m+24}+\frac {x\,{\left (d+e\,x\right )}^m\,\left (6\,a^3\,c\,d\,e^3\,g^3\,m+6\,a^2\,c^2\,d^2\,e^2\,f\,g^2\,m^2-24\,a^2\,c^2\,d^2\,e^2\,f\,g^2\,m+3\,a\,c^3\,d^3\,e\,f^2\,g\,m^3-21\,a\,c^3\,d^3\,e\,f^2\,g\,m^2+36\,a\,c^3\,d^3\,e\,f^2\,g\,m+c^4\,d^4\,f^3\,m^3-9\,c^4\,d^4\,f^3\,m^2+26\,c^4\,d^4\,f^3\,m-24\,c^4\,d^4\,f^3\right )}{c^4\,d^4\,\left (m^4-10\,m^3+35\,m^2-50\,m+24\right )}+\frac {a\,e\,{\left (d+e\,x\right )}^m\,\left (6\,a^3\,e^3\,g^3+6\,a^2\,c\,d\,e^2\,f\,g^2\,m-24\,a^2\,c\,d\,e^2\,f\,g^2+3\,a\,c^2\,d^2\,e\,f^2\,g\,m^2-21\,a\,c^2\,d^2\,e\,f^2\,g\,m+36\,a\,c^2\,d^2\,e\,f^2\,g+c^3\,d^3\,f^3\,m^3-9\,c^3\,d^3\,f^3\,m^2+26\,c^3\,d^3\,f^3\,m-24\,c^3\,d^3\,f^3\right )}{c^4\,d^4\,\left (m^4-10\,m^3+35\,m^2-50\,m+24\right )}+\frac {3\,g\,x^2\,\left (m-1\right )\,{\left (d+e\,x\right )}^m\,\left (a^2\,e^2\,g^2\,m+a\,c\,d\,e\,f\,g\,m^2-4\,a\,c\,d\,e\,f\,g\,m+c^2\,d^2\,f^2\,m^2-7\,c^2\,d^2\,f^2\,m+12\,c^2\,d^2\,f^2\right )}{c^2\,d^2\,\left (m^4-10\,m^3+35\,m^2-50\,m+24\right )}+\frac {g^2\,x^3\,{\left (d+e\,x\right )}^m\,\left (a\,e\,g\,m-12\,c\,d\,f+3\,c\,d\,f\,m\right )\,\left (m^2-3\,m+2\right )}{c\,d\,\left (m^4-10\,m^3+35\,m^2-50\,m+24\right )}}{{\left (c\,d\,e\,x^2+\left (c\,d^2+a\,e^2\right )\,x+a\,d\,e\right )}^m} \] Input:

int(((f + g*x)^3*(d + e*x)^m)/(x*(a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^m,x)
 

Output:

-((g^3*x^4*(d + e*x)^m*(11*m - 6*m^2 + m^3 - 6))/(35*m^2 - 50*m - 10*m^3 + 
 m^4 + 24) + (x*(d + e*x)^m*(26*c^4*d^4*f^3*m - 24*c^4*d^4*f^3 - 9*c^4*d^4 
*f^3*m^2 + c^4*d^4*f^3*m^3 + 6*a^3*c*d*e^3*g^3*m - 24*a^2*c^2*d^2*e^2*f*g^ 
2*m + 36*a*c^3*d^3*e*f^2*g*m + 6*a^2*c^2*d^2*e^2*f*g^2*m^2 - 21*a*c^3*d^3* 
e*f^2*g*m^2 + 3*a*c^3*d^3*e*f^2*g*m^3))/(c^4*d^4*(35*m^2 - 50*m - 10*m^3 + 
 m^4 + 24)) + (a*e*(d + e*x)^m*(6*a^3*e^3*g^3 - 24*c^3*d^3*f^3 + 26*c^3*d^ 
3*f^3*m - 9*c^3*d^3*f^3*m^2 + c^3*d^3*f^3*m^3 + 36*a*c^2*d^2*e*f^2*g - 24* 
a^2*c*d*e^2*f*g^2 - 21*a*c^2*d^2*e*f^2*g*m + 6*a^2*c*d*e^2*f*g^2*m + 3*a*c 
^2*d^2*e*f^2*g*m^2))/(c^4*d^4*(35*m^2 - 50*m - 10*m^3 + m^4 + 24)) + (3*g* 
x^2*(m - 1)*(d + e*x)^m*(12*c^2*d^2*f^2 + a^2*e^2*g^2*m - 7*c^2*d^2*f^2*m 
+ c^2*d^2*f^2*m^2 - 4*a*c*d*e*f*g*m + a*c*d*e*f*g*m^2))/(c^2*d^2*(35*m^2 - 
 50*m - 10*m^3 + m^4 + 24)) + (g^2*x^3*(d + e*x)^m*(a*e*g*m - 12*c*d*f + 3 
*c*d*f*m)*(m^2 - 3*m + 2))/(c*d*(35*m^2 - 50*m - 10*m^3 + m^4 + 24)))/(x*( 
a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^m
 

Reduce [F]

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

int((e*x+d)^m*(g*x+f)^3/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x)
 

Output:

int((d + e*x)**m/(a*d*e + a*e**2*x + c*d**2*x + c*d*e*x**2)**m,x)*f**3 + i 
nt(((d + e*x)**m*x**3)/(a*d*e + a*e**2*x + c*d**2*x + c*d*e*x**2)**m,x)*g* 
*3 + 3*int(((d + e*x)**m*x**2)/(a*d*e + a*e**2*x + c*d**2*x + c*d*e*x**2)* 
*m,x)*f*g**2 + 3*int(((d + e*x)**m*x)/(a*d*e + a*e**2*x + c*d**2*x + c*d*e 
*x**2)**m,x)*f**2*g