\(\int W(a+b x)^2 \, dx\) [363]

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

Optimal result

Integrand size = 8, antiderivative size = 55 \[ \int W(a+b x)^2 \, dx=4 x-\frac {4 (a+b x)}{b W(a+b x)}-\frac {2 (a+b x) W(a+b x)}{b}+\frac {(a+b x) W(a+b x)^2}{b} \] Output:

4*x-4*(b*x+a)/b/LambertW(b*x+a)-2*(b*x+a)*LambertW(b*x+a)/b+(b*x+a)*Lamber 
tW(b*x+a)^2/b
 

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.82 \[ \int W(a+b x)^2 \, dx=\frac {(a+b x) \left (-4+4 W(a+b x)-2 W(a+b x)^2+W(a+b x)^3\right )}{b W(a+b x)} \] Input:

Integrate[ProductLog[a + b*x]^2,x]
 

Output:

((a + b*x)*(-4 + 4*ProductLog[a + b*x] - 2*ProductLog[a + b*x]^2 + Product 
Log[a + b*x]^3))/(b*ProductLog[a + b*x])
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.05, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {7167, 7178, 7177, 7176}

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 W(a+b x)^2 \, dx\)

\(\Big \downarrow \) 7167

\(\displaystyle \frac {(a+b x) W(a+b x)^2}{b}-2 \int \frac {W(a+b x)^2}{W(a+b x)+1}dx\)

\(\Big \downarrow \) 7178

\(\displaystyle \frac {(a+b x) W(a+b x)^2}{b}-2 \left (\frac {(a+b x) W(a+b x)}{b}-2 \int \frac {W(a+b x)}{W(a+b x)+1}dx\right )\)

\(\Big \downarrow \) 7177

\(\displaystyle \frac {(a+b x) W(a+b x)^2}{b}-2 \left (\frac {(a+b x) W(a+b x)}{b}-2 \left (x-\int \frac {1}{W(a+b x)+1}dx\right )\right )\)

\(\Big \downarrow \) 7176

\(\displaystyle \frac {(a+b x) W(a+b x)^2}{b}-2 \left (\frac {(a+b x) W(a+b x)}{b}-2 \left (x-\frac {a+b x}{b W(a+b x)}\right )\right )\)

Input:

Int[ProductLog[a + b*x]^2,x]
 

Output:

((a + b*x)*ProductLog[a + b*x]^2)/b - 2*(-2*(x - (a + b*x)/(b*ProductLog[a 
 + b*x])) + ((a + b*x)*ProductLog[a + b*x])/b)
 

Defintions of rubi rules used

rule 7167
Int[((c_.)*ProductLog[(a_.) + (b_.)*(x_)])^(p_.), x_Symbol] :> Simp[(a + b* 
x)*((c*ProductLog[a + b*x])^p/b), x] - Simp[p   Int[(c*ProductLog[a + b*x]) 
^p/(1 + ProductLog[a + b*x]), x], x] /; FreeQ[{a, b, c}, x] &&  !LtQ[p, -1]
 

rule 7176
Int[((d_) + (d_.)*ProductLog[(a_.) + (b_.)*(x_)])^(-1), x_Symbol] :> Simp[( 
a + b*x)/(b*d*ProductLog[a + b*x]), x] /; FreeQ[{a, b, d}, x]
 

rule 7177
Int[ProductLog[(a_.) + (b_.)*(x_)]/((d_) + (d_.)*ProductLog[(a_.) + (b_.)*( 
x_)]), x_Symbol] :> Simp[d*x, x] - Int[1/(d + d*ProductLog[a + b*x]), x] /; 
 FreeQ[{a, b, d}, x]
 

rule 7178
Int[((c_.)*ProductLog[(a_.) + (b_.)*(x_)])^(p_)/((d_) + (d_.)*ProductLog[(a 
_.) + (b_.)*(x_)]), x_Symbol] :> Simp[c*(a + b*x)*((c*ProductLog[a + b*x])^ 
(p - 1)/(b*d)), x] - Simp[c*p   Int[(c*ProductLog[a + b*x])^(p - 1)/(d + d* 
ProductLog[a + b*x]), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[p, 0]
 
Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00

method result size
derivativedivides \(\frac {\operatorname {LambertW}\left (b x +a \right )^{2} \left (b x +a \right )-2 \left (b x +a \right ) \operatorname {LambertW}\left (b x +a \right )+4 b x +4 a -\frac {4 \left (b x +a \right )}{\operatorname {LambertW}\left (b x +a \right )}}{b}\) \(55\)
default \(\frac {\operatorname {LambertW}\left (b x +a \right )^{2} \left (b x +a \right )-2 \left (b x +a \right ) \operatorname {LambertW}\left (b x +a \right )+4 b x +4 a -\frac {4 \left (b x +a \right )}{\operatorname {LambertW}\left (b x +a \right )}}{b}\) \(55\)
parallelrisch \(-\frac {-x \operatorname {LambertW}\left (b x +a \right )^{3} b +2 \operatorname {LambertW}\left (b x +a \right )^{2} x b -\operatorname {LambertW}\left (b x +a \right )^{3} a -4 x \operatorname {LambertW}\left (b x +a \right ) b +2 a \operatorname {LambertW}\left (b x +a \right )^{2}+4 b x +4 a \operatorname {LambertW}\left (b x +a \right )+4 a}{b \operatorname {LambertW}\left (b x +a \right )}\) \(87\)

Input:

int(LambertW(b*x+a)^2,x,method=_RETURNVERBOSE)
 

Output:

1/b*(LambertW(b*x+a)^2*(b*x+a)-2*(b*x+a)*LambertW(b*x+a)+4*b*x+4*a-4*(b*x+ 
a)/LambertW(b*x+a))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.75 \[ \int W(a+b x)^2 \, dx=-\frac {2 \, b x \operatorname {W}({b x + a})^{2} - {\left (b x + a\right )} \operatorname {W}({b x + a})^{3} - 4 \, b x \operatorname {W}({b x + a}) + 2 \, a \operatorname {W}({b x + a}) \log \left (b x + a\right ) - 2 \, a \operatorname {W}({b x + a}) \log \left (\operatorname {W}({b x + a})\right ) + 4 \, b x + 4 \, a}{b \operatorname {W}({b x + a})} \] Input:

integrate(lambert_w(b*x+a)^2,x, algorithm="fricas")
 

Output:

-(2*b*x*lambert_w(b*x + a)^2 - (b*x + a)*lambert_w(b*x + a)^3 - 4*b*x*lamb 
ert_w(b*x + a) + 2*a*lambert_w(b*x + a)*log(b*x + a) - 2*a*lambert_w(b*x + 
 a)*log(lambert_w(b*x + a)) + 4*b*x + 4*a)/(b*lambert_w(b*x + a))
 

Sympy [A] (verification not implemented)

Time = 0.54 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.45 \[ \int W(a+b x)^2 \, dx=\begin {cases} 0 & \text {for}\: a = 0 \wedge b = 0 \\x W^{2}\left (a\right ) & \text {for}\: b = 0 \\0 & \text {for}\: a = - b x \\\frac {a W^{2}\left (a + b x\right )}{b} - \frac {2 a W\left (a + b x\right )}{b} - \frac {4 a}{b W\left (a + b x\right )} + x W^{2}\left (a + b x\right ) - 2 x W\left (a + b x\right ) + 4 x - \frac {4 x}{W\left (a + b x\right )} & \text {otherwise} \end {cases} \] Input:

integrate(LambertW(b*x+a)**2,x)
 

Output:

Piecewise((0, Eq(a, 0) & Eq(b, 0)), (x*LambertW(a)**2, Eq(b, 0)), (0, Eq(a 
, -b*x)), (a*LambertW(a + b*x)**2/b - 2*a*LambertW(a + b*x)/b - 4*a/(b*Lam 
bertW(a + b*x)) + x*LambertW(a + b*x)**2 - 2*x*LambertW(a + b*x) + 4*x - 4 
*x/LambertW(a + b*x), True))
 

Maxima [F]

\[ \int W(a+b x)^2 \, dx=\int { \operatorname {W}({b x + a})^{2} \,d x } \] Input:

integrate(lambert_w(b*x+a)^2,x, algorithm="maxima")
 

Output:

integrate(lambert_w(b*x + a)^2, x)
 

Giac [F]

\[ \int W(a+b x)^2 \, dx=\int { \operatorname {W}({b x + a})^{2} \,d x } \] Input:

integrate(lambert_w(b*x+a)^2,x, algorithm="giac")
 

Output:

integrate(lambert_w(b*x + a)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int W(a+b x)^2 \, dx=\int {\mathrm {LambertW}\left (a+b\,x\right )}^2 \,d x \] Input:

int(LambertW(a + b*x)^2,x)
 

Output:

int(LambertW(a + b*x)^2, x)
 

Reduce [B] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.73 \[ \int W(a+b x)^2 \, dx=\frac {e^{\textit {lambert\_w} \left (b x +a \right )} \left (\textit {lambert\_w} \left (b x +a \right )^{3}-2 \textit {lambert\_w} \left (b x +a \right )^{2}+4 \textit {lambert\_w} \left (b x +a \right )-4\right )}{b} \] Input:

int(Lambert_W(b*x+a)^2,x)
 

Output:

(e**lambert_w(a + b*x)*(lambert_w(a + b*x)**3 - 2*lambert_w(a + b*x)**2 + 
4*lambert_w(a + b*x) - 4))/b