3.1.67 \(\int \sqrt {a+b \tanh (c+d x)} \, dx\) [67]
Optimal. Leaf size=74 \[ -\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a-b}}\right )}{d}+\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a+b}}\right )}{d} \]
[Out]
-arctanh((a+b*tanh(d*x+c))^(1/2)/(a-b)^(1/2))*(a-b)^(1/2)/d+arctanh((a+b*tanh(d*x+c))^(1/2)/(a+b)^(1/2))*(a+b)
^(1/2)/d
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3566, 714,
1144, 213} \begin {gather*} \frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a+b}}\right )}{d}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a-b}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Sqrt[a + b*Tanh[c + d*x]],x]
[Out]
-((Sqrt[a - b]*ArcTanh[Sqrt[a + b*Tanh[c + d*x]]/Sqrt[a - b]])/d) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Tanh[c + d
*x]]/Sqrt[a + b]])/d
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 714
Int[Sqrt[(d_) + (e_.)*(x_)]/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2 + a*e^2 - 2*c*d
*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]
Rule 1144
Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2/2)*(b/q + 1), Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2/2)*(b/q - 1), Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]
Rule 3566
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[(a + x)^n/(b^2 + x^2), x], x
, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 + b^2, 0]
Rubi steps
\begin {align*} \int \sqrt {a+b \tanh (c+d x)} \, dx &=-\frac {b \text {Subst}\left (\int \frac {\sqrt {a+x}}{-b^2+x^2} \, dx,x,b \tanh (c+d x)\right )}{d}\\ &=-\frac {(2 b) \text {Subst}\left (\int \frac {x^2}{a^2-b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tanh (c+d x)}\right )}{d}\\ &=\frac {(a-b) \text {Subst}\left (\int \frac {1}{-a+b+x^2} \, dx,x,\sqrt {a+b \tanh (c+d x)}\right )}{d}-\frac {(a+b) \text {Subst}\left (\int \frac {1}{-a-b+x^2} \, dx,x,\sqrt {a+b \tanh (c+d x)}\right )}{d}\\ &=-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a-b}}\right )}{d}+\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a+b}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 74, normalized size = 1.00 \begin {gather*} -\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a-b}}\right )}{d}+\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tanh (c+d x)}}{\sqrt {a+b}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[Sqrt[a + b*Tanh[c + d*x]],x]
[Out]
-((Sqrt[a - b]*ArcTanh[Sqrt[a + b*Tanh[c + d*x]]/Sqrt[a - b]])/d) + (Sqrt[a + b]*ArcTanh[Sqrt[a + b*Tanh[c + d
*x]]/Sqrt[a + b]])/d
________________________________________________________________________________________
Maple [A]
time = 1.75, size = 70, normalized size = 0.95
| | |
method |
result |
size |
| | |
derivativedivides |
\(-\frac {2 b \left (-\frac {\sqrt {a +b}\, \arctanh \left (\frac {\sqrt {a +b \tanh \left (d x +c \right )}}{\sqrt {a +b}}\right )}{2 b}+\frac {\sqrt {-a +b}\, \arctan \left (\frac {\sqrt {a +b \tanh \left (d x +c \right )}}{\sqrt {-a +b}}\right )}{2 b}\right )}{d}\) |
\(70\) |
default |
\(-\frac {2 b \left (-\frac {\sqrt {a +b}\, \arctanh \left (\frac {\sqrt {a +b \tanh \left (d x +c \right )}}{\sqrt {a +b}}\right )}{2 b}+\frac {\sqrt {-a +b}\, \arctan \left (\frac {\sqrt {a +b \tanh \left (d x +c \right )}}{\sqrt {-a +b}}\right )}{2 b}\right )}{d}\) |
\(70\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a+b*tanh(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
[Out]
-2/d*b*(-1/2*(a+b)^(1/2)/b*arctanh((a+b*tanh(d*x+c))^(1/2)/(a+b)^(1/2))+1/2*(-a+b)^(1/2)/b*arctan((a+b*tanh(d*
x+c))^(1/2)/(-a+b)^(1/2)))
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tanh(d*x+c))^(1/2),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a-4*b>0)', see `assume?` for
more detail
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs.
\(2 (62) = 124\).
time = 0.65, size = 2203, normalized size = 29.77 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tanh(d*x+c))^(1/2),x, algorithm="fricas")
[Out]
[1/4*(sqrt(a + b)*log(2*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 8*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c
)^3 + 2*(a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 4*(a^2 + a*b)*cosh(d*x + c)^2 + 4*(3*(a^2 + 2*a*b + b^2)*cosh(d*
x + c)^2 + a^2 + a*b)*sinh(d*x + c)^2 + 2*a^2 - b^2 + 2*((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sin
h(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + (2*a + b)*cosh(d*x + c)^2 + (6*(a + b)*cosh(d*x + c)^2 + 2*a + b)*sin
h(d*x + c)^2 + 2*(2*(a + b)*cosh(d*x + c)^3 + (2*a + b)*cosh(d*x + c))*sinh(d*x + c) + a)*sqrt(a + b)*sqrt((a*
cosh(d*x + c) + b*sinh(d*x + c))/cosh(d*x + c)) + 8*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 + (a^2 + a*b)*cosh(d*
x + c))*sinh(d*x + c)) + sqrt(a - b)*log(((2*a^2 - b^2)*cosh(d*x + c)^4 + 4*(2*a^2 - b^2)*cosh(d*x + c)*sinh(d
*x + c)^3 + (2*a^2 - b^2)*sinh(d*x + c)^4 + 4*(a^2 - a*b)*cosh(d*x + c)^2 + 2*(3*(2*a^2 - b^2)*cosh(d*x + c)^2
+ 2*a^2 - 2*a*b)*sinh(d*x + c)^2 + 2*a^2 - 4*a*b + 2*b^2 - 2*(a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh(d*x
+ c)^3 + a*sinh(d*x + c)^4 + (2*a - b)*cosh(d*x + c)^2 + (6*a*cosh(d*x + c)^2 + 2*a - b)*sinh(d*x + c)^2 + 2*(
2*a*cosh(d*x + c)^3 + (2*a - b)*cosh(d*x + c))*sinh(d*x + c) + a - b)*sqrt(a - b)*sqrt((a*cosh(d*x + c) + b*si
nh(d*x + c))/cosh(d*x + c)) + 4*((2*a^2 - b^2)*cosh(d*x + c)^3 + 2*(a^2 - a*b)*cosh(d*x + c))*sinh(d*x + c))/(
cosh(d*x + c)^4 + 4*cosh(d*x + c)^3*sinh(d*x + c) + 6*cosh(d*x + c)^2*sinh(d*x + c)^2 + 4*cosh(d*x + c)*sinh(d
*x + c)^3 + sinh(d*x + c)^4)))/d, -1/4*(2*sqrt(-a - b)*arctan(((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)*sqrt(-a - b)*sqrt((a*cosh(d*x + c) + b*sinh(d*x + c))/cosh(d*x
+ c))/((a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 + 2*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + 2*a*b
+ b^2)*sinh(d*x + c)^2 + a^2 - b^2)) - sqrt(a - b)*log(((2*a^2 - b^2)*cosh(d*x + c)^4 + 4*(2*a^2 - b^2)*cosh(
d*x + c)*sinh(d*x + c)^3 + (2*a^2 - b^2)*sinh(d*x + c)^4 + 4*(a^2 - a*b)*cosh(d*x + c)^2 + 2*(3*(2*a^2 - b^2)*
cosh(d*x + c)^2 + 2*a^2 - 2*a*b)*sinh(d*x + c)^2 + 2*a^2 - 4*a*b + 2*b^2 - 2*(a*cosh(d*x + c)^4 + 4*a*cosh(d*x
+ c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4 + (2*a - b)*cosh(d*x + c)^2 + (6*a*cosh(d*x + c)^2 + 2*a - b)*sinh(d
*x + c)^2 + 2*(2*a*cosh(d*x + c)^3 + (2*a - b)*cosh(d*x + c))*sinh(d*x + c) + a - b)*sqrt(a - b)*sqrt((a*cosh(
d*x + c) + b*sinh(d*x + c))/cosh(d*x + c)) + 4*((2*a^2 - b^2)*cosh(d*x + c)^3 + 2*(a^2 - a*b)*cosh(d*x + c))*s
inh(d*x + c))/(cosh(d*x + c)^4 + 4*cosh(d*x + c)^3*sinh(d*x + c) + 6*cosh(d*x + c)^2*sinh(d*x + c)^2 + 4*cosh(
d*x + c)*sinh(d*x + c)^3 + sinh(d*x + c)^4)))/d, -1/4*(2*sqrt(-a + b)*arctan(-(a*cosh(d*x + c)^2 + 2*a*cosh(d*
x + c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a - b)*sqrt(-a + b)*sqrt((a*cosh(d*x + c) + b*sinh(d*x + c))/cosh(d
*x + c))/((a^2 - b^2)*cosh(d*x + c)^2 + 2*(a^2 - b^2)*cosh(d*x + c)*sinh(d*x + c) + (a^2 - b^2)*sinh(d*x + c)^
2 + a^2 - 2*a*b + b^2)) - sqrt(a + b)*log(2*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 8*(a^2 + 2*a*b + b^2)*cosh(d
*x + c)*sinh(d*x + c)^3 + 2*(a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 4*(a^2 + a*b)*cosh(d*x + c)^2 + 4*(3*(a^2 +
2*a*b + b^2)*cosh(d*x + c)^2 + a^2 + a*b)*sinh(d*x + c)^2 + 2*a^2 - b^2 + 2*((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 + (6*(a + b)*cosh(d*x +
c)^2 + 2*a + b)*sinh(d*x + c)^2 + 2*(2*(a + b)*cosh(d*x + c)^3 + (2*a + b)*cosh(d*x + c))*sinh(d*x + c) + a)*
sqrt(a + b)*sqrt((a*cosh(d*x + c) + b*sinh(d*x + c))/cosh(d*x + c)) + 8*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 +
(a^2 + a*b)*cosh(d*x + c))*sinh(d*x + c)))/d, -1/2*(sqrt(-a + b)*arctan(-(a*cosh(d*x + c)^2 + 2*a*cosh(d*x +
c)*sinh(d*x + c) + a*sinh(d*x + c)^2 + a - b)*sqrt(-a + b)*sqrt((a*cosh(d*x + c) + b*sinh(d*x + c))/cosh(d*x +
c))/((a^2 - b^2)*cosh(d*x + c)^2 + 2*(a^2 - b^2)*cosh(d*x + c)*sinh(d*x + c) + (a^2 - b^2)*sinh(d*x + c)^2 +
a^2 - 2*a*b + b^2)) + sqrt(-a - b)*arctan(((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)*sqrt(-a - b)*sqrt((a*cosh(d*x + c) + b*sinh(d*x + c))/cosh(d*x + c))/((a^2 + 2*a*b
+ b^2)*cosh(d*x + c)^2 + 2*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + 2*a*b + b^2)*sinh(d*x + c
)^2 + a^2 - b^2)))/d]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \tanh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tanh(d*x+c))**(1/2),x)
[Out]
Integral(sqrt(a + b*tanh(c + d*x)), x)
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tanh(d*x+c))^(1/2),x, algorithm="giac")
[Out]
Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:index.cc index_m operator + Error: Bad Argument Value
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 151, normalized size = 2.04 \begin {gather*} \frac {\mathrm {atan}\left (\frac {b^2\,\sqrt {a+b}\,\sqrt {a+b\,\mathrm {tanh}\left (c+d\,x\right )}\,1{}\mathrm {i}-a\,b\,\sqrt {a+b}\,\sqrt {a+b\,\mathrm {tanh}\left (c+d\,x\right )}\,1{}\mathrm {i}}{a^2\,b-b^3}\right )\,\sqrt {a+b}\,1{}\mathrm {i}}{d}+\frac {\mathrm {atan}\left (\frac {b^2\,\sqrt {a-b}\,\sqrt {a+b\,\mathrm {tanh}\left (c+d\,x\right )}\,1{}\mathrm {i}+a\,b\,\sqrt {a-b}\,\sqrt {a+b\,\mathrm {tanh}\left (c+d\,x\right )}\,1{}\mathrm {i}}{a^2\,b-b^3}\right )\,\sqrt {a-b}\,1{}\mathrm {i}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a + b*tanh(c + d*x))^(1/2),x)
[Out]
(atan((b^2*(a + b)^(1/2)*(a + b*tanh(c + d*x))^(1/2)*1i - a*b*(a + b)^(1/2)*(a + b*tanh(c + d*x))^(1/2)*1i)/(a
^2*b - b^3))*(a + b)^(1/2)*1i)/d + (atan((b^2*(a - b)^(1/2)*(a + b*tanh(c + d*x))^(1/2)*1i + a*b*(a - b)^(1/2)
*(a + b*tanh(c + d*x))^(1/2)*1i)/(a^2*b - b^3))*(a - b)^(1/2)*1i)/d
________________________________________________________________________________________