Integrand size = 17, antiderivative size = 53 \[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{(a+b)^{3/2}}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}} \] Output:
arctanh((a+b)^(1/2)*tanh(x)/(a+b*tanh(x)^2)^(1/2))/(a+b)^(3/2)-tanh(x)/(a+ b)/(a+b*tanh(x)^2)^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(112\) vs. \(2(53)=106\).
Time = 1.01 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.11 \[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\frac {\tanh (x) \left (\text {arctanh}\left (\frac {\sqrt {\frac {(a+b) \tanh ^2(x)}{a}}}{\sqrt {1+\frac {b \tanh ^2(x)}{a}}}\right ) \left (b+a \coth ^2(x)\right ) \sqrt {\frac {(a+b) \tanh ^2(x)}{a}}-(a+b) \sqrt {1+\frac {b \tanh ^2(x)}{a}}\right )}{(a+b)^2 \sqrt {a+b \tanh ^2(x)} \sqrt {1+\frac {b \tanh ^2(x)}{a}}} \] Input:
Integrate[Tanh[x]^2/(a + b*Tanh[x]^2)^(3/2),x]
Output:
(Tanh[x]*(ArcTanh[Sqrt[((a + b)*Tanh[x]^2)/a]/Sqrt[1 + (b*Tanh[x]^2)/a]]*( b + a*Coth[x]^2)*Sqrt[((a + b)*Tanh[x]^2)/a] - (a + b)*Sqrt[1 + (b*Tanh[x] ^2)/a]))/((a + b)^2*Sqrt[a + b*Tanh[x]^2]*Sqrt[1 + (b*Tanh[x]^2)/a])
Time = 0.30 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3042, 25, 4153, 25, 373, 291, 219}
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 {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\tan (i x)^2}{\left (a-b \tan (i x)^2\right )^{3/2}}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\tan (i x)^2}{\left (a-b \tan (i x)^2\right )^{3/2}}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle -\int -\frac {\tanh ^2(x)}{\left (1-\tanh ^2(x)\right ) \left (b \tanh ^2(x)+a\right )^{3/2}}d\tanh (x)\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {\tanh ^2(x)}{\left (1-\tanh ^2(x)\right ) \left (a+b \tanh ^2(x)\right )^{3/2}}d\tanh (x)\) |
\(\Big \downarrow \) 373 |
\(\displaystyle \frac {\int \frac {1}{\left (1-\tanh ^2(x)\right ) \sqrt {b \tanh ^2(x)+a}}d\tanh (x)}{a+b}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \frac {\int \frac {1}{1-\frac {(a+b) \tanh ^2(x)}{b \tanh ^2(x)+a}}d\frac {\tanh (x)}{\sqrt {b \tanh ^2(x)+a}}}{a+b}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{(a+b)^{3/2}}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}\) |
Input:
Int[Tanh[x]^2/(a + b*Tanh[x]^2)^(3/2),x]
Output:
ArcTanh[(Sqrt[a + b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]]/(a + b)^(3/2) - Tanh[ x]/((a + b)*Sqrt[a + b*Tanh[x]^2])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[e*(e*x)^(m - 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*(b*c - a*d)*(p + 1))), x] - Simp[e^2/(2*(b*c - a*d)*(p + 1)) Int[(e *x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(m - 1) + d*(m + 2*p + 2*q + 3)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 1] && LeQ[m, 3] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
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]))
Leaf count of result is larger than twice the leaf count of optimal. \(288\) vs. \(2(45)=90\).
Time = 0.06 (sec) , antiderivative size = 289, normalized size of antiderivative = 5.45
method | result | size |
derivativedivides | \(-\frac {\tanh \left (x \right )}{a \sqrt {a +b \tanh \left (x \right )^{2}}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}+\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )+1\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (\tanh \left (x \right )+1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}{\tanh \left (x \right )+1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(289\) |
default | \(-\frac {\tanh \left (x \right )}{a \sqrt {a +b \tanh \left (x \right )^{2}}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}+\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )+1\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (\tanh \left (x \right )+1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )+1\right )^{2}-2 b \left (\tanh \left (x \right )+1\right )+a +b}}{\tanh \left (x \right )+1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(289\) |
Input:
int(tanh(x)^2/(a+b*tanh(x)^2)^(3/2),x,method=_RETURNVERBOSE)
Output:
-tanh(x)/a/(a+b*tanh(x)^2)^(1/2)-1/2/(a+b)/(b*(tanh(x)-1)^2+2*b*(tanh(x)-1 )+a+b)^(1/2)+b/(a+b)*(2*b*(tanh(x)-1)+2*b)/(4*b*(a+b)-4*b^2)/(b*(tanh(x)-1 )^2+2*b*(tanh(x)-1)+a+b)^(1/2)+1/2/(a+b)^(3/2)*ln((2*a+2*b+2*b*(tanh(x)-1) +2*(a+b)^(1/2)*(b*(tanh(x)-1)^2+2*b*(tanh(x)-1)+a+b)^(1/2))/(tanh(x)-1))+1 /2/(a+b)/(b*(tanh(x)+1)^2-2*b*(tanh(x)+1)+a+b)^(1/2)+b/(a+b)*(2*b*(tanh(x) +1)-2*b)/(4*b*(a+b)-4*b^2)/(b*(tanh(x)+1)^2-2*b*(tanh(x)+1)+a+b)^(1/2)-1/2 /(a+b)^(3/2)*ln((2*a+2*b-2*b*(tanh(x)+1)+2*(a+b)^(1/2)*(b*(tanh(x)+1)^2-2* b*(tanh(x)+1)+a+b)^(1/2))/(tanh(x)+1))
Leaf count of result is larger than twice the leaf count of optimal. 791 vs. \(2 (45) = 90\).
Time = 0.19 (sec) , antiderivative size = 2211, normalized size of antiderivative = 41.72 \[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\text {Too large to display} \] Input:
integrate(tanh(x)^2/(a+b*tanh(x)^2)^(3/2),x, algorithm="fricas")
Output:
[1/4*(((a + b)*cosh(x)^4 + 4*(a + b)*cosh(x)*sinh(x)^3 + (a + b)*sinh(x)^4 + 2*(a - b)*cosh(x)^2 + 2*(3*(a + b)*cosh(x)^2 + a - b)*sinh(x)^2 + 4*((a + b)*cosh(x)^3 + (a - b)*cosh(x))*sinh(x) + a + b)*sqrt(a + b)*log(-((a*b ^2 + b^3)*cosh(x)^8 + 8*(a*b^2 + b^3)*cosh(x)*sinh(x)^7 + (a*b^2 + b^3)*si nh(x)^8 - 2*(a*b^2 + 2*b^3)*cosh(x)^6 - 2*(a*b^2 + 2*b^3 - 14*(a*b^2 + b^3 )*cosh(x)^2)*sinh(x)^6 + 4*(14*(a*b^2 + b^3)*cosh(x)^3 - 3*(a*b^2 + 2*b^3) *cosh(x))*sinh(x)^5 + (a^3 - a^2*b + 4*a*b^2 + 6*b^3)*cosh(x)^4 + (70*(a*b ^2 + b^3)*cosh(x)^4 + a^3 - a^2*b + 4*a*b^2 + 6*b^3 - 30*(a*b^2 + 2*b^3)*c osh(x)^2)*sinh(x)^4 + 4*(14*(a*b^2 + b^3)*cosh(x)^5 - 10*(a*b^2 + 2*b^3)*c osh(x)^3 + (a^3 - a^2*b + 4*a*b^2 + 6*b^3)*cosh(x))*sinh(x)^3 + a^3 + 3*a^ 2*b + 3*a*b^2 + b^3 + 2*(a^3 - 3*a*b^2 - 2*b^3)*cosh(x)^2 + 2*(14*(a*b^2 + b^3)*cosh(x)^6 - 15*(a*b^2 + 2*b^3)*cosh(x)^4 + a^3 - 3*a*b^2 - 2*b^3 + 3 *(a^3 - a^2*b + 4*a*b^2 + 6*b^3)*cosh(x)^2)*sinh(x)^2 + sqrt(2)*(b^2*cosh( x)^6 + 6*b^2*cosh(x)*sinh(x)^5 + b^2*sinh(x)^6 - 3*b^2*cosh(x)^4 + 3*(5*b^ 2*cosh(x)^2 - b^2)*sinh(x)^4 + 4*(5*b^2*cosh(x)^3 - 3*b^2*cosh(x))*sinh(x) ^3 - (a^2 - 2*a*b - 3*b^2)*cosh(x)^2 + (15*b^2*cosh(x)^4 - 18*b^2*cosh(x)^ 2 - a^2 + 2*a*b + 3*b^2)*sinh(x)^2 - a^2 - 2*a*b - b^2 + 2*(3*b^2*cosh(x)^ 5 - 6*b^2*cosh(x)^3 - (a^2 - 2*a*b - 3*b^2)*cosh(x))*sinh(x))*sqrt(a + b)* sqrt(((a + b)*cosh(x)^2 + (a + b)*sinh(x)^2 + a - b)/(cosh(x)^2 - 2*cosh(x )*sinh(x) + sinh(x)^2)) + 4*(2*(a*b^2 + b^3)*cosh(x)^7 - 3*(a*b^2 + 2*b...
\[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\int \frac {\tanh ^{2}{\left (x \right )}}{\left (a + b \tanh ^{2}{\left (x \right )}\right )^{\frac {3}{2}}}\, dx \] Input:
integrate(tanh(x)**2/(a+b*tanh(x)**2)**(3/2),x)
Output:
Integral(tanh(x)**2/(a + b*tanh(x)**2)**(3/2), x)
\[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\int { \frac {\tanh \left (x\right )^{2}}{{\left (b \tanh \left (x\right )^{2} + a\right )}^{\frac {3}{2}}} \,d x } \] Input:
integrate(tanh(x)^2/(a+b*tanh(x)^2)^(3/2),x, algorithm="maxima")
Output:
integrate(tanh(x)^2/(b*tanh(x)^2 + a)^(3/2), x)
Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (45) = 90\).
Time = 0.26 (sec) , antiderivative size = 293, normalized size of antiderivative = 5.53 \[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=-\frac {\frac {{\left (a^{2} b + a b^{2}\right )} e^{\left (2 \, x\right )}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}} - \frac {a^{2} b + a b^{2}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}}{\sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}} - \frac {\log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, {\left (a + b\right )}^{\frac {3}{2}}} - \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right )}{2 \, {\left (a + b\right )}^{\frac {3}{2}}} + \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right )}{2 \, {\left (a + b\right )}^{\frac {3}{2}}} \] Input:
integrate(tanh(x)^2/(a+b*tanh(x)^2)^(3/2),x, algorithm="giac")
Output:
-((a^2*b + a*b^2)*e^(2*x)/(a^3*b + 2*a^2*b^2 + a*b^3) - (a^2*b + a*b^2)/(a ^3*b + 2*a^2*b^2 + a*b^3))/sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^(2*x) - 2*b* e^(2*x) + a + b) - 1/2*log(abs(-(sqrt(a + b)*e^(2*x) - sqrt(a*e^(4*x) + b* e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b))*(a + b) - sqrt(a + b)*(a - b )))/(a + b)^(3/2) - 1/2*log(abs(-sqrt(a + b)*e^(2*x) + sqrt(a*e^(4*x) + b* e^(4*x) + 2*a*e^(2*x) - 2*b*e^(2*x) + a + b) + sqrt(a + b)))/(a + b)^(3/2) + 1/2*log(abs(-sqrt(a + b)*e^(2*x) + sqrt(a*e^(4*x) + b*e^(4*x) + 2*a*e^( 2*x) - 2*b*e^(2*x) + a + b) - sqrt(a + b)))/(a + b)^(3/2)
Timed out. \[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\int \frac {{\mathrm {tanh}\left (x\right )}^2}{{\left (b\,{\mathrm {tanh}\left (x\right )}^2+a\right )}^{3/2}} \,d x \] Input:
int(tanh(x)^2/(a + b*tanh(x)^2)^(3/2),x)
Output:
int(tanh(x)^2/(a + b*tanh(x)^2)^(3/2), x)
\[ \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx=\frac {-\sqrt {\tanh \left (x \right )^{2} b +a}\, \tanh \left (x \right )+\left (\int \frac {\sqrt {\tanh \left (x \right )^{2} b +a}}{\tanh \left (x \right )^{4} b^{2}+2 \tanh \left (x \right )^{2} a b +a^{2}}d x \right ) \tanh \left (x \right )^{2} a b +\left (\int \frac {\sqrt {\tanh \left (x \right )^{2} b +a}}{\tanh \left (x \right )^{4} b^{2}+2 \tanh \left (x \right )^{2} a b +a^{2}}d x \right ) a^{2}}{a \left (\tanh \left (x \right )^{2} b +a \right )} \] Input:
int(tanh(x)^2/(a+b*tanh(x)^2)^(3/2),x)
Output:
( - sqrt(tanh(x)**2*b + a)*tanh(x) + int(sqrt(tanh(x)**2*b + a)/(tanh(x)** 4*b**2 + 2*tanh(x)**2*a*b + a**2),x)*tanh(x)**2*a*b + int(sqrt(tanh(x)**2* b + a)/(tanh(x)**4*b**2 + 2*tanh(x)**2*a*b + a**2),x)*a**2)/(a*(tanh(x)**2 *b + a))