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

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

Optimal result

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

-1/3*(-a*d+b*c)^2*exp(-b*x-a)/b^3-1/3*(-a*d+b*c)^3*Ei(1,b*x+a)/b^3/d+1/3*( 
d*x+c)^3*Ei(1,b*x+a)/d-1/3*d*(-a*d+b*c)*exp(-a+b*c/d)*exp(-b*(d*x+c)/d)*(1 
+b*(d*x+c)/d)/b^3-2/3*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)/b^3
 

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.11 \[ \int (c+d x)^2 \Gamma (0,a+b x) \, dx=\frac {e^{-a-b x} \left (-3 b^2 c^2-3 b c d+3 a b c d-2 d^2+a d^2-a^2 d^2-3 b^2 c d x-2 b d^2 x+a b d^2 x-b^2 d^2 x^2-a \left (3 b^2 c^2-3 a b c d+a^2 d^2\right ) e^{a+b x} \operatorname {ExpIntegralEi}(-a-b x)+b^3 e^{a+b x} x \left (3 c^2+3 c d x+d^2 x^2\right ) \Gamma (0,a+b x)\right )}{3 b^3} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.33, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {7119, 2629, 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 (0,a+b x) \, dx\)

\(\Big \downarrow \) 7119

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

\(\Big \downarrow \) 2629

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2629
Int[(F_)^(v_)*(Px_)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandInte 
grand[F^v, Px*(d + e*x)^m, x], x] /; FreeQ[{F, d, e, m}, 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 = 1.13 (sec) , antiderivative size = 282, normalized size of antiderivative = 1.88

method result size
parallelrisch \(\frac {x^{3} \operatorname {expIntegral}_{1}\left (b x +a \right ) a \,b^{3} d^{2}+3 x^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a \,b^{3} c d -x^{2} {\mathrm e}^{-b x -a} a \,b^{2} d^{2}+3 x \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a \,b^{3} c^{2}+x \,{\mathrm e}^{-b x -a} a^{2} b \,d^{2}-3 x \,{\mathrm e}^{-b x -a} a \,b^{2} c d +\operatorname {expIntegral}_{1}\left (b x +a \right ) a^{4} d^{2}-3 \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a^{3} b c d +3 \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a^{2} b^{2} c^{2}-2 x \,{\mathrm e}^{-b x -a} a b \,d^{2}-{\mathrm e}^{-b x -a} a^{3} d^{2}+3 \,{\mathrm e}^{-b x -a} a^{2} b c d -3 \,{\mathrm e}^{-b x -a} a \,b^{2} c^{2}+{\mathrm e}^{-b x -a} a^{2} d^{2}-3 \,{\mathrm e}^{-b x -a} a b c d -2 \,{\mathrm e}^{-b x -a} a \,d^{2}}{3 a \,b^{3}}\) \(282\)
parts \(\frac {\operatorname {expIntegral}_{1}\left (b x +a \right ) d^{2} x^{3}}{3}+\operatorname {expIntegral}_{1}\left (b x +a \right ) d c \,x^{2}+\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{2} x +\frac {\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{3}}{3 d}+\frac {-c^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )-\frac {3 \,{\mathrm e}^{-b x -a} d \,c^{2}}{b}-\frac {3 \,{\mathrm e}^{-b x -a} d^{3} a^{2}}{b^{3}}-\frac {d^{3} \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^{3}}+\frac {6 \,{\mathrm e}^{-b x -a} d^{2} a c}{b^{2}}+\frac {d^{3} a^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )}{b^{3}}+\frac {3 d^{2} c \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{2}}-\frac {3 d^{3} a \left (\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )}{b^{3}}+\frac {3 d a \,c^{2} \operatorname {expIntegral}_{1}\left (b x +a \right )}{b}-\frac {3 d^{2} a^{2} c \,\operatorname {expIntegral}_{1}\left (b x +a \right )}{b^{2}}}{3 d}\) \(322\)
derivativedivides \(\frac {-\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a^{3}}{3 b^{2}}+\frac {d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a^{2} c}{b}+\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a^{2} \left (b x +a \right )}{b^{2}}-\operatorname {expIntegral}_{1}\left (b x +a \right ) a \,c^{2}-\frac {2 d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a c \left (b x +a \right )}{b}-\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a \left (b x +a \right )^{2}}{b^{2}}+\frac {b \,\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{3}}{3 d}+\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{2} \left (b x +a \right )+\frac {d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) c \left (b x +a \right )^{2}}{b}+\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) \left (b x +a \right )^{3}}{3 b^{2}}-\frac {d^{3} \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 )-a^{3} d^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )+3 \,{\mathrm e}^{-b x -a} a^{2} d^{3}+3 \,{\mathrm e}^{-b x -a} b^{2} c^{2} d +b^{3} c^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )+3 a \,d^{3} \left (-\left (b x +a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-6 \,{\mathrm e}^{-b x -a} a b c \,d^{2}-3 b c \,d^{2} \left (-\left (b x +a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-3 a \,b^{2} c^{2} d \,\operatorname {expIntegral}_{1}\left (b x +a \right )+3 a^{2} b c \,d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right )}{3 b^{2} d}}{b}\) \(434\)
default \(\frac {-\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a^{3}}{3 b^{2}}+\frac {d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a^{2} c}{b}+\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a^{2} \left (b x +a \right )}{b^{2}}-\operatorname {expIntegral}_{1}\left (b x +a \right ) a \,c^{2}-\frac {2 d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) a c \left (b x +a \right )}{b}-\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) a \left (b x +a \right )^{2}}{b^{2}}+\frac {b \,\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{3}}{3 d}+\operatorname {expIntegral}_{1}\left (b x +a \right ) c^{2} \left (b x +a \right )+\frac {d \,\operatorname {expIntegral}_{1}\left (b x +a \right ) c \left (b x +a \right )^{2}}{b}+\frac {d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right ) \left (b x +a \right )^{3}}{3 b^{2}}-\frac {d^{3} \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 )-a^{3} d^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )+3 \,{\mathrm e}^{-b x -a} a^{2} d^{3}+3 \,{\mathrm e}^{-b x -a} b^{2} c^{2} d +b^{3} c^{3} \operatorname {expIntegral}_{1}\left (b x +a \right )+3 a \,d^{3} \left (-\left (b x +a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-6 \,{\mathrm e}^{-b x -a} a b c \,d^{2}-3 b c \,d^{2} \left (-\left (b x +a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}\right )-3 a \,b^{2} c^{2} d \,\operatorname {expIntegral}_{1}\left (b x +a \right )+3 a^{2} b c \,d^{2} \operatorname {expIntegral}_{1}\left (b x +a \right )}{3 b^{2} d}}{b}\) \(434\)

Input:

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

Output:

1/3*(x^3*Ei(1,b*x+a)*a*b^3*d^2+3*x^2*Ei(1,b*x+a)*a*b^3*c*d-x^2*exp(-b*x-a) 
*a*b^2*d^2+3*x*Ei(1,b*x+a)*a*b^3*c^2+x*exp(-b*x-a)*a^2*b*d^2-3*x*exp(-b*x- 
a)*a*b^2*c*d+Ei(1,b*x+a)*a^4*d^2-3*Ei(1,b*x+a)*a^3*b*c*d+3*Ei(1,b*x+a)*a^2 
*b^2*c^2-2*x*exp(-b*x-a)*a*b*d^2-exp(-b*x-a)*a^3*d^2+3*exp(-b*x-a)*a^2*b*c 
*d-3*exp(-b*x-a)*a*b^2*c^2+exp(-b*x-a)*a^2*d^2-3*exp(-b*x-a)*a*b*c*d-2*exp 
(-b*x-a)*a*d^2)/a/b^3
 

Fricas [F(-2)]

Exception generated. \[ \int (c+d x)^2 \Gamma (0,a+b x) \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> An error occurred when FriCAS evaluated ((( 
(d)*(x))+(c))^(((2)::EXPR INT)))*(exp_integral_e(((1)::EXPR INT),((b)*(x)) 
+(a))):   There are no library operations named exp_integral_e       Use H 
yperDoc
 

Sympy [A] (verification not implemented)

Time = 25.33 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.94 \[ \int (c+d x)^2 \Gamma (0,a+b x) \, dx=\begin {cases} \frac {a^{3} d^{2} \operatorname {E}_{1}\left (a + b x\right )}{3 b^{3}} - \frac {a^{2} c d \operatorname {E}_{1}\left (a + b x\right )}{b^{2}} - \frac {a^{2} d^{2} e^{- a} e^{- b x}}{3 b^{3}} + \frac {a c^{2} \operatorname {E}_{1}\left (a + b x\right )}{b} + \frac {a c d e^{- a} e^{- b x}}{b^{2}} + \frac {a d^{2} x e^{- a} e^{- b x}}{3 b^{2}} + \frac {a d^{2} e^{- a} e^{- b x}}{3 b^{3}} + c^{2} x \operatorname {E}_{1}\left (a + b x\right ) + c d x^{2} \operatorname {E}_{1}\left (a + b x\right ) + \frac {d^{2} x^{3} \operatorname {E}_{1}\left (a + b x\right )}{3} - \frac {c^{2} e^{- a} e^{- b x}}{b} - \frac {c d x e^{- a} e^{- b x}}{b} - \frac {d^{2} x^{2} e^{- a} e^{- b x}}{3 b} - \frac {c d e^{- a} e^{- b x}}{b^{2}} - \frac {2 d^{2} x e^{- a} e^{- b x}}{3 b^{2}} - \frac {2 d^{2} e^{- a} e^{- b x}}{3 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \operatorname {E}_{1}\left (a\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((a**3*d**2*expint(1, a + b*x)/(3*b**3) - a**2*c*d*expint(1, a + 
b*x)/b**2 - a**2*d**2*exp(-a)*exp(-b*x)/(3*b**3) + a*c**2*expint(1, a + b* 
x)/b + a*c*d*exp(-a)*exp(-b*x)/b**2 + a*d**2*x*exp(-a)*exp(-b*x)/(3*b**2) 
+ a*d**2*exp(-a)*exp(-b*x)/(3*b**3) + c**2*x*expint(1, a + b*x) + c*d*x**2 
*expint(1, a + b*x) + d**2*x**3*expint(1, a + b*x)/3 - c**2*exp(-a)*exp(-b 
*x)/b - c*d*x*exp(-a)*exp(-b*x)/b - d**2*x**2*exp(-a)*exp(-b*x)/(3*b) - c* 
d*exp(-a)*exp(-b*x)/b**2 - 2*d**2*x*exp(-a)*exp(-b*x)/(3*b**2) - 2*d**2*ex 
p(-a)*exp(-b*x)/(3*b**3), Ne(b, 0)), ((c**2*x + c*d*x**2 + d**2*x**3/3)*ex 
pint(1, a), True))
 

Maxima [F]

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

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

Output:

-c^2*exp_integral_e(2, b*x + a)/b + integrate(d^2*x^2*exp_integral_e(1, b* 
x + a) + 2*c*d*x*exp_integral_e(1, b*x + a), x)
 

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 276, normalized size of antiderivative = 1.84 \[ \int (c+d x)^2 \Gamma (0,a+b x) \, dx=\frac {\frac {\mathrm {expint}\left (a+b\,x\right )\,\left (\frac {a^4\,d^2}{3}-a^3\,b\,c\,d+a^2\,b^2\,c^2\right )}{b^3}-x^2\,{\mathrm {e}}^{-a-b\,x}\,\left (c\,d+\frac {2\,d^2}{3\,b}\right )-x\,{\mathrm {e}}^{-a-b\,x}\,\left (\frac {\frac {a\,d^2}{3}+\frac {2\,d^2}{3}+b\,c\,d}{b^2}+c^2\right )-\frac {{\mathrm {e}}^{-a-b\,x}\,\left (\frac {2\,a\,d^2}{3}+b\,\left (a\,c\,d-a^2\,c\,d\right )-\frac {a^2\,d^2}{3}+\frac {a^3\,d^2}{3}+a\,b^2\,c^2\right )}{b^3}+x\,\mathrm {expint}\left (a+b\,x\right )\,\left (2\,a\,c^2+\frac {\frac {a^3\,d^2}{3}-a^2\,b\,c\,d}{b^2}\right )-\frac {d^2\,x^3\,{\mathrm {e}}^{-a-b\,x}}{3}+x^2\,\mathrm {expint}\left (a+b\,x\right )\,\left (b\,c^2+a\,d\,c\right )+x^3\,\mathrm {expint}\left (a+b\,x\right )\,\left (\frac {a\,d^2}{3}+b\,c\,d\right )+\frac {b\,d^2\,x^4\,\mathrm {expint}\left (a+b\,x\right )}{3}}{a+b\,x} \] Input:

int(expint(a + b*x)*(c + d*x)^2,x)
 

Output:

((expint(a + b*x)*((a^4*d^2)/3 + a^2*b^2*c^2 - a^3*b*c*d))/b^3 - x^2*exp(- 
 a - b*x)*(c*d + (2*d^2)/(3*b)) - x*exp(- a - b*x)*(((a*d^2)/3 + (2*d^2)/3 
 + b*c*d)/b^2 + c^2) - (exp(- a - b*x)*((2*a*d^2)/3 + b*(a*c*d - a^2*c*d) 
- (a^2*d^2)/3 + (a^3*d^2)/3 + a*b^2*c^2))/b^3 + x*expint(a + b*x)*(2*a*c^2 
 + ((a^3*d^2)/3 - a^2*b*c*d)/b^2) - (d^2*x^3*exp(- a - b*x))/3 + x^2*expin 
t(a + b*x)*(b*c^2 + a*c*d) + x^3*expint(a + b*x)*((a*d^2)/3 + b*c*d) + (b* 
d^2*x^4*expint(a + b*x))/3)/(a + b*x)
 

Reduce [F]

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

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

Output:

int(ei(1,a + b*x),x)*c**2 + int(ei(1,a + b*x)*x**2,x)*d**2 + 2*int(ei(1,a 
+ b*x)*x,x)*c*d