\(\int (e+f x)^3 \log (a+b \tanh (c+d x)) \, dx\) [33]

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

Optimal result

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

1/4*(f*x+e)^4*ln(1+exp(2*d*x+2*c))/f-1/4*(f*x+e)^4*ln(1+(a+b)*exp(2*d*x+2* 
c)/(a-b))/f+1/4*(f*x+e)^4*ln(a+b*tanh(d*x+c))/f+1/2*(f*x+e)^3*polylog(2,-e 
xp(2*d*x+2*c))/d-1/2*(f*x+e)^3*polylog(2,-(a+b)*exp(2*d*x+2*c)/(a-b))/d-3/ 
4*f*(f*x+e)^2*polylog(3,-exp(2*d*x+2*c))/d^2+3/4*f*(f*x+e)^2*polylog(3,-(a 
+b)*exp(2*d*x+2*c)/(a-b))/d^2+3/4*f^2*(f*x+e)*polylog(4,-exp(2*d*x+2*c))/d 
^3-3/4*f^2*(f*x+e)*polylog(4,-(a+b)*exp(2*d*x+2*c)/(a-b))/d^3-3/8*f^3*poly 
log(5,-exp(2*d*x+2*c))/d^4+3/8*f^3*polylog(5,-(a+b)*exp(2*d*x+2*c)/(a-b))/ 
d^4
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(691\) vs. \(2(341)=682\).

Time = 4.61 (sec) , antiderivative size = 691, normalized size of antiderivative = 2.03 \[ \int (e+f x)^3 \log (a+b \tanh (c+d x)) \, dx=\frac {8 d^4 e^3 x \log \left (1+e^{-2 (c+d x)}\right )+12 d^4 e^2 f x^2 \log \left (1+e^{-2 (c+d x)}\right )+8 d^4 e f^2 x^3 \log \left (1+e^{-2 (c+d x)}\right )+2 d^4 f^3 x^4 \log \left (1+e^{-2 (c+d x)}\right )-8 d^4 e^3 x \log \left (1+\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )-12 d^4 e^2 f x^2 \log \left (1+\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )-8 d^4 e f^2 x^3 \log \left (1+\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )-2 d^4 f^3 x^4 \log \left (1+\frac {(a-b) e^{-2 (c+d x)}}{a+b}\right )+8 d^4 e^3 x \log (a+b \tanh (c+d x))+12 d^4 e^2 f x^2 \log (a+b \tanh (c+d x))+8 d^4 e f^2 x^3 \log (a+b \tanh (c+d x))+2 d^4 f^3 x^4 \log (a+b \tanh (c+d x))-4 d^3 (e+f x)^3 \operatorname {PolyLog}\left (2,-e^{-2 (c+d x)}\right )+4 d^3 (e+f x)^3 \operatorname {PolyLog}\left (2,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )-6 d^2 e^2 f \operatorname {PolyLog}\left (3,-e^{-2 (c+d x)}\right )-12 d^2 e f^2 x \operatorname {PolyLog}\left (3,-e^{-2 (c+d x)}\right )-6 d^2 f^3 x^2 \operatorname {PolyLog}\left (3,-e^{-2 (c+d x)}\right )+6 d^2 e^2 f \operatorname {PolyLog}\left (3,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )+12 d^2 e f^2 x \operatorname {PolyLog}\left (3,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )+6 d^2 f^3 x^2 \operatorname {PolyLog}\left (3,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )-6 d e f^2 \operatorname {PolyLog}\left (4,-e^{-2 (c+d x)}\right )-6 d f^3 x \operatorname {PolyLog}\left (4,-e^{-2 (c+d x)}\right )+6 d e f^2 \operatorname {PolyLog}\left (4,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )+6 d f^3 x \operatorname {PolyLog}\left (4,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )-3 f^3 \operatorname {PolyLog}\left (5,-e^{-2 (c+d x)}\right )+3 f^3 \operatorname {PolyLog}\left (5,\frac {(-a+b) e^{-2 (c+d x)}}{a+b}\right )}{8 d^4} \] Input:

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

Output:

(8*d^4*e^3*x*Log[1 + E^(-2*(c + d*x))] + 12*d^4*e^2*f*x^2*Log[1 + E^(-2*(c 
 + d*x))] + 8*d^4*e*f^2*x^3*Log[1 + E^(-2*(c + d*x))] + 2*d^4*f^3*x^4*Log[ 
1 + E^(-2*(c + d*x))] - 8*d^4*e^3*x*Log[1 + (a - b)/((a + b)*E^(2*(c + d*x 
)))] - 12*d^4*e^2*f*x^2*Log[1 + (a - b)/((a + b)*E^(2*(c + d*x)))] - 8*d^4 
*e*f^2*x^3*Log[1 + (a - b)/((a + b)*E^(2*(c + d*x)))] - 2*d^4*f^3*x^4*Log[ 
1 + (a - b)/((a + b)*E^(2*(c + d*x)))] + 8*d^4*e^3*x*Log[a + b*Tanh[c + d* 
x]] + 12*d^4*e^2*f*x^2*Log[a + b*Tanh[c + d*x]] + 8*d^4*e*f^2*x^3*Log[a + 
b*Tanh[c + d*x]] + 2*d^4*f^3*x^4*Log[a + b*Tanh[c + d*x]] - 4*d^3*(e + f*x 
)^3*PolyLog[2, -E^(-2*(c + d*x))] + 4*d^3*(e + f*x)^3*PolyLog[2, (-a + b)/ 
((a + b)*E^(2*(c + d*x)))] - 6*d^2*e^2*f*PolyLog[3, -E^(-2*(c + d*x))] - 1 
2*d^2*e*f^2*x*PolyLog[3, -E^(-2*(c + d*x))] - 6*d^2*f^3*x^2*PolyLog[3, -E^ 
(-2*(c + d*x))] + 6*d^2*e^2*f*PolyLog[3, (-a + b)/((a + b)*E^(2*(c + d*x)) 
)] + 12*d^2*e*f^2*x*PolyLog[3, (-a + b)/((a + b)*E^(2*(c + d*x)))] + 6*d^2 
*f^3*x^2*PolyLog[3, (-a + b)/((a + b)*E^(2*(c + d*x)))] - 6*d*e*f^2*PolyLo 
g[4, -E^(-2*(c + d*x))] - 6*d*f^3*x*PolyLog[4, -E^(-2*(c + d*x))] + 6*d*e* 
f^2*PolyLog[4, (-a + b)/((a + b)*E^(2*(c + d*x)))] + 6*d*f^3*x*PolyLog[4, 
(-a + b)/((a + b)*E^(2*(c + d*x)))] - 3*f^3*PolyLog[5, -E^(-2*(c + d*x))] 
+ 3*f^3*PolyLog[5, (-a + b)/((a + b)*E^(2*(c + d*x)))])/(8*d^4)
 

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)^3 \log (a+b \tanh (c+d x)) \, dx\)

\(\Big \downarrow \) 3031

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 7293

\(\displaystyle \frac {(e+f x)^4 \log (a+b \tanh (c+d x))}{4 f}-\frac {b d \int \left (\frac {\text {sech}^2(c+d x) e^4}{a+b \tanh (c+d x)}+\frac {4 f x \text {sech}^2(c+d x) e^3}{a+b \tanh (c+d x)}+\frac {6 f^2 x^2 \text {sech}^2(c+d x) e^2}{a+b \tanh (c+d x)}+\frac {4 f^3 x^3 \text {sech}^2(c+d x) e}{a+b \tanh (c+d x)}+\frac {f^4 x^4 \text {sech}^2(c+d x)}{a+b \tanh (c+d x)}\right )dx}{4 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(e+f x)^4 \log (a+b \tanh (c+d x))}{4 f}-\frac {b d \left (4 e^3 f \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh (c+d x)}dx+6 e^2 f^2 \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh (c+d x)}dx+4 e f^3 \int \frac {x^3 \text {sech}^2(c+d x)}{a+b \tanh (c+d x)}dx+f^4 \int \frac {x^4 \text {sech}^2(c+d x)}{a+b \tanh (c+d x)}dx+\frac {e^4 \log (a+b \tanh (c+d x))}{b d}\right )}{4 f}\)

Input:

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

Output:

$Aborted
 

Defintions of rubi rules used

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 = 9.52 (sec) , antiderivative size = 6316, normalized size of antiderivative = 18.52

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

Input:

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

Output:

result too large to display
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.17 (sec) , antiderivative size = 1567, normalized size of antiderivative = 4.60 \[ \int (e+f x)^3 \log (a+b \tanh (c+d x)) \, dx=\text {Too large to display} \] Input:

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

Output:

1/4*(24*f^3*polylog(5, sqrt(-(a + b)/(a - b))*(cosh(d*x + c) + sinh(d*x + 
c))) + 24*f^3*polylog(5, -sqrt(-(a + b)/(a - b))*(cosh(d*x + c) + sinh(d*x 
 + c))) - 24*f^3*polylog(5, I*cosh(d*x + c) + I*sinh(d*x + c)) - 24*f^3*po 
lylog(5, -I*cosh(d*x + c) - I*sinh(d*x + c)) - 4*(d^3*f^3*x^3 + 3*d^3*e*f^ 
2*x^2 + 3*d^3*e^2*f*x + d^3*e^3)*dilog(sqrt(-(a + b)/(a - b))*(cosh(d*x + 
c) + sinh(d*x + c))) - 4*(d^3*f^3*x^3 + 3*d^3*e*f^2*x^2 + 3*d^3*e^2*f*x + 
d^3*e^3)*dilog(-sqrt(-(a + b)/(a - b))*(cosh(d*x + c) + sinh(d*x + c))) + 
4*(d^3*f^3*x^3 + 3*d^3*e*f^2*x^2 + 3*d^3*e^2*f*x + d^3*e^3)*dilog(I*cosh(d 
*x + c) + I*sinh(d*x + c)) + 4*(d^3*f^3*x^3 + 3*d^3*e*f^2*x^2 + 3*d^3*e^2* 
f*x + d^3*e^3)*dilog(-I*cosh(d*x + c) - I*sinh(d*x + c)) + (4*c*d^3*e^3 - 
6*c^2*d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^3)*log(2*(a + b)*cosh(d*x + c) + 2 
*(a + b)*sinh(d*x + c) + 2*(a - b)*sqrt(-(a + b)/(a - b))) + (4*c*d^3*e^3 
- 6*c^2*d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^3)*log(2*(a + b)*cosh(d*x + c) + 
 2*(a + b)*sinh(d*x + c) - 2*(a - b)*sqrt(-(a + b)/(a - b))) - (d^4*f^3*x^ 
4 + 4*d^4*e*f^2*x^3 + 6*d^4*e^2*f*x^2 + 4*d^4*e^3*x + 4*c*d^3*e^3 - 6*c^2* 
d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^3)*log(sqrt(-(a + b)/(a - b))*(cosh(d*x 
+ c) + sinh(d*x + c)) + 1) - (d^4*f^3*x^4 + 4*d^4*e*f^2*x^3 + 6*d^4*e^2*f* 
x^2 + 4*d^4*e^3*x + 4*c*d^3*e^3 - 6*c^2*d^2*e^2*f + 4*c^3*d*e*f^2 - c^4*f^ 
3)*log(-sqrt(-(a + b)/(a - b))*(cosh(d*x + c) + sinh(d*x + c)) + 1) + (d^4 
*f^3*x^4 + 4*d^4*e*f^2*x^3 + 6*d^4*e^2*f*x^2 + 4*d^4*e^3*x)*log((a*cosh...
 

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 867 vs. \(2 (317) = 634\).

Time = 0.24 (sec) , antiderivative size = 867, normalized size of antiderivative = 2.54 \[ \int (e+f x)^3 \log (a+b \tanh (c+d x)) \, dx=\text {Too large to display} \] Input:

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

Output:

-1/12*b*d*(6*(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^3/(b*d^2) - 6*(2*d*x*l 
og(e^(2*d*x + 2*c) + 1) + dilog(-e^(2*d*x + 2*c)))*e^3/(b*d^2) + 9*(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)))*e^2*f/(b*d^3) - 9*(2*d^2*x^2*log(e^(2*d*x + 2*c) + 
1) + 2*d*x*dilog(-e^(2*d*x + 2*c)) - polylog(3, -e^(2*d*x + 2*c)))*e^2*f/( 
b*d^3) + 4*(4*d^3*x^3*log((a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b) + 1) + 
 6*d^2*x^2*dilog(-(a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b)) - 6*d*x*polyl 
og(3, -(a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b)) + 3*polylog(4, -(a*e^(2* 
c) + b*e^(2*c))*e^(2*d*x)/(a - b)))*e*f^2/(b*d^4) - 4*(4*d^3*x^3*log(e^(2* 
d*x + 2*c) + 1) + 6*d^2*x^2*dilog(-e^(2*d*x + 2*c)) - 6*d*x*polylog(3, -e^ 
(2*d*x + 2*c)) + 3*polylog(4, -e^(2*d*x + 2*c)))*e*f^2/(b*d^4) + 3*(2*d^4* 
x^4*log((a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b) + 1) + 4*d^3*x^3*dilog(- 
(a*e^(2*c) + b*e^(2*c))*e^(2*d*x)/(a - b)) - 6*d^2*x^2*polylog(3, -(a*e^(2 
*c) + b*e^(2*c))*e^(2*d*x)/(a - b)) + 6*d*x*polylog(4, -(a*e^(2*c) + b*e^( 
2*c))*e^(2*d*x)/(a - b)) - 3*polylog(5, -(a*e^(2*c) + b*e^(2*c))*e^(2*d*x) 
/(a - b)))*f^3/(b*d^5) - 3*(2*d^4*x^4*log(e^(2*d*x + 2*c) + 1) + 4*d^3*x^3 
*dilog(-e^(2*d*x + 2*c)) - 6*d^2*x^2*polylog(3, -e^(2*d*x + 2*c)) + 6*d*x* 
polylog(4, -e^(2*d*x + 2*c)) - 3*polylog(5, -e^(2*d*x + 2*c)))*f^3/(b*d...
 

Giac [F]

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

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

Output:

integrate((f*x + e)^3*log(b*tanh(d*x + c) + a), x)
 

Mupad [F(-1)]

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

int(log(a + b*tanh(c + d*x))*(e + f*x)^3,x)
 

Output:

int(log(a + b*tanh(c + d*x))*(e + f*x)^3, x)
 

Reduce [F]

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

int((f*x+e)^3*log(a+b*tanh(d*x+c)),x)
 

Output:

int(log(tanh(c + d*x)*b + a),x)*e**3 + int(log(tanh(c + d*x)*b + a)*x**3,x 
)*f**3 + 3*int(log(tanh(c + d*x)*b + a)*x**2,x)*e*f**2 + 3*int(log(tanh(c 
+ d*x)*b + a)*x,x)*e**2*f