\(\int (c+d x)^2 \Gamma (2,a+b x) \, dx\) [120]

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

Optimal result

Integrand size = 15, antiderivative size = 96 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\frac {(c+d x)^3 \Gamma (2,a+b x)}{3 d}+\frac {d (b c-a d) e^{-a+\frac {b c}{d}} \Gamma \left (4,\frac {b (c+d x)}{d}\right )}{3 b^3}-\frac {d^2 e^{-a+\frac {b c}{d}} \Gamma \left (5,\frac {b (c+d x)}{d}\right )}{3 b^3} \] Output:

1/3*(d*x+c)^3*exp(-b*x-a)*(b*x+a+1)/d+2*d*(-a*d+b*c)*exp(-a+b*c/d)*exp(-b* 
(d*x+c)/d)*(1+b*(d*x+c)/d+1/2*b^2*(d*x+c)^2/d^2+1/6*b^3*(d*x+c)^3/d^3)/b^3 
-8*d^2*exp(-a+b*c/d)*exp(-b*(d*x+c)/d)*(1+b*(d*x+c)/d+1/2*b^2*(d*x+c)^2/d^ 
2+1/6*b^3*(d*x+c)^3/d^3+1/24*b^4*(d*x+c)^4/d^4)/b^3
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.67 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\frac {e^{-a-b x} \left (-6 (4+a) d^2-3 b^2 (c+d x) ((2+a) c+(4+a) d x)-6 b d ((3+a) c+(4+a) d x)-b^4 x^2 \left (3 c^2+3 c d x+d^2 x^2\right )-b^3 x \left (3 (2+a) c^2+3 (3+a) c d x+(4+a) d^2 x^2\right )+b^3 e^{a+b x} x \left (3 c^2+3 c d x+d^2 x^2\right ) \Gamma (2,a+b x)\right )}{3 b^3} \] Input:

Integrate[(c + d*x)^2*Gamma[2, a + b*x],x]
 

Output:

(E^(-a - b*x)*(-6*(4 + a)*d^2 - 3*b^2*(c + d*x)*((2 + a)*c + (4 + a)*d*x) 
- 6*b*d*((3 + a)*c + (4 + a)*d*x) - b^4*x^2*(3*c^2 + 3*c*d*x + d^2*x^2) - 
b^3*x*(3*(2 + a)*c^2 + 3*(3 + a)*c*d*x + (4 + a)*d^2*x^2) + b^3*E^(a + b*x 
)*x*(3*c^2 + 3*c*d*x + d^2*x^2)*Gamma[2, a + b*x]))/(3*b^3)
 

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(256\) vs. \(2(96)=192\).

Time = 0.92 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.67, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {7119, 2626, 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 (c+d x)^2 \Gamma (2,a+b x) \, dx\)

\(\Big \downarrow \) 7119

\(\displaystyle \frac {b \int e^{-a-b x} (a+b x) (c+d x)^3dx}{3 d}+\frac {(c+d x)^3 \Gamma (2,a+b x)}{3 d}\)

\(\Big \downarrow \) 2626

\(\displaystyle \frac {b \int \left (\frac {b e^{-a-b x} (c+d x)^4}{d}+\frac {(a d-b c) e^{-a-b x} (c+d x)^3}{d}\right )dx}{3 d}+\frac {(c+d x)^3 \Gamma (2,a+b x)}{3 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \left (\frac {6 d^2 e^{-a-b x} (b c-a d)}{b^4}-\frac {24 d^3 e^{-a-b x}}{b^4}-\frac {24 d^2 e^{-a-b x} (c+d x)}{b^3}+\frac {6 d e^{-a-b x} (c+d x) (b c-a d)}{b^3}-\frac {12 d e^{-a-b x} (c+d x)^2}{b^2}+\frac {3 e^{-a-b x} (c+d x)^2 (b c-a d)}{b^2}-\frac {e^{-a-b x} (c+d x)^4}{d}+\frac {e^{-a-b x} (c+d x)^3 (b c-a d)}{b d}-\frac {4 e^{-a-b x} (c+d x)^3}{b}\right )}{3 d}+\frac {(c+d x)^3 \Gamma (2,a+b x)}{3 d}\)

Input:

Int[(c + d*x)^2*Gamma[2, a + b*x],x]
 

Output:

(b*((-24*d^3*E^(-a - b*x))/b^4 + (6*d^2*(b*c - a*d)*E^(-a - b*x))/b^4 - (2 
4*d^2*E^(-a - b*x)*(c + d*x))/b^3 + (6*d*(b*c - a*d)*E^(-a - b*x)*(c + d*x 
))/b^3 - (12*d*E^(-a - b*x)*(c + d*x)^2)/b^2 + (3*(b*c - a*d)*E^(-a - b*x) 
*(c + d*x)^2)/b^2 - (4*E^(-a - b*x)*(c + d*x)^3)/b + ((b*c - a*d)*E^(-a - 
b*x)*(c + d*x)^3)/(b*d) - (E^(-a - b*x)*(c + d*x)^4)/d))/(3*d) + ((c + d*x 
)^3*Gamma[2, a + b*x])/(3*d)
 

Defintions of rubi rules used

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

rule 2626
Int[(F_)^(v_)*(Px_), x_Symbol] :> Int[ExpandIntegrand[F^v, Px, x], x] /; Fr 
eeQ[F, x] && PolynomialQ[Px, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]
 

rule 7119
Int[Gamma[n_, (a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> 
Block[{$UseGamma = True}, Simp[(c + d*x)^(m + 1)*(Gamma[n, a + b*x]/(d*(m + 
 1))), x] + Simp[b/(d*(m + 1))   Int[(c + d*x)^(m + 1)*((a + b*x)^(n - 1)/E 
^(a + b*x)), x], x]] /; FreeQ[{a, b, c, d, m, n}, x] && (IGtQ[m, 0] || IGtQ 
[n, 0] || IntegersQ[m, n]) && NeQ[m, -1]
 
Maple [A] (verified)

Time = 0.60 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.42

method result size
gosper \(-\frac {\left (b^{3} d^{2} x^{3}+a \,b^{2} d^{2} x^{2}+2 b^{3} c d \,x^{2}+2 a \,b^{2} c d x +c^{2} x \,b^{3}+4 b^{2} d^{2} x^{2}+a \,c^{2} b^{2}+2 a b \,d^{2} x +6 b^{2} c d x +2 a b c d +2 b^{2} c^{2}+8 b \,d^{2} x +2 a \,d^{2}+6 b c d +8 d^{2}\right ) {\mathrm e}^{-b x -a}}{b^{3}}\) \(136\)
risch \(-\frac {\left (b^{3} d^{2} x^{3}+a \,b^{2} d^{2} x^{2}+2 b^{3} c d \,x^{2}+2 a \,b^{2} c d x +c^{2} x \,b^{3}+4 b^{2} d^{2} x^{2}+a \,c^{2} b^{2}+2 a b \,d^{2} x +6 b^{2} c d x +2 a b c d +2 b^{2} c^{2}+8 b \,d^{2} x +2 a \,d^{2}+6 b c d +8 d^{2}\right ) {\mathrm e}^{-b x -a}}{b^{3}}\) \(136\)
orering \(-\frac {\left (b^{3} d^{2} x^{3}+a \,b^{2} d^{2} x^{2}+2 b^{3} c d \,x^{2}+2 a \,b^{2} c d x +c^{2} x \,b^{3}+4 b^{2} d^{2} x^{2}+a \,c^{2} b^{2}+2 a b \,d^{2} x +6 b^{2} c d x +2 a b c d +2 b^{2} c^{2}+8 b \,d^{2} x +2 a \,d^{2}+6 b c d +8 d^{2}\right ) {\mathrm e}^{-b x -a}}{b^{3}}\) \(136\)
norman \(-d^{2} x^{3} {\mathrm e}^{-b x -a}-\frac {\left (a \,c^{2} b^{2}+2 a b c d +2 b^{2} c^{2}+2 a \,d^{2}+6 b c d +8 d^{2}\right ) {\mathrm e}^{-b x -a}}{b^{3}}-\frac {\left (2 a b c d +b^{2} c^{2}+2 a \,d^{2}+6 b c d +8 d^{2}\right ) x \,{\mathrm e}^{-b x -a}}{b^{2}}-\frac {d \left (a d +2 c b +4 d \right ) x^{2} {\mathrm e}^{-b x -a}}{b}\) \(146\)
parallelrisch \(-\frac {d^{2} {\mathrm e}^{-b x -a} x^{3} b^{3}+x^{2} {\mathrm e}^{-b x -a} a \,b^{2} d^{2}+2 x^{2} {\mathrm e}^{-b x -a} b^{3} c d +4 x^{2} {\mathrm e}^{-b x -a} d^{2} b^{2}+2 x \,{\mathrm e}^{-b x -a} a \,b^{2} c d +x \,{\mathrm e}^{-b x -a} b^{3} c^{2}+2 x \,{\mathrm e}^{-b x -a} a b \,d^{2}+6 x \,{\mathrm e}^{-b x -a} b^{2} c d +{\mathrm e}^{-b x -a} a \,b^{2} c^{2}+8 x \,{\mathrm e}^{-b x -a} b \,d^{2}+2 \,{\mathrm e}^{-b x -a} a b c d +2 \,{\mathrm e}^{-b x -a} b^{2} c^{2}+2 \,{\mathrm e}^{-b x -a} a \,d^{2}+6 \,{\mathrm e}^{-b x -a} b c d +8 \,{\mathrm e}^{-b x -a} d^{2}}{b^{3}}\) \(262\)
meijerg \(\frac {d^{2} {\mathrm e}^{-a} \left (6-\frac {\left (4 b^{3} x^{3}+12 b^{2} x^{2}+24 b x +24\right ) {\mathrm e}^{-b x}}{4}\right )}{b^{3}}+\frac {d^{2} {\mathrm e}^{-a} a \left (2-\frac {\left (3 b^{2} x^{2}+6 b x +6\right ) {\mathrm e}^{-b x}}{3}\right )}{b^{3}}+\frac {{\mathrm e}^{-a} d^{2} \left (2-\frac {\left (3 b^{2} x^{2}+6 b x +6\right ) {\mathrm e}^{-b x}}{3}\right )}{b^{3}}+\frac {2 c d \,{\mathrm e}^{-a} \left (2-\frac {\left (3 b^{2} x^{2}+6 b x +6\right ) {\mathrm e}^{-b x}}{3}\right )}{b^{2}}+\frac {2 d c \,{\mathrm e}^{-a} a \left (1-\frac {\left (2 b x +2\right ) {\mathrm e}^{-b x}}{2}\right )}{b^{2}}+\frac {2 c d \,{\mathrm e}^{-a} \left (1-\frac {\left (2 b x +2\right ) {\mathrm e}^{-b x}}{2}\right )}{b^{2}}+\frac {c^{2} {\mathrm e}^{-a} \left (1-\frac {\left (2 b x +2\right ) {\mathrm e}^{-b x}}{2}\right )}{b}+\frac {c^{2} {\mathrm e}^{-a} a \left (1-{\mathrm e}^{-b x}\right )}{b}+\frac {c^{2} {\mathrm e}^{-a} \left (1-{\mathrm e}^{-b x}\right )}{b}\) \(267\)
parts \(-d^{2} x^{3} {\mathrm e}^{-b x -a}-\frac {{\mathrm e}^{-b x -a} a \,d^{2} x^{2}}{b}-2 \,{\mathrm e}^{-b x -a} c d \,x^{2}-\frac {2 \,{\mathrm e}^{-b x -a} x a d c}{b}-{\mathrm e}^{-b x -a} c^{2} x -\frac {d^{2} x^{2} {\mathrm e}^{-b x -a}}{b}-\frac {{\mathrm e}^{-b x -a} a \,c^{2}}{b}-\frac {2 \,{\mathrm e}^{-b x -a} c d x}{b}-\frac {{\mathrm e}^{-b x -a} c^{2}}{b}-\frac {{\mathrm e}^{-b x -a} b \,c^{2}+\frac {{\mathrm e}^{-b x -a} d^{2} a^{2}}{b}+2 \,{\mathrm e}^{-b x -a} c d -2 \,{\mathrm e}^{-b x -a} d a c -4 c d \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-\frac {2 \,{\mathrm e}^{-b x -a} d^{2} a}{b}-\frac {2 d^{2} \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}+\frac {3 d^{2} \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b}+\frac {4 d^{2} a \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}}{b^{2}}\) \(415\)
derivativedivides \(-\frac {{\mathrm e}^{-b x -a} c^{2}+\frac {{\mathrm e}^{-b x -a} d^{2} a^{2}}{b^{2}}+\frac {d^{2} \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}-c^{2} \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-\frac {d^{2} \left ({\mathrm e}^{-b x -a} \left (-b x -a \right )^{3}-3 \left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}+6 \left (-b x -a \right ) {\mathrm e}^{-b x -a}-6 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}-\frac {2 \,{\mathrm e}^{-b x -a} d a c}{b}-\frac {2 d c \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}+\frac {2 d c \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b}-\frac {d^{2} a^{2} \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{2}}+\frac {2 d^{2} a \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{2}}-\frac {2 d^{2} a \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}+\frac {2 d a c \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}}{b}\) \(502\)
default \(-\frac {{\mathrm e}^{-b x -a} c^{2}+\frac {{\mathrm e}^{-b x -a} d^{2} a^{2}}{b^{2}}+\frac {d^{2} \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}-c^{2} \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-\frac {d^{2} \left ({\mathrm e}^{-b x -a} \left (-b x -a \right )^{3}-3 \left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}+6 \left (-b x -a \right ) {\mathrm e}^{-b x -a}-6 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}-\frac {2 \,{\mathrm e}^{-b x -a} d a c}{b}-\frac {2 d c \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}+\frac {2 d c \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b}-\frac {d^{2} a^{2} \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{2}}+\frac {2 d^{2} a \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{2}}-\frac {2 d^{2} a \left (\left (-b x -a \right )^{2} {\mathrm e}^{-b x -a}-2 \left (-b x -a \right ) {\mathrm e}^{-b x -a}+2 \,{\mathrm e}^{-b x -a}\right )}{b^{2}}+\frac {2 d a c \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b}}{b}\) \(502\)

Input:

int((d*x+c)^2*exp(-b*x-a)*(b*x+a+1),x,method=_RETURNVERBOSE)
 

Output:

-(b^3*d^2*x^3+a*b^2*d^2*x^2+2*b^3*c*d*x^2+2*a*b^2*c*d*x+b^3*c^2*x+4*b^2*d^ 
2*x^2+a*b^2*c^2+2*a*b*d^2*x+6*b^2*c*d*x+2*a*b*c*d+2*b^2*c^2+8*b*d^2*x+2*a* 
d^2+6*b*c*d+8*d^2)*exp(-b*x-a)/b^3
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (88) = 176\).

Time = 0.09 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.88 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=-\frac {{\left (b^{4} d^{2} x^{4} + 3 \, {\left (a + 2\right )} b^{2} c^{2} + 6 \, {\left (a + 3\right )} b c d + {\left (3 \, b^{4} c d + {\left (a + 4\right )} b^{3} d^{2}\right )} x^{3} + 6 \, {\left (a + 4\right )} d^{2} + 3 \, {\left (b^{4} c^{2} + {\left (a + 3\right )} b^{3} c d + {\left (a + 4\right )} b^{2} d^{2}\right )} x^{2} + 3 \, {\left ({\left (a + 2\right )} b^{3} c^{2} + 2 \, {\left (a + 3\right )} b^{2} c d + 2 \, {\left (a + 4\right )} b d^{2}\right )} x\right )} e^{\left (-b x - a\right )} - {\left (b^{3} d^{2} x^{3} + 3 \, b^{3} c d x^{2} + 3 \, b^{3} c^{2} x\right )} \Gamma \left (2, b x + a\right )}{3 \, b^{3}} \] Input:

integrate((d*x+c)^2*gamma(2,b*x+a),x, algorithm="fricas")
 

Output:

-1/3*((b^4*d^2*x^4 + 3*(a + 2)*b^2*c^2 + 6*(a + 3)*b*c*d + (3*b^4*c*d + (a 
 + 4)*b^3*d^2)*x^3 + 6*(a + 4)*d^2 + 3*(b^4*c^2 + (a + 3)*b^3*c*d + (a + 4 
)*b^2*d^2)*x^2 + 3*((a + 2)*b^3*c^2 + 2*(a + 3)*b^2*c*d + 2*(a + 4)*b*d^2) 
*x)*e^(-b*x - a) - (b^3*d^2*x^3 + 3*b^3*c*d*x^2 + 3*b^3*c^2*x)*gamma(2, b* 
x + a))/b^3
 

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.25 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\begin {cases} \frac {\left (- a b^{2} c^{2} - 2 a b^{2} c d x - a b^{2} d^{2} x^{2} - 2 a b c d - 2 a b d^{2} x - 2 a d^{2} - b^{3} c^{2} x - 2 b^{3} c d x^{2} - b^{3} d^{2} x^{3} - 2 b^{2} c^{2} - 6 b^{2} c d x - 4 b^{2} d^{2} x^{2} - 6 b c d - 8 b d^{2} x - 8 d^{2}\right ) e^{- a - b x}}{b^{3}} & \text {for}\: b^{3} \neq 0 \\\frac {b d^{2} x^{4}}{4} + x^{3} \left (\frac {a d^{2}}{3} + \frac {2 b c d}{3} + \frac {d^{2}}{3}\right ) + x^{2} \left (a c d + \frac {b c^{2}}{2} + c d\right ) + x \left (a c^{2} + c^{2}\right ) & \text {otherwise} \end {cases} \] Input:

integrate((d*x+c)**2*uppergamma(2,b*x+a),x)
 

Output:

Piecewise(((-a*b**2*c**2 - 2*a*b**2*c*d*x - a*b**2*d**2*x**2 - 2*a*b*c*d - 
 2*a*b*d**2*x - 2*a*d**2 - b**3*c**2*x - 2*b**3*c*d*x**2 - b**3*d**2*x**3 
- 2*b**2*c**2 - 6*b**2*c*d*x - 4*b**2*d**2*x**2 - 6*b*c*d - 8*b*d**2*x - 8 
*d**2)*exp(-a - b*x)/b**3, Ne(b**3, 0)), (b*d**2*x**4/4 + x**3*(a*d**2/3 + 
 2*b*c*d/3 + d**2/3) + x**2*(a*c*d + b*c**2/2 + c*d) + x*(a*c**2 + c**2), 
True))
 

Maxima [F]

\[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \Gamma \left (2, b x + a\right ) \,d x } \] Input:

integrate((d*x+c)^2*gamma(2,b*x+a),x, algorithm="maxima")
 

Output:

((b*x + a)*gamma(2, b*x + a) - gamma(3, b*x + a))*c^2/b + integrate(d^2*x^ 
2*gamma(2, b*x + a) + 2*c*d*x*gamma(2, b*x + a), x)
 

Giac [F]

\[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \Gamma \left (2, b x + a\right ) \,d x } \] Input:

integrate((d*x+c)^2*gamma(2,b*x+a),x, algorithm="giac")
 

Output:

integrate((d*x + c)^2*gamma(2, b*x + a), x)
 

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.55 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=-x^2\,{\mathrm {e}}^{-a-b\,x}\,\left (2\,c\,d+\frac {a\,d^2+4\,d^2}{b}\right )-x\,{\mathrm {e}}^{-a-b\,x}\,\left (c^2+\frac {2\,a\,d^2+8\,d^2+b\,\left (6\,c\,d+2\,a\,c\,d\right )}{b^2}\right )-d^2\,x^3\,{\mathrm {e}}^{-a-b\,x}-\frac {{\mathrm {e}}^{-a-b\,x}\,\left (b^2\,\left (a\,c^2+2\,c^2\right )+2\,a\,d^2+8\,d^2+b\,\left (6\,c\,d+2\,a\,c\,d\right )\right )}{b^3} \] Input:

int(exp(- a - b*x)*(c + d*x)^2*(a + b*x + 1),x)
 

Output:

- x^2*exp(- a - b*x)*(2*c*d + (a*d^2 + 4*d^2)/b) - x*exp(- a - b*x)*(c^2 + 
 (2*a*d^2 + 8*d^2 + b*(6*c*d + 2*a*c*d))/b^2) - d^2*x^3*exp(- a - b*x) - ( 
exp(- a - b*x)*(b^2*(a*c^2 + 2*c^2) + 2*a*d^2 + 8*d^2 + b*(6*c*d + 2*a*c*d 
)))/b^3
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.44 \[ \int (c+d x)^2 \Gamma (2,a+b x) \, dx=\frac {-b^{3} d^{2} x^{3}-a \,b^{2} d^{2} x^{2}-2 b^{3} c d \,x^{2}-2 a \,b^{2} c d x -b^{3} c^{2} x -4 b^{2} d^{2} x^{2}-a \,b^{2} c^{2}-2 a b \,d^{2} x -6 b^{2} c d x -2 a b c d -2 b^{2} c^{2}-8 b \,d^{2} x -2 a \,d^{2}-6 b c d -8 d^{2}}{e^{b x +a} b^{3}} \] Input:

int((d*x+c)^2*exp(-b*x-a)*(b*x+a+1),x)
 

Output:

( - a*b**2*c**2 - 2*a*b**2*c*d*x - a*b**2*d**2*x**2 - 2*a*b*c*d - 2*a*b*d* 
*2*x - 2*a*d**2 - b**3*c**2*x - 2*b**3*c*d*x**2 - b**3*d**2*x**3 - 2*b**2* 
c**2 - 6*b**2*c*d*x - 4*b**2*d**2*x**2 - 6*b*c*d - 8*b*d**2*x - 8*d**2)/(e 
**(a + b*x)*b**3)