\(\int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx\) [135]

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

Optimal result

Integrand size = 21, antiderivative size = 31 \[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d} \]

[Out]

2*arctanh((a+b*sech(d*x+c))^(1/2)/a^(1/2))/d/a^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3970, 65, 213} \[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d} \]

[In]

Int[Tanh[c + d*x]/Sqrt[a + b*Sech[c + d*x]],x]

[Out]

(2*ArcTanh[Sqrt[a + b*Sech[c + d*x]]/Sqrt[a]])/(Sqrt[a]*d)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

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

Rule 3970

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[-(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[(b^2 - x^2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {1}{x \sqrt {a+x}} \, dx,x,b \text {sech}(c+d x)\right )}{d} \\ & = -\frac {2 \text {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b \text {sech}(c+d x)}\right )}{d} \\ & = \frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \text {sech}(c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d} \]

[In]

Integrate[Tanh[c + d*x]/Sqrt[a + b*Sech[c + d*x]],x]

[Out]

(2*ArcTanh[Sqrt[a + b*Sech[c + d*x]]/Sqrt[a]])/(Sqrt[a]*d)

Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84

method result size
derivativedivides \(\frac {2 \,\operatorname {arctanh}\left (\frac {\sqrt {a +b \,\operatorname {sech}\left (d x +c \right )}}{\sqrt {a}}\right )}{d \sqrt {a}}\) \(26\)
default \(\frac {2 \,\operatorname {arctanh}\left (\frac {\sqrt {a +b \,\operatorname {sech}\left (d x +c \right )}}{\sqrt {a}}\right )}{d \sqrt {a}}\) \(26\)

[In]

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

[Out]

2*arctanh((a+b*sech(d*x+c))^(1/2)/a^(1/2))/d/a^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (25) = 50\).

Time = 0.68 (sec) , antiderivative size = 558, normalized size of antiderivative = 18.00 \[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\left [\frac {\log \left (-\frac {2 \, a^{2} \cosh \left (d x + c\right )^{4} + 2 \, a^{2} \sinh \left (d x + c\right )^{4} + 4 \, a b \cosh \left (d x + c\right )^{3} + 4 \, {\left (2 \, a^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right )^{3} + 4 \, a b \cosh \left (d x + c\right ) + {\left (4 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{2} + {\left (12 \, a^{2} \cosh \left (d x + c\right )^{2} + 12 \, a b \cosh \left (d x + c\right ) + 4 \, a^{2} + b^{2}\right )} \sinh \left (d x + c\right )^{2} + 2 \, a^{2} + 2 \, {\left (a \cosh \left (d x + c\right )^{4} + a \sinh \left (d x + c\right )^{4} + b \cosh \left (d x + c\right )^{3} + {\left (4 \, a \cosh \left (d x + c\right ) + b\right )} \sinh \left (d x + c\right )^{3} + 2 \, a \cosh \left (d x + c\right )^{2} + {\left (6 \, a \cosh \left (d x + c\right )^{2} + 3 \, b \cosh \left (d x + c\right ) + 2 \, a\right )} \sinh \left (d x + c\right )^{2} + b \cosh \left (d x + c\right ) + {\left (4 \, a \cosh \left (d x + c\right )^{3} + 3 \, b \cosh \left (d x + c\right )^{2} + 4 \, a \cosh \left (d x + c\right ) + b\right )} \sinh \left (d x + c\right ) + a\right )} \sqrt {a} \sqrt {\frac {a \cosh \left (d x + c\right ) + b}{\cosh \left (d x + c\right )}} + 2 \, {\left (4 \, a^{2} \cosh \left (d x + c\right )^{3} + 6 \, a b \cosh \left (d x + c\right )^{2} + 2 \, a b + {\left (4 \, a^{2} + b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{\cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}}\right )}{2 \, \sqrt {a} d}, -\frac {\sqrt {-a} \arctan \left (\frac {{\left (a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + b \cosh \left (d x + c\right ) + {\left (2 \, a \cosh \left (d x + c\right ) + b\right )} \sinh \left (d x + c\right ) + a\right )} \sqrt {-a} \sqrt {\frac {a \cosh \left (d x + c\right ) + b}{\cosh \left (d x + c\right )}}}{a^{2} \cosh \left (d x + c\right )^{2} + a^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + a^{2} + 2 \, {\left (a^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right )}\right )}{a d}\right ] \]

[In]

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

[Out]

[1/2*log(-(2*a^2*cosh(d*x + c)^4 + 2*a^2*sinh(d*x + c)^4 + 4*a*b*cosh(d*x + c)^3 + 4*(2*a^2*cosh(d*x + c) + a*
b)*sinh(d*x + c)^3 + 4*a*b*cosh(d*x + c) + (4*a^2 + b^2)*cosh(d*x + c)^2 + (12*a^2*cosh(d*x + c)^2 + 12*a*b*co
sh(d*x + c) + 4*a^2 + b^2)*sinh(d*x + c)^2 + 2*a^2 + 2*(a*cosh(d*x + c)^4 + a*sinh(d*x + c)^4 + b*cosh(d*x + c
)^3 + (4*a*cosh(d*x + c) + b)*sinh(d*x + c)^3 + 2*a*cosh(d*x + c)^2 + (6*a*cosh(d*x + c)^2 + 3*b*cosh(d*x + c)
 + 2*a)*sinh(d*x + c)^2 + b*cosh(d*x + c) + (4*a*cosh(d*x + c)^3 + 3*b*cosh(d*x + c)^2 + 4*a*cosh(d*x + c) + b
)*sinh(d*x + c) + a)*sqrt(a)*sqrt((a*cosh(d*x + c) + b)/cosh(d*x + c)) + 2*(4*a^2*cosh(d*x + c)^3 + 6*a*b*cosh
(d*x + c)^2 + 2*a*b + (4*a^2 + b^2)*cosh(d*x + c))*sinh(d*x + c))/(cosh(d*x + c)^2 + 2*cosh(d*x + c)*sinh(d*x
+ c) + sinh(d*x + c)^2))/(sqrt(a)*d), -sqrt(-a)*arctan((a*cosh(d*x + c)^2 + a*sinh(d*x + c)^2 + b*cosh(d*x + c
) + (2*a*cosh(d*x + c) + b)*sinh(d*x + c) + a)*sqrt(-a)*sqrt((a*cosh(d*x + c) + b)/cosh(d*x + c))/(a^2*cosh(d*
x + c)^2 + a^2*sinh(d*x + c)^2 + 2*a*b*cosh(d*x + c) + a^2 + 2*(a^2*cosh(d*x + c) + a*b)*sinh(d*x + c)))/(a*d)
]

Sympy [F]

\[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\int \frac {\tanh {\left (c + d x \right )}}{\sqrt {a + b \operatorname {sech}{\left (c + d x \right )}}}\, dx \]

[In]

integrate(tanh(d*x+c)/(a+b*sech(d*x+c))**(1/2),x)

[Out]

Integral(tanh(c + d*x)/sqrt(a + b*sech(c + d*x)), x)

Maxima [F]

\[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\int { \frac {\tanh \left (d x + c\right )}{\sqrt {b \operatorname {sech}\left (d x + c\right ) + a}} \,d x } \]

[In]

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

[Out]

integrate(tanh(d*x + c)/sqrt(b*sech(d*x + c) + a), x)

Giac [F]

\[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\int { \frac {\tanh \left (d x + c\right )}{\sqrt {b \operatorname {sech}\left (d x + c\right ) + a}} \,d x } \]

[In]

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

[Out]

integrate(tanh(d*x + c)/sqrt(b*sech(d*x + c) + a), x)

Mupad [B] (verification not implemented)

Time = 2.31 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int \frac {\tanh (c+d x)}{\sqrt {a+b \text {sech}(c+d x)}} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{\mathrm {cosh}\left (c+d\,x\right )}}}{\sqrt {a}}\right )}{\sqrt {a}\,d} \]

[In]

int(tanh(c + d*x)/(a + b/cosh(c + d*x))^(1/2),x)

[Out]

(2*atanh((a + b/cosh(c + d*x))^(1/2)/a^(1/2)))/(a^(1/2)*d)