\(\int \frac {\tanh ^4(c+d x)}{(a+b \tanh ^2(c+d x))^3} \, dx\) [192]

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

Optimal result

Integrand size = 23, antiderivative size = 137 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\frac {x}{(a+b)^3}-\frac {\left (a^2+6 a b-3 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 \sqrt {a} b^{3/2} (a+b)^3 d}+\frac {a \tanh (c+d x)}{4 b (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {(a+5 b) \tanh (c+d x)}{8 b (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )} \] Output:

x/(a+b)^3-1/8*(a^2+6*a*b-3*b^2)*arctan(b^(1/2)*tanh(d*x+c)/a^(1/2))/a^(1/2 
)/b^(3/2)/(a+b)^3/d+1/4*a*tanh(d*x+c)/b/(a+b)/d/(a+b*tanh(d*x+c)^2)^2-1/8* 
(a+5*b)*tanh(d*x+c)/b/(a+b)^2/d/(a+b*tanh(d*x+c)^2)
 

Mathematica [A] (verified)

Time = 0.74 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.99 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\frac {8 (c+d x)-\frac {\left (a^2+6 a b-3 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}+\frac {4 a (a+b) \sinh (2 (c+d x))}{(a-b+(a+b) \cosh (2 (c+d x)))^2}+\frac {(a-5 b) (a+b) \sinh (2 (c+d x))}{b (a-b+(a+b) \cosh (2 (c+d x)))}}{8 (a+b)^3 d} \] Input:

Integrate[Tanh[c + d*x]^4/(a + b*Tanh[c + d*x]^2)^3,x]
 

Output:

(8*(c + d*x) - ((a^2 + 6*a*b - 3*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[ 
a]])/(Sqrt[a]*b^(3/2)) + (4*a*(a + b)*Sinh[2*(c + d*x)])/(a - b + (a + b)* 
Cosh[2*(c + d*x)])^2 + ((a - 5*b)*(a + b)*Sinh[2*(c + d*x)])/(b*(a - b + ( 
a + b)*Cosh[2*(c + d*x)])))/(8*(a + b)^3*d)
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.15, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {3042, 4153, 372, 402, 25, 27, 397, 218, 219}

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 \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\tanh ^4(c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )^3}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 372

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\int \frac {a-(a+4 b) \tanh ^2(c+d x)}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )^2}d\tanh (c+d x)}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}-\frac {\int -\frac {a \left (-\left ((a+5 b) \tanh ^2(c+d x)\right )+a-3 b\right )}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh (c+d x)}{2 a (a+b)}}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {\int \frac {a \left (-\left ((a+5 b) \tanh ^2(c+d x)\right )+a-3 b\right )}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh (c+d x)}{2 a (a+b)}+\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {\int \frac {-\left ((a+5 b) \tanh ^2(c+d x)\right )+a-3 b}{\left (1-\tanh ^2(c+d x)\right ) \left (b \tanh ^2(c+d x)+a\right )}d\tanh (c+d x)}{2 (a+b)}+\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {\frac {\left (a^2+6 a b-3 b^2\right ) \int \frac {1}{b \tanh ^2(c+d x)+a}d\tanh (c+d x)}{a+b}-\frac {8 b \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{a+b}}{2 (a+b)}+\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {\frac {\left (a^2+6 a b-3 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} (a+b)}-\frac {8 b \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{a+b}}{2 (a+b)}+\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}}{4 b (a+b)}}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\frac {a \tanh (c+d x)}{4 b (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\frac {\frac {\left (a^2+6 a b-3 b^2\right ) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b} (a+b)}-\frac {8 b \text {arctanh}(\tanh (c+d x))}{a+b}}{2 (a+b)}+\frac {(a+5 b) \tanh (c+d x)}{2 (a+b) \left (a+b \tanh ^2(c+d x)\right )}}{4 b (a+b)}}{d}\)

Input:

Int[Tanh[c + d*x]^4/(a + b*Tanh[c + d*x]^2)^3,x]
 

Output:

((a*Tanh[c + d*x])/(4*b*(a + b)*(a + b*Tanh[c + d*x]^2)^2) - ((((a^2 + 6*a 
*b - 3*b^2)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/(Sqrt[a]*Sqrt[b]*(a + 
 b)) - (8*b*ArcTanh[Tanh[c + d*x]])/(a + b))/(2*(a + b)) + ((a + 5*b)*Tanh 
[c + d*x])/(2*(a + b)*(a + b*Tanh[c + d*x]^2)))/(4*b*(a + b)))/d
 

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 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 372
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 
)^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 
))   Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + 
 (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, 
e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a 
, b, c, d, e, m, 2, p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {-\frac {\frac {\left (\frac {1}{8} a^{2}+\frac {3}{4} a b +\frac {5}{8} b^{2}\right ) \tanh \left (d x +c \right )^{3}-\frac {a \left (a^{2}-2 a b -3 b^{2}\right ) \tanh \left (d x +c \right )}{8 b}}{\left (a +b \tanh \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (a^{2}+6 a b -3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 b \sqrt {a b}}}{\left (a +b \right )^{3}}+\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}-\frac {\ln \left (-1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}}{d}\) \(148\)
default \(\frac {-\frac {\frac {\left (\frac {1}{8} a^{2}+\frac {3}{4} a b +\frac {5}{8} b^{2}\right ) \tanh \left (d x +c \right )^{3}-\frac {a \left (a^{2}-2 a b -3 b^{2}\right ) \tanh \left (d x +c \right )}{8 b}}{\left (a +b \tanh \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (a^{2}+6 a b -3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 b \sqrt {a b}}}{\left (a +b \right )^{3}}+\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}-\frac {\ln \left (-1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}}{d}\) \(148\)
risch \(\frac {x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {a^{3} {\mathrm e}^{6 d x +6 c}-9 a^{2} b \,{\mathrm e}^{6 d x +6 c}-5 a \,b^{2} {\mathrm e}^{6 d x +6 c}+5 b^{3} {\mathrm e}^{6 d x +6 c}+3 a^{3} {\mathrm e}^{4 d x +4 c}-17 a^{2} b \,{\mathrm e}^{4 d x +4 c}+13 a \,b^{2} {\mathrm e}^{4 d x +4 c}-15 b^{3} {\mathrm e}^{4 d x +4 c}+3 a^{3} {\mathrm e}^{2 d x +2 c}-11 a^{2} b \,{\mathrm e}^{2 d x +2 c}+a \,b^{2} {\mathrm e}^{2 d x +2 c}+15 b^{3} {\mathrm e}^{2 d x +2 c}+a^{3}-3 a^{2} b -9 a \,b^{2}-5 b^{3}}{4 b \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )^{2} d \left (a^{2}+2 a b +b^{2}\right ) \left (a +b \right )}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right ) a^{2}}{16 \sqrt {-a b}\, \left (a +b \right )^{3} d b}-\frac {3 \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right ) a}{8 \sqrt {-a b}\, \left (a +b \right )^{3} d}+\frac {3 b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{16 \sqrt {-a b}\, \left (a +b \right )^{3} d}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right ) a^{2}}{16 \sqrt {-a b}\, \left (a +b \right )^{3} d b}+\frac {3 \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right ) a}{8 \sqrt {-a b}\, \left (a +b \right )^{3} d}-\frac {3 b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{16 \sqrt {-a b}\, \left (a +b \right )^{3} d}\) \(677\)

Input:

int(tanh(d*x+c)^4/(a+b*tanh(d*x+c)^2)^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(-1/(a+b)^3*(((1/8*a^2+3/4*a*b+5/8*b^2)*tanh(d*x+c)^3-1/8*a*(a^2-2*a*b 
-3*b^2)/b*tanh(d*x+c))/(a+b*tanh(d*x+c)^2)^2+1/8*(a^2+6*a*b-3*b^2)/b/(a*b) 
^(1/2)*arctan(b*tanh(d*x+c)/(a*b)^(1/2)))+1/2/(a+b)^3*ln(1+tanh(d*x+c))-1/ 
2/(a+b)^3*ln(-1+tanh(d*x+c)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3727 vs. \(2 (123) = 246\).

Time = 0.22 (sec) , antiderivative size = 7757, normalized size of antiderivative = 56.62 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

integrate(tanh(d*x+c)^4/(a+b*tanh(d*x+c)^2)^3,x, algorithm="fricas")
 

Output:

Too large to include
 

Sympy [F(-1)]

Timed out. \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Timed out} \] Input:

integrate(tanh(d*x+c)**4/(a+b*tanh(d*x+c)**2)**3,x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2432 vs. \(2 (123) = 246\).

Time = 0.81 (sec) , antiderivative size = 2432, normalized size of antiderivative = 17.75 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

integrate(tanh(d*x+c)^4/(a+b*tanh(d*x+c)^2)^3,x, algorithm="maxima")
 

Output:

-1/128*(a^4 + 24*a^3*b - 54*a^2*b^2 - 16*a*b^3 - 3*b^4)*arctan(1/2*((a + b 
)*e^(2*d*x + 2*c) + a - b)/sqrt(a*b))/((a^5*b + 3*a^4*b^2 + 3*a^3*b^3 + a^ 
2*b^4)*sqrt(a*b)*d) + 1/128*(a^4 + 24*a^3*b - 54*a^2*b^2 - 16*a*b^3 - 3*b^ 
4)*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) + a - b)/sqrt(a*b))/((a^5*b + 3*a^ 
4*b^2 + 3*a^3*b^3 + a^2*b^4)*sqrt(a*b)*d) - 1/64*(a^5 - 33*a^4*b - 54*a^3* 
b^2 - 2*a^2*b^3 + 21*a*b^4 + 3*b^5 + (a^5 - 71*a^4*b + 98*a^3*b^2 + 154*a^ 
2*b^3 - 19*a*b^4 - 3*b^5)*e^(6*d*x + 6*c) + (3*a^5 - 171*a^4*b + 310*a^3*b 
^2 - 254*a^2*b^3 + 39*a*b^4 + 9*b^5)*e^(4*d*x + 4*c) + (3*a^5 - 133*a^4*b 
+ 86*a^3*b^2 + 190*a^2*b^3 - 41*a*b^4 - 9*b^5)*e^(2*d*x + 2*c))/((a^7*b + 
5*a^6*b^2 + 10*a^5*b^3 + 10*a^4*b^4 + 5*a^3*b^5 + a^2*b^6 + (a^7*b + 5*a^6 
*b^2 + 10*a^5*b^3 + 10*a^4*b^4 + 5*a^3*b^5 + a^2*b^6)*e^(8*d*x + 8*c) + 4* 
(a^7*b + 3*a^6*b^2 + 2*a^5*b^3 - 2*a^4*b^4 - 3*a^3*b^5 - a^2*b^6)*e^(6*d*x 
 + 6*c) + 2*(3*a^7*b + 7*a^6*b^2 + 6*a^5*b^3 + 6*a^4*b^4 + 7*a^3*b^5 + 3*a 
^2*b^6)*e^(4*d*x + 4*c) + 4*(a^7*b + 3*a^6*b^2 + 2*a^5*b^3 - 2*a^4*b^4 - 3 
*a^3*b^5 - a^2*b^6)*e^(2*d*x + 2*c))*d) + 1/64*(a^5 - 33*a^4*b - 54*a^3*b^ 
2 - 2*a^2*b^3 + 21*a*b^4 + 3*b^5 + (3*a^5 - 133*a^4*b + 86*a^3*b^2 + 190*a 
^2*b^3 - 41*a*b^4 - 9*b^5)*e^(-2*d*x - 2*c) + (3*a^5 - 171*a^4*b + 310*a^3 
*b^2 - 254*a^2*b^3 + 39*a*b^4 + 9*b^5)*e^(-4*d*x - 4*c) + (a^5 - 71*a^4*b 
+ 98*a^3*b^2 + 154*a^2*b^3 - 19*a*b^4 - 3*b^5)*e^(-6*d*x - 6*c))/((a^7*b + 
 5*a^6*b^2 + 10*a^5*b^3 + 10*a^4*b^4 + 5*a^3*b^5 + a^2*b^6 + 4*(a^7*b +...
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 384 vs. \(2 (123) = 246\).

Time = 0.29 (sec) , antiderivative size = 384, normalized size of antiderivative = 2.80 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=-\frac {\frac {{\left (a^{2} + 6 \, a b - 3 \, b^{2}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{{\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} \sqrt {a b}} - \frac {8 \, {\left (d x + c\right )}}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (a^{3} e^{\left (6 \, d x + 6 \, c\right )} - 9 \, a^{2} b e^{\left (6 \, d x + 6 \, c\right )} - 5 \, a b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 5 \, b^{3} e^{\left (6 \, d x + 6 \, c\right )} + 3 \, a^{3} e^{\left (4 \, d x + 4 \, c\right )} - 17 \, a^{2} b e^{\left (4 \, d x + 4 \, c\right )} + 13 \, a b^{2} e^{\left (4 \, d x + 4 \, c\right )} - 15 \, b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 3 \, a^{3} e^{\left (2 \, d x + 2 \, c\right )} - 11 \, a^{2} b e^{\left (2 \, d x + 2 \, c\right )} + a b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 15 \, b^{3} e^{\left (2 \, d x + 2 \, c\right )} + a^{3} - 3 \, a^{2} b - 9 \, a b^{2} - 5 \, b^{3}\right )}}{{\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}^{2}}}{8 \, d} \] Input:

integrate(tanh(d*x+c)^4/(a+b*tanh(d*x+c)^2)^3,x, algorithm="giac")
 

Output:

-1/8*((a^2 + 6*a*b - 3*b^2)*arctan(1/2*(a*e^(2*d*x + 2*c) + b*e^(2*d*x + 2 
*c) + a - b)/sqrt(a*b))/((a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*sqrt(a*b)) - 
8*(d*x + c)/(a^3 + 3*a^2*b + 3*a*b^2 + b^3) + 2*(a^3*e^(6*d*x + 6*c) - 9*a 
^2*b*e^(6*d*x + 6*c) - 5*a*b^2*e^(6*d*x + 6*c) + 5*b^3*e^(6*d*x + 6*c) + 3 
*a^3*e^(4*d*x + 4*c) - 17*a^2*b*e^(4*d*x + 4*c) + 13*a*b^2*e^(4*d*x + 4*c) 
 - 15*b^3*e^(4*d*x + 4*c) + 3*a^3*e^(2*d*x + 2*c) - 11*a^2*b*e^(2*d*x + 2* 
c) + a*b^2*e^(2*d*x + 2*c) + 15*b^3*e^(2*d*x + 2*c) + a^3 - 3*a^2*b - 9*a* 
b^2 - 5*b^3)/((a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*(a*e^(4*d*x + 4*c) + b*e 
^(4*d*x + 4*c) + 2*a*e^(2*d*x + 2*c) - 2*b*e^(2*d*x + 2*c) + a + b)^2))/d
 

Mupad [B] (verification not implemented)

Time = 2.90 (sec) , antiderivative size = 2574, normalized size of antiderivative = 18.79 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

int(tanh(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3,x)
 

Output:

log(tanh(c + d*x) + 1)/(2*a^3*d + 2*b^3*d + 6*a*b^2*d + 6*a^2*b*d) - ((tan 
h(c + d*x)^3*(a + 5*b))/(8*(2*a*b + a^2 + b^2)) - (a*tanh(c + d*x)*(a - 3* 
b))/(8*b*(2*a*b + a^2 + b^2)))/(a^2*d + b^2*d*tanh(c + d*x)^4 + 2*a*b*d*ta 
nh(c + d*x)^2) - log(tanh(c + d*x) - 1)/(2*d*(a + b)^3) - (atan(((((tanh(c 
 + d*x)*(12*a^3*b - 36*a*b^3 + a^4 + 73*b^4 + 30*a^2*b^2))/(32*(b^5*d^2 + 
4*a*b^4*d^2 + a^4*b*d^2 + 6*a^2*b^3*d^2 + 4*a^3*b^2*d^2)) + (((96*b^9*d^2 
+ 544*a*b^8*d^2 + 1248*a^2*b^7*d^2 + 1440*a^3*b^6*d^2 + 800*a^4*b^5*d^2 + 
96*a^5*b^4*d^2 - 96*a^6*b^3*d^2 - 32*a^7*b^2*d^2)/(64*(b^7*d^3 + 6*a*b^6*d 
^3 + a^6*b*d^3 + 15*a^2*b^5*d^3 + 20*a^3*b^4*d^3 + 15*a^4*b^3*d^3 + 6*a^5* 
b^2*d^3)) - (tanh(c + d*x)*(-a*b^3)^(1/2)*(6*a*b + a^2 - 3*b^2)*(256*b^10* 
d^2 + 1280*a*b^9*d^2 + 2304*a^2*b^8*d^2 + 1280*a^3*b^7*d^2 - 1280*a^4*b^6* 
d^2 - 2304*a^5*b^5*d^2 - 1280*a^6*b^4*d^2 - 256*a^7*b^3*d^2))/(512*(3*a^2* 
b^5*d + 3*a^3*b^4*d + a^4*b^3*d + a*b^6*d)*(b^5*d^2 + 4*a*b^4*d^2 + a^4*b* 
d^2 + 6*a^2*b^3*d^2 + 4*a^3*b^2*d^2)))*(-a*b^3)^(1/2)*(6*a*b + a^2 - 3*b^2 
))/(16*(3*a^2*b^5*d + 3*a^3*b^4*d + a^4*b^3*d + a*b^6*d)))*(-a*b^3)^(1/2)* 
(6*a*b + a^2 - 3*b^2)*1i)/(16*(3*a^2*b^5*d + 3*a^3*b^4*d + a^4*b^3*d + a*b 
^6*d)) + (((tanh(c + d*x)*(12*a^3*b - 36*a*b^3 + a^4 + 73*b^4 + 30*a^2*b^2 
))/(32*(b^5*d^2 + 4*a*b^4*d^2 + a^4*b*d^2 + 6*a^2*b^3*d^2 + 4*a^3*b^2*d^2) 
) - (((96*b^9*d^2 + 544*a*b^8*d^2 + 1248*a^2*b^7*d^2 + 1440*a^3*b^6*d^2 + 
800*a^4*b^5*d^2 + 96*a^5*b^4*d^2 - 96*a^6*b^3*d^2 - 32*a^7*b^2*d^2)/(64...
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 580, normalized size of antiderivative = 4.23 \[ \int \frac {\tanh ^4(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx =\text {Too large to display} \] Input:

int(tanh(d*x+c)^4/(a+b*tanh(d*x+c)^2)^3,x)
 

Output:

( - sqrt(b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*tanh(c + d*x 
)**4*a**2*b**2 - 6*sqrt(b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a) 
))*tanh(c + d*x)**4*a*b**3 + 3*sqrt(b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqr 
t(b)*sqrt(a)))*tanh(c + d*x)**4*b**4 - 2*sqrt(b)*sqrt(a)*atan((tanh(c + d* 
x)*b)/(sqrt(b)*sqrt(a)))*tanh(c + d*x)**2*a**3*b - 12*sqrt(b)*sqrt(a)*atan 
((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*tanh(c + d*x)**2*a**2*b**2 + 6*sqrt( 
b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*tanh(c + d*x)**2*a*b* 
*3 - sqrt(b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*a**4 - 6*sq 
rt(b)*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*a**3*b + 3*sqrt(b) 
*sqrt(a)*atan((tanh(c + d*x)*b)/(sqrt(b)*sqrt(a)))*a**2*b**2 + 8*tanh(c + 
d*x)**4*a*b**4*d*x - tanh(c + d*x)**3*a**3*b**2 - 6*tanh(c + d*x)**3*a**2* 
b**3 - 5*tanh(c + d*x)**3*a*b**4 + 16*tanh(c + d*x)**2*a**2*b**3*d*x + tan 
h(c + d*x)*a**4*b - 2*tanh(c + d*x)*a**3*b**2 - 3*tanh(c + d*x)*a**2*b**3 
+ 8*a**3*b**2*d*x)/(8*a*b**2*d*(tanh(c + d*x)**4*a**3*b**2 + 3*tanh(c + d* 
x)**4*a**2*b**3 + 3*tanh(c + d*x)**4*a*b**4 + tanh(c + d*x)**4*b**5 + 2*ta 
nh(c + d*x)**2*a**4*b + 6*tanh(c + d*x)**2*a**3*b**2 + 6*tanh(c + d*x)**2* 
a**2*b**3 + 2*tanh(c + d*x)**2*a*b**4 + a**5 + 3*a**4*b + 3*a**3*b**2 + a* 
*2*b**3))