Integrand size = 21, antiderivative size = 51 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {a^2 \text {arctanh}(\cosh (c+d x))}{d}-\frac {b (2 a+b) \text {sech}(c+d x)}{d}+\frac {b^2 \text {sech}^3(c+d x)}{3 d} \] Output:
-a^2*arctanh(cosh(d*x+c))/d-b*(2*a+b)*sech(d*x+c)/d+1/3*b^2*sech(d*x+c)^3/ d
Time = 0.71 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.25 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {3 a^2 \left (-\log \left (\cosh \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sinh \left (\frac {1}{2} (c+d x)\right )\right )\right )-3 b (2 a+b) \text {sech}(c+d x)+b^2 \text {sech}^3(c+d x)}{3 d} \] Input:
Integrate[Csch[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]
Output:
(3*a^2*(-Log[Cosh[(c + d*x)/2]] + Log[Sinh[(c + d*x)/2]]) - 3*b*(2*a + b)* Sech[c + d*x] + b^2*Sech[c + d*x]^3)/(3*d)
Time = 0.47 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 26, 4147, 25, 300, 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 \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {i \left (a-b \tan (i c+i d x)^2\right )^2}{\sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \frac {\left (a-b \tan (i c+i d x)^2\right )^2}{\sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 4147 |
\(\displaystyle \frac {\int -\frac {\left (-b \text {sech}^2(c+d x)+a+b\right )^2}{1-\text {sech}^2(c+d x)}d\text {sech}(c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {\left (-b \text {sech}^2(c+d x)+a+b\right )^2}{1-\text {sech}^2(c+d x)}d\text {sech}(c+d x)}{d}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle -\frac {\int \left (\frac {a^2}{1-\text {sech}^2(c+d x)}-b^2 \text {sech}^2(c+d x)+b (2 a+b)\right )d\text {sech}(c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-a^2 \text {arctanh}(\text {sech}(c+d x))-b (2 a+b) \text {sech}(c+d x)+\frac {1}{3} b^2 \text {sech}^3(c+d x)}{d}\) |
Input:
Int[Csch[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]
Output:
(-(a^2*ArcTanh[Sech[c + d*x]]) - b*(2*a + b)*Sech[c + d*x] + (b^2*Sech[c + d*x]^3)/3)/d
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Simp[1/(f*ff^ m) Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m + 1 )), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[( m - 1)/2]
Time = 1.08 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {-2 a^{2} \operatorname {arctanh}\left ({\mathrm e}^{d x +c}\right )-\frac {2 a b}{\cosh \left (d x +c \right )}+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{2}}{\cosh \left (d x +c \right )^{3}}-\frac {2}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) | \(63\) |
default | \(\frac {-2 a^{2} \operatorname {arctanh}\left ({\mathrm e}^{d x +c}\right )-\frac {2 a b}{\cosh \left (d x +c \right )}+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{2}}{\cosh \left (d x +c \right )^{3}}-\frac {2}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) | \(63\) |
risch | \(-\frac {2 b \,{\mathrm e}^{d x +c} \left (6 \,{\mathrm e}^{4 d x +4 c} a +3 b \,{\mathrm e}^{4 d x +4 c}+12 \,{\mathrm e}^{2 d x +2 c} a +2 \,{\mathrm e}^{2 d x +2 c} b +6 a +3 b \right )}{3 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{3}}+\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}-1\right )}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}+1\right )}{d}\) | \(115\) |
Input:
int(csch(d*x+c)*(a+tanh(d*x+c)^2*b)^2,x,method=_RETURNVERBOSE)
Output:
1/d*(-2*a^2*arctanh(exp(d*x+c))-2*a*b/cosh(d*x+c)+b^2*(-sinh(d*x+c)^2/cosh (d*x+c)^3-2/3/cosh(d*x+c)^3))
Leaf count of result is larger than twice the leaf count of optimal. 890 vs. \(2 (49) = 98\).
Time = 0.11 (sec) , antiderivative size = 890, normalized size of antiderivative = 17.45 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\text {Too large to display} \] Input:
integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")
Output:
-1/3*(6*(2*a*b + b^2)*cosh(d*x + c)^5 + 30*(2*a*b + b^2)*cosh(d*x + c)*sin h(d*x + c)^4 + 6*(2*a*b + b^2)*sinh(d*x + c)^5 + 4*(6*a*b + b^2)*cosh(d*x + c)^3 + 4*(15*(2*a*b + b^2)*cosh(d*x + c)^2 + 6*a*b + b^2)*sinh(d*x + c)^ 3 + 12*(5*(2*a*b + b^2)*cosh(d*x + c)^3 + (6*a*b + b^2)*cosh(d*x + c))*sin h(d*x + c)^2 + 6*(2*a*b + b^2)*cosh(d*x + c) + 3*(a^2*cosh(d*x + c)^6 + 6* a^2*cosh(d*x + c)*sinh(d*x + c)^5 + a^2*sinh(d*x + c)^6 + 3*a^2*cosh(d*x + c)^4 + 3*(5*a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^4 + 3*a^2*cosh(d*x + c)^2 + 4*(5*a^2*cosh(d*x + c)^3 + 3*a^2*cosh(d*x + c))*sinh(d*x + c)^3 + 3*(5*a^2*cosh(d*x + c)^4 + 6*a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^2 + a^2 + 6*(a^2*cosh(d*x + c)^5 + 2*a^2*cosh(d*x + c)^3 + a^2*cosh(d*x + c))* sinh(d*x + c))*log(cosh(d*x + c) + sinh(d*x + c) + 1) - 3*(a^2*cosh(d*x + c)^6 + 6*a^2*cosh(d*x + c)*sinh(d*x + c)^5 + a^2*sinh(d*x + c)^6 + 3*a^2*c osh(d*x + c)^4 + 3*(5*a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^4 + 3*a^2*c osh(d*x + c)^2 + 4*(5*a^2*cosh(d*x + c)^3 + 3*a^2*cosh(d*x + c))*sinh(d*x + c)^3 + 3*(5*a^2*cosh(d*x + c)^4 + 6*a^2*cosh(d*x + c)^2 + a^2)*sinh(d*x + c)^2 + a^2 + 6*(a^2*cosh(d*x + c)^5 + 2*a^2*cosh(d*x + c)^3 + a^2*cosh(d *x + c))*sinh(d*x + c))*log(cosh(d*x + c) + sinh(d*x + c) - 1) + 6*(5*(2*a *b + b^2)*cosh(d*x + c)^4 + 2*(6*a*b + b^2)*cosh(d*x + c)^2 + 2*a*b + b^2) *sinh(d*x + c))/(d*cosh(d*x + c)^6 + 6*d*cosh(d*x + c)*sinh(d*x + c)^5 + d *sinh(d*x + c)^6 + 3*d*cosh(d*x + c)^4 + 3*(5*d*cosh(d*x + c)^2 + d)*si...
\[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {csch}{\left (c + d x \right )}\, dx \] Input:
integrate(csch(d*x+c)*(a+b*tanh(d*x+c)**2)**2,x)
Output:
Integral((a + b*tanh(c + d*x)**2)**2*csch(c + d*x), x)
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (49) = 98\).
Time = 0.04 (sec) , antiderivative size = 196, normalized size of antiderivative = 3.84 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {2}{3} \, b^{2} {\left (\frac {3 \, e^{\left (-d x - c\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 )}} + \frac {2 \, e^{\left (-3 \, d x - 3 \, c\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 )}} + \frac {3 \, e^{\left (-5 \, d x - 5 \, c\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 )} + \frac {a^{2} \log \left (\tanh \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} - \frac {4 \, a b}{d {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}} \] Input:
integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")
Output:
-2/3*b^2*(3*e^(-d*x - c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^( -6*d*x - 6*c) + 1)) + 2*e^(-3*d*x - 3*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4* d*x - 4*c) + e^(-6*d*x - 6*c) + 1)) + 3*e^(-5*d*x - 5*c)/(d*(3*e^(-2*d*x - 2*c) + 3*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c) + 1))) + a^2*log(tanh(1/2*d* x + 1/2*c))/d - 4*a*b/(d*(e^(d*x + c) + e^(-d*x - c)))
Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (49) = 98\).
Time = 0.16 (sec) , antiderivative size = 123, normalized size of antiderivative = 2.41 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {3 \, a^{2} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} + 2\right ) - 3 \, a^{2} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} - 2\right ) + \frac {4 \, {\left (6 \, a b {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} - 4 \, b^{2}\right )}}{{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{3}}}{6 \, d} \] Input:
integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")
Output:
-1/6*(3*a^2*log(e^(d*x + c) + e^(-d*x - c) + 2) - 3*a^2*log(e^(d*x + c) + e^(-d*x - c) - 2) + 4*(6*a*b*(e^(d*x + c) + e^(-d*x - c))^2 + 3*b^2*(e^(d* x + c) + e^(-d*x - c))^2 - 4*b^2)/(e^(d*x + c) + e^(-d*x - c))^3)/d
Time = 0.19 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.14 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (b^2+2\,a\,b\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-d^2}}{d\,\sqrt {a^4}}\right )\,\sqrt {a^4}}{\sqrt {-d^2}} \] Input:
int((a + b*tanh(c + d*x)^2)^2/sinh(c + d*x),x)
Output:
(8*b^2*exp(c + d*x))/(3*d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1)) - ( 8*b^2*exp(c + d*x))/(3*d*(3*exp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6* c + 6*d*x) + 1)) - (2*exp(c + d*x)*(2*a*b + b^2))/(d*(exp(2*c + 2*d*x) + 1 )) - (2*atan((a^2*exp(d*x)*exp(c)*(-d^2)^(1/2))/(d*(a^4)^(1/2)))*(a^4)^(1/ 2))/(-d^2)^(1/2)
Time = 0.25 (sec) , antiderivative size = 305, normalized size of antiderivative = 5.98 \[ \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {3 e^{6 d x +6 c} \mathrm {log}\left (e^{d x +c}-1\right ) a^{2}-3 e^{6 d x +6 c} \mathrm {log}\left (e^{d x +c}+1\right ) a^{2}-12 e^{5 d x +5 c} a b -6 e^{5 d x +5 c} b^{2}+9 e^{4 d x +4 c} \mathrm {log}\left (e^{d x +c}-1\right ) a^{2}-9 e^{4 d x +4 c} \mathrm {log}\left (e^{d x +c}+1\right ) a^{2}-24 e^{3 d x +3 c} a b -4 e^{3 d x +3 c} b^{2}+9 e^{2 d x +2 c} \mathrm {log}\left (e^{d x +c}-1\right ) a^{2}-9 e^{2 d x +2 c} \mathrm {log}\left (e^{d x +c}+1\right ) a^{2}-12 e^{d x +c} a b -6 e^{d x +c} b^{2}+3 \,\mathrm {log}\left (e^{d x +c}-1\right ) a^{2}-3 \,\mathrm {log}\left (e^{d x +c}+1\right ) a^{2}}{3 d \left (e^{6 d x +6 c}+3 e^{4 d x +4 c}+3 e^{2 d x +2 c}+1\right )} \] Input:
int(csch(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x)
Output:
(3*e**(6*c + 6*d*x)*log(e**(c + d*x) - 1)*a**2 - 3*e**(6*c + 6*d*x)*log(e* *(c + d*x) + 1)*a**2 - 12*e**(5*c + 5*d*x)*a*b - 6*e**(5*c + 5*d*x)*b**2 + 9*e**(4*c + 4*d*x)*log(e**(c + d*x) - 1)*a**2 - 9*e**(4*c + 4*d*x)*log(e* *(c + d*x) + 1)*a**2 - 24*e**(3*c + 3*d*x)*a*b - 4*e**(3*c + 3*d*x)*b**2 + 9*e**(2*c + 2*d*x)*log(e**(c + d*x) - 1)*a**2 - 9*e**(2*c + 2*d*x)*log(e* *(c + d*x) + 1)*a**2 - 12*e**(c + d*x)*a*b - 6*e**(c + d*x)*b**2 + 3*log(e **(c + d*x) - 1)*a**2 - 3*log(e**(c + d*x) + 1)*a**2)/(3*d*(e**(6*c + 6*d* x) + 3*e**(4*c + 4*d*x) + 3*e**(2*c + 2*d*x) + 1))