\(\int (d+e x)^{-3-2 p} (f+g x) (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2)^p \, dx\) [257]

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

Optimal result

Integrand size = 60, antiderivative size = 64 \[ \int (d+e x)^{-3-2 p} (f+g x) \left (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2\right )^p \, dx=-\frac {(d+e x)^{-3-2 p} \left (d (e f+d g (1+p))+e (e f+d g (3+2 p)) x+e^2 g (2+p) x^2\right )^{1+p}}{e^2 (2+p)} \] Output:

-(e*x+d)^(-3-2*p)*(d*(e*f+d*g*(p+1))+e*(e*f+d*g*(3+2*p))*x+e^2*g*(2+p)*x^2 
)^(p+1)/e^2/(2+p)
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.75 \[ \int (d+e x)^{-3-2 p} (f+g x) \left (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2\right )^p \, dx=-\frac {(d+e x)^{-3-2 p} ((d+e x) (d g (1+p)+e (f+g (2+p) x)))^{1+p}}{e^2 (2+p)} \] Input:

Integrate[(d + e*x)^(-3 - 2*p)*(f + g*x)*(d*(e*f + d*g + d*g*p) + e*(e*f + 
 3*d*g + 2*d*g*p)*x + e^2*g*(2 + p)*x^2)^p,x]
 

Output:

-(((d + e*x)^(-3 - 2*p)*((d + e*x)*(d*g*(1 + p) + e*(f + g*(2 + p)*x)))^(1 
 + p))/(e^2*(2 + p)))
 

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.017, Rules used = {1217}

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

\(\Big \downarrow \) 1217

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

Input:

Int[(d + e*x)^(-3 - 2*p)*(f + g*x)*(d*(e*f + d*g + d*g*p) + e*(e*f + 3*d*g 
 + 2*d*g*p)*x + e^2*g*(2 + p)*x^2)^p,x]
 

Output:

-(((d + e*x)^(-3 - 2*p)*(d*(e*f + d*g*(1 + p)) + e*(e*f + d*g*(3 + 2*p))*x 
 + e^2*g*(2 + p)*x^2)^(1 + p))/(e^2*(2 + p)))
 

Defintions of rubi rules used

rule 1217
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] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c* 
d^2 - b*d*e + a*e^2, 0] && EqQ[c*e*f*(m + 2*p + 2) + g*(c*d*m - b*e*(m + p 
+ 1)), 0]
 
Maple [A] (verified)

Time = 5.49 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.42

method result size
orering \(-\frac {\left (e x +d \right ) \left (e g x p +d g p +2 e g x +d g +e f \right ) \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p}}{e^{2} \left (2+p \right )}\) \(91\)
gosper \(-\frac {\left (e x +d \right )^{-2 p -2} \left (e g x p +d g p +2 e g x +d g +e f \right ) \left (e^{2} g \,x^{2} p +2 d e g p x +2 e^{2} g \,x^{2}+d^{2} g p +3 d e g x +e^{2} f x +d^{2} g +d e f \right )^{p}}{e^{2} \left (2+p \right )}\) \(98\)
risch \(-\frac {\left (e x +d \right )^{-3-2 p} \left (e^{2} g \,x^{2} p +2 d e g p x +2 e^{2} g \,x^{2}+d^{2} g p +3 d e g x +e^{2} f x +d^{2} g +d e f \right ) \left (d g \left (p +1\right )+\left (f +\left (x p +2 x \right ) g \right ) e \right )^{p} \left (e x +d \right )^{p} {\mathrm e}^{-\frac {i \operatorname {csgn}\left (i \left (d g \left (p +1\right )+\left (f +\left (x p +2 x \right ) g \right ) e \right ) \left (e x +d \right )\right ) \pi p \left (-\operatorname {csgn}\left (i \left (d g \left (p +1\right )+\left (f +\left (x p +2 x \right ) g \right ) e \right ) \left (e x +d \right )\right )+\operatorname {csgn}\left (i \left (e x +d \right )\right )\right ) \left (-\operatorname {csgn}\left (i \left (d g \left (p +1\right )+\left (f +\left (x p +2 x \right ) g \right ) e \right ) \left (e x +d \right )\right )+\operatorname {csgn}\left (i \left (d g \left (p +1\right )+\left (f +\left (x p +2 x \right ) g \right ) e \right )\right )\right )}{2}}}{e^{2} \left (2+p \right )}\) \(236\)
parallelrisch \(-\frac {x^{2} \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} e^{2} g^{2} p +2 x^{2} \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} e^{2} g^{2}+2 x \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} d e \,g^{2} p +3 x \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} d e \,g^{2}+x \left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} e^{2} f g +\left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} d^{2} g^{2} p +\left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} d^{2} g^{2}+\left (e x +d \right )^{-3-2 p} \left (d \left (d g p +d g +e f \right )+e \left (2 d g p +3 d g +e f \right ) x +e^{2} g \left (2+p \right ) x^{2}\right )^{p} d e f g}{e^{2} g \left (2+p \right )}\) \(513\)

Input:

int((e*x+d)^(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f)*x+e^ 
2*g*(2+p)*x^2)^p,x,method=_RETURNVERBOSE)
 

Output:

-(e*x+d)*(e*g*p*x+d*g*p+2*e*g*x+d*g+e*f)/e^2/(2+p)*(e*x+d)^(-3-2*p)*(d*(d* 
g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f)*x+e^2*g*(2+p)*x^2)^p
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (64) = 128\).

Time = 0.09 (sec) , antiderivative size = 132, normalized size of antiderivative = 2.06 \[ \int (d+e x)^{-3-2 p} (f+g x) \left (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2\right )^p \, dx=-\frac {{\left (d^{2} g p + d e f + d^{2} g + {\left (e^{2} g p + 2 \, e^{2} g\right )} x^{2} + {\left (2 \, d e g p + e^{2} f + 3 \, d e g\right )} x\right )} {\left (d^{2} g p + d e f + d^{2} g + {\left (e^{2} g p + 2 \, e^{2} g\right )} x^{2} + {\left (2 \, d e g p + e^{2} f + 3 \, d e g\right )} x\right )}^{p} {\left (e x + d\right )}^{-2 \, p - 3}}{e^{2} p + 2 \, e^{2}} \] Input:

integrate((e*x+d)^(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f 
)*x+e^2*g*(2+p)*x^2)^p,x, algorithm="fricas")
 

Output:

-(d^2*g*p + d*e*f + d^2*g + (e^2*g*p + 2*e^2*g)*x^2 + (2*d*e*g*p + e^2*f + 
 3*d*e*g)*x)*(d^2*g*p + d*e*f + d^2*g + (e^2*g*p + 2*e^2*g)*x^2 + (2*d*e*g 
*p + e^2*f + 3*d*e*g)*x)^p*(e*x + d)^(-2*p - 3)/(e^2*p + 2*e^2)
 

Sympy [F(-1)]

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

integrate((e*x+d)**(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e* 
f)*x+e**2*g*(2+p)*x**2)**p,x)
 

Output:

Timed out
 

Maxima [F]

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

integrate((e*x+d)^(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f 
)*x+e^2*g*(2+p)*x^2)^p,x, algorithm="maxima")
 

Output:

integrate((g*x + f)*(e^2*g*(p + 2)*x^2 + (2*d*g*p + e*f + 3*d*g)*e*x + (d* 
g*p + e*f + d*g)*d)^p*(e*x + d)^(-2*p - 3), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 412 vs. \(2 (64) = 128\).

Time = 0.37 (sec) , antiderivative size = 412, normalized size of antiderivative = 6.44 \[ \int (d+e x)^{-3-2 p} (f+g x) \left (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2\right )^p \, dx=-\frac {e^{2} g p x^{2} e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + 2 \, d e g p x e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + 2 \, e^{2} g x^{2} e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + d^{2} g p e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + e^{2} f x e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + 3 \, d e g x e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + d e f e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )} + d^{2} g e^{\left (p \log \left (e g p x + d g p + 2 \, e g x + e f + d g\right ) - p \log \left (e x + d\right ) - 3 \, \log \left (e x + d\right )\right )}}{e^{2} p + 2 \, e^{2}} \] Input:

integrate((e*x+d)^(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f 
)*x+e^2*g*(2+p)*x^2)^p,x, algorithm="giac")
 

Output:

-(e^2*g*p*x^2*e^(p*log(e*g*p*x + d*g*p + 2*e*g*x + e*f + d*g) - p*log(e*x 
+ d) - 3*log(e*x + d)) + 2*d*e*g*p*x*e^(p*log(e*g*p*x + d*g*p + 2*e*g*x + 
e*f + d*g) - p*log(e*x + d) - 3*log(e*x + d)) + 2*e^2*g*x^2*e^(p*log(e*g*p 
*x + d*g*p + 2*e*g*x + e*f + d*g) - p*log(e*x + d) - 3*log(e*x + d)) + d^2 
*g*p*e^(p*log(e*g*p*x + d*g*p + 2*e*g*x + e*f + d*g) - p*log(e*x + d) - 3* 
log(e*x + d)) + e^2*f*x*e^(p*log(e*g*p*x + d*g*p + 2*e*g*x + e*f + d*g) - 
p*log(e*x + d) - 3*log(e*x + d)) + 3*d*e*g*x*e^(p*log(e*g*p*x + d*g*p + 2* 
e*g*x + e*f + d*g) - p*log(e*x + d) - 3*log(e*x + d)) + d*e*f*e^(p*log(e*g 
*p*x + d*g*p + 2*e*g*x + e*f + d*g) - p*log(e*x + d) - 3*log(e*x + d)) + d 
^2*g*e^(p*log(e*g*p*x + d*g*p + 2*e*g*x + e*f + d*g) - p*log(e*x + d) - 3* 
log(e*x + d)))/(e^2*p + 2*e^2)
                                                                                    
                                                                                    
 

Mupad [B] (verification not implemented)

Time = 11.06 (sec) , antiderivative size = 138, normalized size of antiderivative = 2.16 \[ \int (d+e x)^{-3-2 p} (f+g x) \left (d (e f+d g+d g p)+e (e f+3 d g+2 d g p) x+e^2 g (2+p) x^2\right )^p \, dx=-{\left (d\,\left (d\,g+e\,f+d\,g\,p\right )+e\,x\,\left (3\,d\,g+e\,f+2\,d\,g\,p\right )+e^2\,g\,x^2\,\left (p+2\right )\right )}^p\,\left (\frac {g\,x^2}{{\left (d+e\,x\right )}^{2\,p+3}}+\frac {d^2\,g+d\,e\,f+d^2\,g\,p}{e^2\,\left (p+2\right )\,{\left (d+e\,x\right )}^{2\,p+3}}+\frac {x\,\left (3\,d\,g+e\,f+2\,d\,g\,p\right )}{e\,\left (p+2\right )\,{\left (d+e\,x\right )}^{2\,p+3}}\right ) \] Input:

int(((f + g*x)*(d*(d*g + e*f + d*g*p) + e*x*(3*d*g + e*f + 2*d*g*p) + e^2* 
g*x^2*(p + 2))^p)/(d + e*x)^(2*p + 3),x)
 

Output:

-(d*(d*g + e*f + d*g*p) + e*x*(3*d*g + e*f + 2*d*g*p) + e^2*g*x^2*(p + 2)) 
^p*((g*x^2)/(d + e*x)^(2*p + 3) + (d^2*g + d*e*f + d^2*g*p)/(e^2*(p + 2)*( 
d + e*x)^(2*p + 3)) + (x*(3*d*g + e*f + 2*d*g*p))/(e*(p + 2)*(d + e*x)^(2* 
p + 3)))
 

Reduce [F]

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

int((e*x+d)^(-3-2*p)*(g*x+f)*(d*(d*g*p+d*g+e*f)+e*(2*d*g*p+3*d*g+e*f)*x+e^ 
2*g*(2+p)*x^2)^p,x)
 

Output:

int((d**2*g*p + d**2*g + d*e*f + 2*d*e*g*p*x + 3*d*e*g*x + e**2*f*x + e**2 
*g*p*x**2 + 2*e**2*g*x**2)**p/((d + e*x)**(2*p)*d**3 + 3*(d + e*x)**(2*p)* 
d**2*e*x + 3*(d + e*x)**(2*p)*d*e**2*x**2 + (d + e*x)**(2*p)*e**3*x**3),x) 
*f + int(((d**2*g*p + d**2*g + d*e*f + 2*d*e*g*p*x + 3*d*e*g*x + e**2*f*x 
+ e**2*g*p*x**2 + 2*e**2*g*x**2)**p*x)/((d + e*x)**(2*p)*d**3 + 3*(d + e*x 
)**(2*p)*d**2*e*x + 3*(d + e*x)**(2*p)*d*e**2*x**2 + (d + e*x)**(2*p)*e**3 
*x**3),x)*g