Integrand size = 23, antiderivative size = 48 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\coth (c+d x)}{a d} \] Output:
-b^(1/2)*arctan(b^(1/2)*tanh(d*x+c)/a^(1/2))/a^(3/2)/d-coth(d*x+c)/a/d
Time = 0.34 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\coth (c+d x)}{a d} \] Input:
Integrate[Csch[c + d*x]^2/(a + b*Tanh[c + d*x]^2),x]
Output:
-((Sqrt[b]*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/(a^(3/2)*d)) - Coth[c + d*x]/(a*d)
Time = 0.27 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 25, 4146, 264, 218}
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 {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {1}{\sin (i c+i d x)^2 \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\sin (i c+i d x)^2 \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\coth ^2(c+d x)}{b \tanh ^2(c+d x)+a}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 264 |
\(\displaystyle \frac {-\frac {b \int \frac {1}{b \tanh ^2(c+d x)+a}d\tanh (c+d x)}{a}-\frac {\coth (c+d x)}{a}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2}}-\frac {\coth (c+d x)}{a}}{d}\) |
Input:
Int[Csch[c + d*x]^2/(a + b*Tanh[c + d*x]^2),x]
Output:
(-((Sqrt[b]*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/a^(3/2)) - Coth[c + d *x]/a)/d
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]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^( m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] - Simp[b*((m + 2*p + 3)/(a*c ^2*(m + 1))) Int[(c*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, p }, x] && LtQ[m, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Leaf count of result is larger than twice the leaf count of optimal. \(111\) vs. \(2(40)=80\).
Time = 1.25 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.33
method | result | size |
risch | \(-\frac {2}{a d \left ({\mathrm e}^{2 d x +2 c}-1\right )}+\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{2 a^{2} d}-\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {-a b}+a -b}{a +b}\right )}{2 a^{2} d}\) | \(112\) |
derivativedivides | \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+2 b \left (\frac {\left (a +\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (-a +\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{d}\) | \(188\) |
default | \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+2 b \left (\frac {\left (a +\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (-a +\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{d}\) | \(188\) |
Input:
int(csch(d*x+c)^2/(a+tanh(d*x+c)^2*b),x,method=_RETURNVERBOSE)
Output:
-2/a/d/(exp(2*d*x+2*c)-1)+1/2/a^2*(-a*b)^(1/2)/d*ln(exp(2*d*x+2*c)-(2*(-a* b)^(1/2)-a+b)/(a+b))-1/2/a^2*(-a*b)^(1/2)/d*ln(exp(2*d*x+2*c)+(2*(-a*b)^(1 /2)+a-b)/(a+b))
Leaf count of result is larger than twice the leaf count of optimal. 148 vs. \(2 (40) = 80\).
Time = 0.12 (sec) , antiderivative size = 618, normalized size of antiderivative = 12.88 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx =\text {Too large to display} \] Input:
integrate(csch(d*x+c)^2/(a+b*tanh(d*x+c)^2),x, algorithm="fricas")
Output:
[1/2*((cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2 - 1)*sqrt(-b/a)*log(((a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 4*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^3 + (a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 2*(a^2 - b^2)*cosh(d*x + c)^2 + 2*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 + a^2 - b^2)*sinh(d*x + c)^2 + a^2 - 6*a*b + b^2 + 4*((a^2 + 2*a*b + b^2) *cosh(d*x + c)^3 + (a^2 - b^2)*cosh(d*x + c))*sinh(d*x + c) - 4*((a^2 + a* b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + a* b)*sinh(d*x + c)^2 + a^2 - a*b)*sqrt(-b/a))/((a + b)*cosh(d*x + c)^4 + 4*( a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a - b) *cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b )) - 4)/(a*d*cosh(d*x + c)^2 + 2*a*d*cosh(d*x + c)*sinh(d*x + c) + a*d*sin h(d*x + c)^2 - a*d), -((cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2 - 1)*sqrt(b/a)*arctan(1/2*((a + b)*cosh(d*x + c)^2 + 2*(a + b)*cosh(d*x + c)*sinh(d*x + c) + (a + b)*sinh(d*x + c)^2 + a - b)*sqrt(b /a)/b) + 2)/(a*d*cosh(d*x + c)^2 + 2*a*d*cosh(d*x + c)*sinh(d*x + c) + a*d *sinh(d*x + c)^2 - a*d)]
\[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {\operatorname {csch}^{2}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(csch(d*x+c)**2/(a+b*tanh(d*x+c)**2),x)
Output:
Integral(csch(c + d*x)**2/(a + b*tanh(c + d*x)**2), x)
Time = 0.14 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.29 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {b \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{\sqrt {a b} a d} + \frac {2}{{\left (a e^{\left (-2 \, d x - 2 \, c\right )} - a\right )} d} \] Input:
integrate(csch(d*x+c)^2/(a+b*tanh(d*x+c)^2),x, algorithm="maxima")
Output:
b*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) + a - b)/sqrt(a*b))/(sqrt(a*b)*a*d) + 2/((a*e^(-2*d*x - 2*c) - a)*d)
Time = 0.31 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.44 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\frac {b \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 )}{\sqrt {a b} a} + \frac {2}{a {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}}}{d} \] Input:
integrate(csch(d*x+c)^2/(a+b*tanh(d*x+c)^2),x, algorithm="giac")
Output:
-(b*arctan(1/2*(a*e^(2*d*x + 2*c) + b*e^(2*d*x + 2*c) + a - b)/sqrt(a*b))/ (sqrt(a*b)*a) + 2/(a*(e^(2*d*x + 2*c) - 1)))/d
Time = 1.54 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.83 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {2}{a\,d-a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a^3\,d^2}}{2\,a\,\sqrt {b}\,d}-\frac {\sqrt {b}\,\sqrt {a^3\,d^2}}{2\,a^2\,d}+\frac {{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\sqrt {a^3\,d^2}}{2\,a\,\sqrt {b}\,d}+\frac {\sqrt {b}\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\sqrt {a^3\,d^2}}{2\,a^2\,d}\right )}{\sqrt {a^3\,d^2}} \] Input:
int(1/(sinh(c + d*x)^2*(a + b*tanh(c + d*x)^2)),x)
Output:
2/(a*d - a*d*exp(2*c + 2*d*x)) - (b^(1/2)*atan((a^3*d^2)^(1/2)/(2*a*b^(1/2 )*d) - (b^(1/2)*(a^3*d^2)^(1/2))/(2*a^2*d) + (exp(2*c)*exp(2*d*x)*(a^3*d^2 )^(1/2))/(2*a*b^(1/2)*d) + (b^(1/2)*exp(2*c)*exp(2*d*x)*(a^3*d^2)^(1/2))/( 2*a^2*d)))/(a^3*d^2)^(1/2)
Time = 0.27 (sec) , antiderivative size = 165, normalized size of antiderivative = 3.44 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {-e^{2 d x +2 c} \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right )+\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right )+e^{2 d x +2 c} \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right )-\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right )-2 e^{2 d x +2 c} a}{a^{2} d \left (e^{2 d x +2 c}-1\right )} \] Input:
int(csch(d*x+c)^2/(a+b*tanh(d*x+c)^2),x)
Output:
( - e**(2*c + 2*d*x)*sqrt(b)*sqrt(a)*atan((e**(c + d*x)*sqrt(a + b) - sqrt (b))/sqrt(a)) + sqrt(b)*sqrt(a)*atan((e**(c + d*x)*sqrt(a + b) - sqrt(b))/ sqrt(a)) + e**(2*c + 2*d*x)*sqrt(b)*sqrt(a)*atan((e**(c + d*x)*sqrt(a + b) + sqrt(b))/sqrt(a)) - sqrt(b)*sqrt(a)*atan((e**(c + d*x)*sqrt(a + b) + sq rt(b))/sqrt(a)) - 2*e**(2*c + 2*d*x)*a)/(a**2*d*(e**(2*c + 2*d*x) - 1))