\(\int (e+f x) \log (a+b \coth (c+d x)) \, dx\) [41]

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

Optimal result

Integrand size = 17, antiderivative size = 198 \[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\frac {(e+f x)^2 \log \left (1-e^{-2 (c+d x)}\right )}{2 f}-\frac {(e+f x)^2 \log \left (1-\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )}{2 f}+\frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}-\frac {(e+f x) \operatorname {PolyLog}\left (2,e^{-2 (c+d x)}\right )}{2 d}+\frac {(e+f x) \operatorname {PolyLog}\left (2,\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )}{2 d}-\frac {f \operatorname {PolyLog}\left (3,e^{-2 (c+d x)}\right )}{4 d^2}+\frac {f \operatorname {PolyLog}\left (3,\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )}{4 d^2} \] Output:

1/2*(f*x+e)^2*ln(1-exp(-2*d*x-2*c))/f-1/2*(f*x+e)^2*ln(1-(a-b)/(a+b)/exp(2 
*d*x+2*c))/f+1/2*(f*x+e)^2*ln(a+b*coth(d*x+c))/f-1/2*(f*x+e)*polylog(2,exp 
(-2*d*x-2*c))/d+1/2*(f*x+e)*polylog(2,(a-b)/(a+b)/exp(2*d*x+2*c))/d-1/4*f* 
polylog(3,exp(-2*d*x-2*c))/d^2+1/4*f*polylog(3,(a-b)/(a+b)/exp(2*d*x+2*c)) 
/d^2
 

Mathematica [A] (verified)

Time = 1.69 (sec) , antiderivative size = 337, normalized size of antiderivative = 1.70 \[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\frac {2 d^2 f x^2 \log \left (1-e^{-c-d x}\right )+2 d^2 f x^2 \log \left (1+e^{-c-d x}\right )-2 d^2 f x^2 \log \left (1+\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )+2 d^2 f x^2 \log (a+b \coth (c+d x))-2 d e \log \left (-\frac {b (-1+\coth (c+d x))}{a+b}\right ) \log (a+b \coth (c+d x))+2 d e \log \left (-\frac {b (1+\coth (c+d x))}{a-b}\right ) \log (a+b \coth (c+d x))-4 d f x \operatorname {PolyLog}\left (2,-e^{-c-d x}\right )-4 d f x \operatorname {PolyLog}\left (2,e^{-c-d x}\right )+2 d f x \operatorname {PolyLog}\left (2,\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )+2 d e \operatorname {PolyLog}\left (2,\frac {a+b \coth (c+d x)}{a-b}\right )-2 d e \operatorname {PolyLog}\left (2,\frac {a+b \coth (c+d x)}{a+b}\right )-4 f \operatorname {PolyLog}\left (3,-e^{-c-d x}\right )-4 f \operatorname {PolyLog}\left (3,e^{-c-d x}\right )+f \operatorname {PolyLog}\left (3,\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )}{4 d^2} \] Input:

Integrate[(e + f*x)*Log[a + b*Coth[c + d*x]],x]
 

Output:

(2*d^2*f*x^2*Log[1 - E^(-c - d*x)] + 2*d^2*f*x^2*Log[1 + E^(-c - d*x)] - 2 
*d^2*f*x^2*Log[1 + (-a + b)/((a + b)*E^(2*(c + d*x)))] + 2*d^2*f*x^2*Log[a 
 + b*Coth[c + d*x]] - 2*d*e*Log[-((b*(-1 + Coth[c + d*x]))/(a + b))]*Log[a 
 + b*Coth[c + d*x]] + 2*d*e*Log[-((b*(1 + Coth[c + d*x]))/(a - b))]*Log[a 
+ b*Coth[c + d*x]] - 4*d*f*x*PolyLog[2, -E^(-c - d*x)] - 4*d*f*x*PolyLog[2 
, E^(-c - d*x)] + 2*d*f*x*PolyLog[2, (a - b)/((a + b)*E^(2*(c + d*x)))] + 
2*d*e*PolyLog[2, (a + b*Coth[c + d*x])/(a - b)] - 2*d*e*PolyLog[2, (a + b* 
Coth[c + d*x])/(a + b)] - 4*f*PolyLog[3, -E^(-c - d*x)] - 4*f*PolyLog[3, E 
^(-c - d*x)] + f*PolyLog[3, (a - b)/((a + b)*E^(2*(c + d*x)))])/(4*d^2)
 

Rubi [F]

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 (e+f x) \log (a+b \coth (c+d x)) \, dx\)

\(\Big \downarrow \) 3031

\(\displaystyle \frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}-\frac {\int -\frac {b d (e+f x)^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}dx}{2 f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {b d (e+f x)^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}dx}{2 f}+\frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b d \int \frac {(e+f x)^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}dx}{2 f}+\frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {b d \int \left (\frac {e^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}+\frac {f^2 x^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}+\frac {2 e f x \text {csch}^2(c+d x)}{a+b \coth (c+d x)}\right )dx}{2 f}+\frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b d \left (2 e f \int \frac {x \text {csch}^2(c+d x)}{a+b \coth (c+d x)}dx+f^2 \int \frac {x^2 \text {csch}^2(c+d x)}{a+b \coth (c+d x)}dx-\frac {e^2 \log (a+b \coth (c+d x))}{b d}\right )}{2 f}+\frac {(e+f x)^2 \log (a+b \coth (c+d x))}{2 f}\)

Input:

Int[(e + f*x)*Log[a + b*Coth[c + d*x]],x]
 

Output:

$Aborted
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

rule 3031
Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1) 
*(Log[u]/(b*(m + 1))), x] - Simp[1/(b*(m + 1))   Int[SimplifyIntegrand[(a + 
 b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && InverseFunc 
tionFreeQ[u, x] && NeQ[m, -1]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 7.31 (sec) , antiderivative size = 2535, normalized size of antiderivative = 12.80

method result size
risch \(\text {Expression too large to display}\) \(2535\)

Input:

int((f*x+e)*ln(a+b*coth(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

-e/d*dilog(exp(d*x+c))+1/4/d^2*b*f/(a+b)*polylog(3,(a+b)*exp(2*d*x+2*c)/(a 
-b))+1/4/d^2*a*f/(a+b)*polylog(3,(a+b)*exp(2*d*x+2*c)/(a-b))-1/d*e*a/(a+b) 
*dilog((-exp(d*x+c)*a-b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a+b)*(a-b))^(1/2 
))-1/d*e*a/(a+b)*dilog((exp(d*x+c)*a+b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a 
+b)*(a-b))^(1/2))-1/d*b*e/(a+b)*dilog((-exp(d*x+c)*a-b*exp(d*x+c)+((a+b)*( 
a-b))^(1/2))/((a+b)*(a-b))^(1/2))-1/d*b*e/(a+b)*dilog((exp(d*x+c)*a+b*exp( 
d*x+c)+((a+b)*(a-b))^(1/2))/((a+b)*(a-b))^(1/2))-e*a/(a+b)*ln((-exp(d*x+c) 
*a-b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a+b)*(a-b))^(1/2))*x-e*a/(a+b)*ln(( 
exp(d*x+c)*a+b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a+b)*(a-b))^(1/2))*x-b*e/ 
(a+b)*ln((-exp(d*x+c)*a-b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a+b)*(a-b))^(1 
/2))*x-b*e/(a+b)*ln((exp(d*x+c)*a+b*exp(d*x+c)+((a+b)*(a-b))^(1/2))/((a+b) 
*(a-b))^(1/2))*x+1/2*f/d^2*c^2*ln(exp(d*x+c)-1)+f/d^2*c*dilog(exp(d*x+c))- 
f/d^2*c*dilog(exp(d*x+c)+1)+f/d*polylog(2,-exp(d*x+c))*x+f/d^2*polylog(2,- 
exp(d*x+c))*c+f/d*ln(-exp(d*x+c)+1)*c*x-e/d*c*ln(exp(d*x+c)-1)-1/2*I*Pi*cs 
gn(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c)))/(exp(2*d*x+2*c)-1))*(csgn 
(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c))))*csgn(I/(exp(2*d*x+2*c)-1)) 
-csgn(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c)))/(exp(2*d*x+2*c)-1))*cs 
gn(I/(exp(2*d*x+2*c)-1))-csgn(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c)) 
))*csgn(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c)))/(exp(2*d*x+2*c)-1))+ 
csgn(I*(a*(exp(2*d*x+2*c)-1)+b*(1+exp(2*d*x+2*c)))/(exp(2*d*x+2*c)-1))^...
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 627 vs. \(2 (182) = 364\).

Time = 0.10 (sec) , antiderivative size = 627, normalized size of antiderivative = 3.17 \[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx =\text {Too large to display} \] Input:

integrate((f*x+e)*log(a+b*coth(d*x+c)),x, algorithm="fricas")
 

Output:

-1/2*(2*(d*f*x + d*e)*dilog(sqrt((a + b)/(a - b))*(cosh(d*x + c) + sinh(d* 
x + c))) + 2*(d*f*x + d*e)*dilog(-sqrt((a + b)/(a - b))*(cosh(d*x + c) + s 
inh(d*x + c))) - 2*(d*f*x + d*e)*dilog(cosh(d*x + c) + sinh(d*x + c)) - 2* 
(d*f*x + d*e)*dilog(-cosh(d*x + c) - sinh(d*x + c)) - (2*c*d*e - c^2*f)*lo 
g(2*(a + b)*cosh(d*x + c) + 2*(a + b)*sinh(d*x + c) + 2*(a - b)*sqrt((a + 
b)/(a - b))) - (2*c*d*e - c^2*f)*log(2*(a + b)*cosh(d*x + c) + 2*(a + b)*s 
inh(d*x + c) - 2*(a - b)*sqrt((a + b)/(a - b))) + (d^2*f*x^2 + 2*d^2*e*x + 
 2*c*d*e - c^2*f)*log(sqrt((a + b)/(a - b))*(cosh(d*x + c) + sinh(d*x + c) 
) + 1) + (d^2*f*x^2 + 2*d^2*e*x + 2*c*d*e - c^2*f)*log(-sqrt((a + b)/(a - 
b))*(cosh(d*x + c) + sinh(d*x + c)) + 1) - (d^2*f*x^2 + 2*d^2*e*x)*log((b* 
cosh(d*x + c) + a*sinh(d*x + c))/sinh(d*x + c)) - (d^2*f*x^2 + 2*d^2*e*x)* 
log(cosh(d*x + c) + sinh(d*x + c) + 1) + (2*c*d*e - c^2*f)*log(cosh(d*x + 
c) + sinh(d*x + c) - 1) - (d^2*f*x^2 + 2*d^2*e*x + 2*c*d*e - c^2*f)*log(-c 
osh(d*x + c) - sinh(d*x + c) + 1) - 2*f*polylog(3, sqrt((a + b)/(a - b))*( 
cosh(d*x + c) + sinh(d*x + c))) - 2*f*polylog(3, -sqrt((a + b)/(a - b))*(c 
osh(d*x + c) + sinh(d*x + c))) + 2*f*polylog(3, cosh(d*x + c) + sinh(d*x + 
 c)) + 2*f*polylog(3, -cosh(d*x + c) - sinh(d*x + c)))/d^2
 

Sympy [F]

\[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\int \left (e + f x\right ) \log {\left (a + b \coth {\left (c + d x \right )} \right )}\, dx \] Input:

integrate((f*x+e)*ln(a+b*coth(d*x+c)),x)
 

Output:

Integral((e + f*x)*log(a + b*coth(c + d*x)), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 370 vs. \(2 (182) = 364\).

Time = 0.21 (sec) , antiderivative size = 370, normalized size of antiderivative = 1.87 \[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=-\frac {1}{4} \, b d {\left (\frac {2 \, {\left (2 \, d x \log \left (-\frac {{\left (a e^{\left (2 \, c\right )} + b e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}{a - b} + 1\right ) + {\rm Li}_2\left (\frac {{\left (a e^{\left (2 \, c\right )} + b e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}{a - b}\right )\right )} e}{b d^{2}} - \frac {4 \, {\left (d x \log \left (e^{\left (d x + c\right )} + 1\right ) + {\rm Li}_2\left (-e^{\left (d x + c\right )}\right )\right )} e}{b d^{2}} - \frac {4 \, {\left (d x \log \left (-e^{\left (d x + c\right )} + 1\right ) + {\rm Li}_2\left (e^{\left (d x + c\right )}\right )\right )} e}{b d^{2}} + \frac {{\left (2 \, d^{2} x^{2} \log \left (-\frac {{\left (a e^{\left (2 \, c\right )} + b e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}{a - b} + 1\right ) + 2 \, d x {\rm Li}_2\left (\frac {{\left (a e^{\left (2 \, c\right )} + b e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}{a - b}\right ) - {\rm Li}_{3}(\frac {{\left (a e^{\left (2 \, c\right )} + b e^{\left (2 \, c\right )}\right )} e^{\left (2 \, d x\right )}}{a - b})\right )} f}{b d^{3}} - \frac {2 \, {\left (d^{2} x^{2} \log \left (e^{\left (d x + c\right )} + 1\right ) + 2 \, d x {\rm Li}_2\left (-e^{\left (d x + c\right )}\right ) - 2 \, {\rm Li}_{3}(-e^{\left (d x + c\right )})\right )} f}{b d^{3}} - \frac {2 \, {\left (d^{2} x^{2} \log \left (-e^{\left (d x + c\right )} + 1\right ) + 2 \, d x {\rm Li}_2\left (e^{\left (d x + c\right )}\right ) - 2 \, {\rm Li}_{3}(e^{\left (d x + c\right )})\right )} f}{b d^{3}}\right )} + \frac {1}{2} \, {\left (f x^{2} + 2 \, e x\right )} \log \left (b \coth \left (d x + c\right ) + a\right ) \] Input:

integrate((f*x+e)*log(a+b*coth(d*x+c)),x, algorithm="maxima")
 

Output:

-1/4*b*d*(2*(2*d*x*log(-(a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b) + 1) + d 
ilog((a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b)))*e/(b*d^2) - 4*(d*x*log(e^ 
(d*x + c) + 1) + dilog(-e^(d*x + c)))*e/(b*d^2) - 4*(d*x*log(-e^(d*x + c) 
+ 1) + dilog(e^(d*x + c)))*e/(b*d^2) + (2*d^2*x^2*log(-(a*e^(2*c) + b*e^(2 
*c))*e^(2*d*x)/(a - b) + 1) + 2*d*x*dilog((a*e^(2*c) + b*e^(2*c))*e^(2*d*x 
)/(a - b)) - polylog(3, (a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b)))*f/(b*d 
^3) - 2*(d^2*x^2*log(e^(d*x + c) + 1) + 2*d*x*dilog(-e^(d*x + c)) - 2*poly 
log(3, -e^(d*x + c)))*f/(b*d^3) - 2*(d^2*x^2*log(-e^(d*x + c) + 1) + 2*d*x 
*dilog(e^(d*x + c)) - 2*polylog(3, e^(d*x + c)))*f/(b*d^3)) + 1/2*(f*x^2 + 
 2*e*x)*log(b*coth(d*x + c) + a)
                                                                                    
                                                                                    
 

Giac [F]

\[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\int { {\left (f x + e\right )} \log \left (b \coth \left (d x + c\right ) + a\right ) \,d x } \] Input:

integrate((f*x+e)*log(a+b*coth(d*x+c)),x, algorithm="giac")
 

Output:

integrate((f*x + e)*log(b*coth(d*x + c) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\int \ln \left (a+b\,\mathrm {coth}\left (c+d\,x\right )\right )\,\left (e+f\,x\right ) \,d x \] Input:

int(log(a + b*coth(c + d*x))*(e + f*x),x)
 

Output:

int(log(a + b*coth(c + d*x))*(e + f*x), x)
 

Reduce [F]

\[ \int (e+f x) \log (a+b \coth (c+d x)) \, dx=\left (\int \mathrm {log}\left (\coth \left (d x +c \right ) b +a \right )d x \right ) e +\left (\int \mathrm {log}\left (\coth \left (d x +c \right ) b +a \right ) x d x \right ) f \] Input:

int((f*x+e)*log(a+b*coth(d*x+c)),x)
 

Output:

int(log(coth(c + d*x)*b + a),x)*e + int(log(coth(c + d*x)*b + a)*x,x)*f