Integrand size = 23, antiderivative size = 59 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=(a+b)^3 x-\frac {a^3 \coth (c+d x)}{d}-\frac {b^2 (3 a+b) \tanh (c+d x)}{d}-\frac {b^3 \tanh ^3(c+d x)}{3 d} \] Output:
(a+b)^3*x-a^3*coth(d*x+c)/d-b^2*(3*a+b)*tanh(d*x+c)/d-1/3*b^3*tanh(d*x+c)^ 3/d
Time = 1.56 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.37 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {\tanh (c+d x) \left (-3 a^3 \coth ^2(c+d x)+3 (a+b)^3 \text {arctanh}\left (\sqrt {\coth ^2(c+d x)}\right ) \sqrt {\coth ^2(c+d x)}-b^2 \left (9 a+3 b+b \tanh ^2(c+d x)\right )\right )}{3 d} \] Input:
Integrate[Coth[c + d*x]^2*(a + b*Tanh[c + d*x]^2)^3,x]
Output:
(Tanh[c + d*x]*(-3*a^3*Coth[c + d*x]^2 + 3*(a + b)^3*ArcTanh[Sqrt[Coth[c + d*x]^2]]*Sqrt[Coth[c + d*x]^2] - b^2*(9*a + 3*b + b*Tanh[c + d*x]^2)))/(3 *d)
Time = 0.51 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 25, 4153, 25, 364, 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 \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\left (a-b \tan (i c+i d x)^2\right )^3}{\tan (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (a-b \tan (i c+i d x)^2\right )^3}{\tan (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle -\frac {\int -\frac {\coth ^2(c+d x) \left (b \tanh ^2(c+d x)+a\right )^3}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\coth ^2(c+d x) \left (b \tanh ^2(c+d x)+a\right )^3}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 364 |
\(\displaystyle \frac {\int \left (\coth ^2(c+d x) a^3-b^3 \tanh ^2(c+d x)-b^2 (3 a+b)-\frac {(a+b)^3}{\tanh ^2(c+d x)-1}\right )d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^3 \coth (c+d x)-(a+b)^3 \text {arctanh}(\tanh (c+d x))+b^2 (3 a+b) \tanh (c+d x)+\frac {1}{3} b^3 \tanh ^3(c+d x)}{d}\) |
Input:
Int[Coth[c + d*x]^2*(a + b*Tanh[c + d*x]^2)^3,x]
Output:
-((-((a + b)^3*ArcTanh[Tanh[c + d*x]]) + a^3*Coth[c + d*x] + b^2*(3*a + b) *Tanh[c + d*x] + (b^3*Tanh[c + d*x]^3)/3)/d)
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x ] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In tegerQ[m] || IGtQ[2*(m + 1), 0] || !RationalQ[m])
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]))
Time = 0.15 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00
method | result | size |
parallelrisch | \(\frac {-b^{3} \tanh \left (d x +c \right )^{3}+\left (-9 a \,b^{2}-3 b^{3}\right ) \tanh \left (d x +c \right )-3 \coth \left (d x +c \right ) a^{3}+3 d x \left (a +b \right )^{3}}{3 d}\) | \(59\) |
derivativedivides | \(-\frac {\frac {b^{3} \tanh \left (d x +c \right )^{3}}{3}+3 a \,b^{2} \tanh \left (d x +c \right )+b^{3} \tanh \left (d x +c \right )+\left (-\frac {1}{2} a^{3}-\frac {3}{2} a^{2} b -\frac {3}{2} a \,b^{2}-\frac {1}{2} b^{3}\right ) \ln \left (1+\tanh \left (d x +c \right )\right )+\frac {a^{3}}{\tanh \left (d x +c \right )}+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (-1+\tanh \left (d x +c \right )\right )}{d}\) | \(120\) |
default | \(-\frac {\frac {b^{3} \tanh \left (d x +c \right )^{3}}{3}+3 a \,b^{2} \tanh \left (d x +c \right )+b^{3} \tanh \left (d x +c \right )+\left (-\frac {1}{2} a^{3}-\frac {3}{2} a^{2} b -\frac {3}{2} a \,b^{2}-\frac {1}{2} b^{3}\right ) \ln \left (1+\tanh \left (d x +c \right )\right )+\frac {a^{3}}{\tanh \left (d x +c \right )}+\left (\frac {1}{2} a^{3}+\frac {3}{2} a^{2} b +\frac {3}{2} a \,b^{2}+\frac {1}{2} b^{3}\right ) \ln \left (-1+\tanh \left (d x +c \right )\right )}{d}\) | \(120\) |
risch | \(a^{3} x +3 a^{2} b x +3 a \,b^{2} x +b^{3} x -\frac {2 \left (3 a^{3} {\mathrm e}^{6 d x +6 c}-9 a \,b^{2} {\mathrm e}^{6 d x +6 c}-6 b^{3} {\mathrm e}^{6 d x +6 c}+9 a^{3} {\mathrm e}^{4 d x +4 c}-9 a \,b^{2} {\mathrm e}^{4 d x +4 c}+9 a^{3} {\mathrm e}^{2 d x +2 c}+9 a \,b^{2} {\mathrm e}^{2 d x +2 c}+2 b^{3} {\mathrm e}^{2 d x +2 c}+3 a^{3}+9 a \,b^{2}+4 b^{3}\right )}{3 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{3} \left ({\mathrm e}^{2 d x +2 c}-1\right )}\) | \(189\) |
Input:
int(coth(d*x+c)^2*(a+b*tanh(d*x+c)^2)^3,x,method=_RETURNVERBOSE)
Output:
1/3*(-b^3*tanh(d*x+c)^3+(-9*a*b^2-3*b^3)*tanh(d*x+c)-3*coth(d*x+c)*a^3+3*d *x*(a+b)^3)/d
Leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (57) = 114\).
Time = 0.10 (sec) , antiderivative size = 341, normalized size of antiderivative = 5.78 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=-\frac {{\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3}\right )} \cosh \left (d x + c\right )^{4} - 4 \, {\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d x\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3}\right )} \sinh \left (d x + c\right )^{4} + 9 \, a^{3} - 9 \, a b^{2} + 4 \, {\left (3 \, a^{3} - b^{3}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (6 \, a^{3} - 2 \, b^{3} + 3 \, {\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3}\right )} \cosh \left (d x + c\right )^{2}\right )} \sinh \left (d x + c\right )^{2} - 4 \, {\left ({\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d x\right )} \cosh \left (d x + c\right )^{3} + {\left (3 \, a^{3} + 9 \, a b^{2} + 4 \, b^{3} + 3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d x\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{12 \, {\left (d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )}} \] Input:
integrate(coth(d*x+c)^2*(a+b*tanh(d*x+c)^2)^3,x, algorithm="fricas")
Output:
-1/12*((3*a^3 + 9*a*b^2 + 4*b^3)*cosh(d*x + c)^4 - 4*(3*a^3 + 9*a*b^2 + 4* b^3 + 3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)*sinh(d*x + c)^3 + (3*a^3 + 9*a*b^2 + 4*b^3)*sinh(d*x + c)^4 + 9*a^3 - 9*a*b^2 + 4*(3*a^3 - b^3)*cosh(d*x + c)^2 + 2*(6*a^3 - 2*b^3 + 3*(3*a^3 + 9*a*b^2 + 4*b^3)*co sh(d*x + c)^2)*sinh(d*x + c)^2 - 4*((3*a^3 + 9*a*b^2 + 4*b^3 + 3*(a^3 + 3* a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c)^3 + (3*a^3 + 9*a*b^2 + 4*b^3 + 3 *(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*x)*cosh(d*x + c))*sinh(d*x + c))/(d*cos h(d*x + c)*sinh(d*x + c)^3 + (d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d* x + c))
\[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{3} \coth ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(coth(d*x+c)**2*(a+b*tanh(d*x+c)**2)**3,x)
Output:
Integral((a + b*tanh(c + d*x)**2)**3*coth(c + d*x)**2, x)
Leaf count of result is larger than twice the leaf count of optimal. 147 vs. \(2 (57) = 114\).
Time = 0.05 (sec) , antiderivative size = 147, normalized size of antiderivative = 2.49 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {1}{3} \, b^{3} {\left (3 \, x + \frac {3 \, c}{d} - \frac {4 \, {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + 2\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + 3 \, a b^{2} {\left (x + \frac {c}{d} - \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + a^{3} {\left (x + \frac {c}{d} + \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} + 3 \, a^{2} b x \] Input:
integrate(coth(d*x+c)^2*(a+b*tanh(d*x+c)^2)^3,x, algorithm="maxima")
Output:
1/3*b^3*(3*x + 3*c/d - 4*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + 2)/(d* (3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1))) + 3*a*b ^2*(x + c/d - 2/(d*(e^(-2*d*x - 2*c) + 1))) + a^3*(x + c/d + 2/(d*(e^(-2*d *x - 2*c) - 1))) + 3*a^2*b*x
Leaf count of result is larger than twice the leaf count of optimal. 135 vs. \(2 (57) = 114\).
Time = 0.24 (sec) , antiderivative size = 135, normalized size of antiderivative = 2.29 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {3 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} {\left (d x + c\right )} - \frac {6 \, a^{3}}{e^{\left (2 \, d x + 2 \, c\right )} - 1} + \frac {2 \, {\left (9 \, a b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 6 \, b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 18 \, a b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b^{3} e^{\left (2 \, d x + 2 \, c\right )} + 9 \, a b^{2} + 4 \, b^{3}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}}{3 \, d} \] Input:
integrate(coth(d*x+c)^2*(a+b*tanh(d*x+c)^2)^3,x, algorithm="giac")
Output:
1/3*(3*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(d*x + c) - 6*a^3/(e^(2*d*x + 2*c) - 1) + 2*(9*a*b^2*e^(4*d*x + 4*c) + 6*b^3*e^(4*d*x + 4*c) + 18*a*b^2*e^(2* d*x + 2*c) + 6*b^3*e^(2*d*x + 2*c) + 9*a*b^2 + 4*b^3)/(e^(2*d*x + 2*c) + 1 )^3)/d
Time = 2.83 (sec) , antiderivative size = 218, normalized size of antiderivative = 3.69 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=x\,{\left (a+b\right )}^3+\frac {\frac {2\,a\,b^2}{d}+\frac {2\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (2\,b^3+3\,a\,b^2\right )}{3\,d}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}+\frac {\frac {2\,\left (2\,b^3+3\,a\,b^2\right )}{3\,d}+\frac {2\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (2\,b^3+3\,a\,b^2\right )}{3\,d}+\frac {4\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}}{d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1}-\frac {2\,a^3}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}+\frac {2\,\left (2\,b^3+3\,a\,b^2\right )}{3\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \] Input:
int(coth(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3,x)
Output:
x*(a + b)^3 + ((2*a*b^2)/d + (2*exp(2*c + 2*d*x)*(3*a*b^2 + 2*b^3))/(3*d)) /(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1) + ((2*(3*a*b^2 + 2*b^3))/(3*d ) + (2*exp(4*c + 4*d*x)*(3*a*b^2 + 2*b^3))/(3*d) + (4*a*b^2*exp(2*c + 2*d* x))/d)/(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1) - (2*a^3)/(d*(exp(2*c + 2*d*x) - 1)) + (2*(3*a*b^2 + 2*b^3))/(3*d*(exp(2*c + 2*d*x) + 1))
Time = 0.26 (sec) , antiderivative size = 407, normalized size of antiderivative = 6.90 \[ \int \coth ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right )^3 \, dx=\frac {18 e^{4 d x +4 c} a \,b^{2}-2 b^{3}-9 e^{8 d x +8 c} a \,b^{2}-9 a \,b^{2}-9 a^{3}+8 e^{2 d x +2 c} b^{3}-18 e^{2 d x +2 c} a^{2} b d x -18 e^{2 d x +2 c} a \,b^{2} d x +3 e^{8 d x +8 c} a^{3} d x +3 e^{8 d x +8 c} b^{3} d x +6 e^{6 d x +6 c} a^{3} d x +6 e^{6 d x +6 c} b^{3} d x +3 e^{8 d x +8 c} a^{3}-6 e^{8 d x +8 c} b^{3}-18 e^{4 d x +4 c} a^{3}-24 e^{2 d x +2 c} a^{3}-3 a^{3} d x -3 b^{3} d x -6 e^{2 d x +2 c} a^{3} d x -6 e^{2 d x +2 c} b^{3} d x -9 a^{2} b d x -9 a \,b^{2} d x +9 e^{8 d x +8 c} a^{2} b d x +9 e^{8 d x +8 c} a \,b^{2} d x +18 e^{6 d x +6 c} a^{2} b d x +18 e^{6 d x +6 c} a \,b^{2} d x}{3 d \left (e^{8 d x +8 c}+2 e^{6 d x +6 c}-2 e^{2 d x +2 c}-1\right )} \] Input:
int(coth(d*x+c)^2*(a+b*tanh(d*x+c)^2)^3,x)
Output:
(3*e**(8*c + 8*d*x)*a**3*d*x + 3*e**(8*c + 8*d*x)*a**3 + 9*e**(8*c + 8*d*x )*a**2*b*d*x + 9*e**(8*c + 8*d*x)*a*b**2*d*x - 9*e**(8*c + 8*d*x)*a*b**2 + 3*e**(8*c + 8*d*x)*b**3*d*x - 6*e**(8*c + 8*d*x)*b**3 + 6*e**(6*c + 6*d*x )*a**3*d*x + 18*e**(6*c + 6*d*x)*a**2*b*d*x + 18*e**(6*c + 6*d*x)*a*b**2*d *x + 6*e**(6*c + 6*d*x)*b**3*d*x - 18*e**(4*c + 4*d*x)*a**3 + 18*e**(4*c + 4*d*x)*a*b**2 - 6*e**(2*c + 2*d*x)*a**3*d*x - 24*e**(2*c + 2*d*x)*a**3 - 18*e**(2*c + 2*d*x)*a**2*b*d*x - 18*e**(2*c + 2*d*x)*a*b**2*d*x - 6*e**(2* c + 2*d*x)*b**3*d*x + 8*e**(2*c + 2*d*x)*b**3 - 3*a**3*d*x - 9*a**3 - 9*a* *2*b*d*x - 9*a*b**2*d*x - 9*a*b**2 - 3*b**3*d*x - 2*b**3)/(3*d*(e**(8*c + 8*d*x) + 2*e**(6*c + 6*d*x) - 2*e**(2*c + 2*d*x) - 1))