Integrand size = 13, antiderivative size = 57 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {\left (a^2-b^2\right ) \log (\cosh (x))}{a^3}-\frac {\left (a^2-b^2\right ) \log (a+b \cosh (x))}{a^3}-\frac {b \text {sech}(x)}{a^2}+\frac {\text {sech}^2(x)}{2 a} \] Output:
(a^2-b^2)*ln(cosh(x))/a^3-(a^2-b^2)*ln(a+b*cosh(x))/a^3-b*sech(x)/a^2+1/2* sech(x)^2/a
Time = 0.10 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.81 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {2 \left (a^2-b^2\right ) (\log (\cosh (x))-\log (a+b \cosh (x)))-2 a b \text {sech}(x)+a^2 \text {sech}^2(x)}{2 a^3} \] Input:
Integrate[Tanh[x]^3/(a + b*Cosh[x]),x]
Output:
(2*(a^2 - b^2)*(Log[Cosh[x]] - Log[a + b*Cosh[x]]) - 2*a*b*Sech[x] + a^2*S ech[x]^2)/(2*a^3)
Time = 0.34 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 26, 3200, 522, 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 \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i}{\tan \left (-\frac {\pi }{2}+i x\right )^3 \left (a-b \sin \left (-\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {1}{\left (a-b \sin \left (i x-\frac {\pi }{2}\right )\right ) \tan \left (i x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle -\int \frac {\left (b^2-b^2 \cosh ^2(x)\right ) \text {sech}^3(x)}{b^3 (a+b \cosh (x))}d(b \cosh (x))\) |
\(\Big \downarrow \) 522 |
\(\displaystyle -\int \left (\frac {\text {sech}^3(x)}{a b}-\frac {\text {sech}^2(x)}{a^2}+\frac {\left (b^2-a^2\right ) \text {sech}(x)}{a^3 b}+\frac {a^2-b^2}{a^3 (a+b \cosh (x))}\right )d(b \cosh (x))\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b \text {sech}(x)}{a^2}+\frac {\left (a^2-b^2\right ) \log (b \cosh (x))}{a^3}-\frac {\left (a^2-b^2\right ) \log (a+b \cosh (x))}{a^3}+\frac {\text {sech}^2(x)}{2 a}\) |
Input:
Int[Tanh[x]^3/(a + b*Cosh[x]),x]
Output:
((a^2 - b^2)*Log[b*Cosh[x]])/a^3 - ((a^2 - b^2)*Log[a + b*Cosh[x]])/a^3 - (b*Sech[x])/a^2 + Sech[x]^2/(2*a)
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[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 0.77 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.67
method | result | size |
default | \(\frac {\frac {2 a^{2}}{\left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )^{2}}-\frac {2 a \left (a +b \right )}{\tanh \left (\frac {x}{2}\right )^{2}+1}+\left (a^{2}-b^{2}\right ) \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )}{a^{3}}-\frac {\left (a +b \right ) \left (a -b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )^{2} a -b \tanh \left (\frac {x}{2}\right )^{2}-a -b \right )}{a^{3}}\) | \(95\) |
risch | \(\frac {2 \,{\mathrm e}^{x} \left (-{\mathrm e}^{2 x} b +a \,{\mathrm e}^{x}-b \right )}{\left ({\mathrm e}^{2 x}+1\right )^{2} a^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}+1\right )}{a}-\frac {\ln \left ({\mathrm e}^{2 x}+1\right ) b^{2}}{a^{3}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}+1\right )}{a}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}+1\right ) b^{2}}{a^{3}}\) | \(100\) |
Input:
int(tanh(x)^3/(a+b*cosh(x)),x,method=_RETURNVERBOSE)
Output:
1/a^3*(2*a^2/(tanh(1/2*x)^2+1)^2-2*a*(a+b)/(tanh(1/2*x)^2+1)+(a^2-b^2)*ln( tanh(1/2*x)^2+1))-(a+b)*(a-b)/a^3*ln(tanh(1/2*x)^2*a-b*tanh(1/2*x)^2-a-b)
Leaf count of result is larger than twice the leaf count of optimal. 450 vs. \(2 (55) = 110\).
Time = 0.10 (sec) , antiderivative size = 450, normalized size of antiderivative = 7.89 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=-\frac {2 \, a b \cosh \left (x\right )^{3} + 2 \, a b \sinh \left (x\right )^{3} - 2 \, a^{2} \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, {\left (3 \, a b \cosh \left (x\right ) - a^{2}\right )} \sinh \left (x\right )^{2} + {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{4} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2} + 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \sinh \left (x\right )^{4} + 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + a^{2} - b^{2}\right )} \sinh \left (x\right )^{2} + a^{2} - b^{2} + 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cosh \left (x\right )^{3} + {\left (a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\frac {2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (3 \, a b \cosh \left (x\right )^{2} - 2 \, a^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right )}{a^{3} \cosh \left (x\right )^{4} + 4 \, a^{3} \cosh \left (x\right ) \sinh \left (x\right )^{3} + a^{3} \sinh \left (x\right )^{4} + 2 \, a^{3} \cosh \left (x\right )^{2} + a^{3} + 2 \, {\left (3 \, a^{3} \cosh \left (x\right )^{2} + a^{3}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (a^{3} \cosh \left (x\right )^{3} + a^{3} \cosh \left (x\right )\right )} \sinh \left (x\right )} \] Input:
integrate(tanh(x)^3/(a+b*cosh(x)),x, algorithm="fricas")
Output:
-(2*a*b*cosh(x)^3 + 2*a*b*sinh(x)^3 - 2*a^2*cosh(x)^2 + 2*a*b*cosh(x) + 2* (3*a*b*cosh(x) - a^2)*sinh(x)^2 + ((a^2 - b^2)*cosh(x)^4 + 4*(a^2 - b^2)*c osh(x)*sinh(x)^3 + (a^2 - b^2)*sinh(x)^4 + 2*(a^2 - b^2)*cosh(x)^2 + 2*(3* (a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 - b^2 + 4*((a^2 - b^2)* cosh(x)^3 + (a^2 - b^2)*cosh(x))*sinh(x))*log(2*(b*cosh(x) + a)/(cosh(x) - sinh(x))) - ((a^2 - b^2)*cosh(x)^4 + 4*(a^2 - b^2)*cosh(x)*sinh(x)^3 + (a ^2 - b^2)*sinh(x)^4 + 2*(a^2 - b^2)*cosh(x)^2 + 2*(3*(a^2 - b^2)*cosh(x)^2 + a^2 - b^2)*sinh(x)^2 + a^2 - b^2 + 4*((a^2 - b^2)*cosh(x)^3 + (a^2 - b^ 2)*cosh(x))*sinh(x))*log(2*cosh(x)/(cosh(x) - sinh(x))) + 2*(3*a*b*cosh(x) ^2 - 2*a^2*cosh(x) + a*b)*sinh(x))/(a^3*cosh(x)^4 + 4*a^3*cosh(x)*sinh(x)^ 3 + a^3*sinh(x)^4 + 2*a^3*cosh(x)^2 + a^3 + 2*(3*a^3*cosh(x)^2 + a^3)*sinh (x)^2 + 4*(a^3*cosh(x)^3 + a^3*cosh(x))*sinh(x))
\[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\int \frac {\tanh ^{3}{\left (x \right )}}{a + b \cosh {\left (x \right )}}\, dx \] Input:
integrate(tanh(x)**3/(a+b*cosh(x)),x)
Output:
Integral(tanh(x)**3/(a + b*cosh(x)), x)
Time = 0.13 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.68 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=-\frac {2 \, {\left (b e^{\left (-x\right )} - a e^{\left (-2 \, x\right )} + b e^{\left (-3 \, x\right )}\right )}}{2 \, a^{2} e^{\left (-2 \, x\right )} + a^{2} e^{\left (-4 \, x\right )} + a^{2}} - \frac {{\left (a^{2} - b^{2}\right )} \log \left (2 \, a e^{\left (-x\right )} + b e^{\left (-2 \, x\right )} + b\right )}{a^{3}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left (e^{\left (-2 \, x\right )} + 1\right )}{a^{3}} \] Input:
integrate(tanh(x)^3/(a+b*cosh(x)),x, algorithm="maxima")
Output:
-2*(b*e^(-x) - a*e^(-2*x) + b*e^(-3*x))/(2*a^2*e^(-2*x) + a^2*e^(-4*x) + a ^2) - (a^2 - b^2)*log(2*a*e^(-x) + b*e^(-2*x) + b)/a^3 + (a^2 - b^2)*log(e ^(-2*x) + 1)/a^3
Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (55) = 110\).
Time = 0.11 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.02 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {{\left (a^{2} - b^{2}\right )} \log \left (e^{\left (-x\right )} + e^{x}\right )}{a^{3}} - \frac {{\left (a^{2} b - b^{3}\right )} \log \left ({\left | b {\left (e^{\left (-x\right )} + e^{x}\right )} + 2 \, a \right |}\right )}{a^{3} b} - \frac {3 \, a^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 3 \, b^{2} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 4 \, a b {\left (e^{\left (-x\right )} + e^{x}\right )} - 4 \, a^{2}}{2 \, a^{3} {\left (e^{\left (-x\right )} + e^{x}\right )}^{2}} \] Input:
integrate(tanh(x)^3/(a+b*cosh(x)),x, algorithm="giac")
Output:
(a^2 - b^2)*log(e^(-x) + e^x)/a^3 - (a^2*b - b^3)*log(abs(b*(e^(-x) + e^x) + 2*a))/(a^3*b) - 1/2*(3*a^2*(e^(-x) + e^x)^2 - 3*b^2*(e^(-x) + e^x)^2 + 4*a*b*(e^(-x) + e^x) - 4*a^2)/(a^3*(e^(-x) + e^x)^2)
Time = 2.61 (sec) , antiderivative size = 1221, normalized size of antiderivative = 21.42 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx =\text {Too large to display} \] Input:
int(tanh(x)^3/(a + b*cosh(x)),x)
Output:
(2/a - (2*b*exp(x))/a^2)/(exp(2*x) + 1) - 2/(a*(2*exp(2*x) + exp(4*x) + 1) ) + ((2*atan((4*a^4*b^3*(a^2 - b^2)^2*(-a^6)^(1/2) - 4*a^6*b*(a^2 - b^2)^2 *(-a^6)^(1/2))*(exp(x)*(1/(16*a^4*b^2*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2)) - (a^2 - 2*b^2)^2/(16*a^8*b^2*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2))) + 1/( 8*a^5*b*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2)) + (a^2 - 2*b^2)/(8*a^7*b*(a^2 - b^2)^3*((a^2 - b^2)^2)^(1/2)))) + 2*atan((a^2*(-a^6)^(1/2)*(a^4 + b^4 - 2*a^2*b^2)^(1/2) - 2*b^2*(-a^6)^(1/2)*(a^4 + b^4 - 2*a^2*b^2)^(1/2))/(2*a ^3*(a^2 - b^2)^2) + ((a^7 - a^5*b^2)*(-a^6)^(1/2))/(2*a^6*(a^2 - b^2)*((a^ 2 - b^2)^2)^(1/2)) + (a^6*b^2*exp(3*x)*((2*(a^7 - a^5*b^2)*(a^4 + b^4 - 2* a^2*b^2)^(1/2))/(a^11*b^3*(a^2 - b^2)*((a^2 - b^2)^2)^(1/2)) - (2*(a^2 - 2 *b^2)*(a^2*(-a^6)^(1/2)*(a^4 + b^4 - 2*a^2*b^2)^(1/2) - 2*b^2*(-a^6)^(1/2) *(a^4 + b^4 - 2*a^2*b^2)^(1/2))*(a^4 + b^4 - 2*a^2*b^2)^(1/2))/(a^10*b^3*( a^2 - b^2)^2*(-a^6)^(1/2)))*(-a^6)^(1/2))/(8*(a^4 + b^4 - 2*a^2*b^2)^(1/2) ) - (a^6*b^2*exp(x)*(-a^6)^(1/2)*((8*(a^4 + b^4 - 2*a^2*b^2))/(a^8*b*(a^2 - b^2)^2) - (4*(2*a^6*b - 2*a^4*b^3)*(a^4 + b^4 - 2*a^2*b^2)^(1/2))/(a^12* b^2*(a^2 - b^2)*((a^2 - b^2)^2)^(1/2)) - (2*(a^7 - a^5*b^2)*(a^4 + b^4 - 2 *a^2*b^2)^(1/2))/(a^11*b^3*(a^2 - b^2)*((a^2 - b^2)^2)^(1/2)) + (2*(a^2 - 2*b^2)*(a^2*(-a^6)^(1/2)*(a^4 + b^4 - 2*a^2*b^2)^(1/2) - 2*b^2*(-a^6)^(1/2 )*(a^4 + b^4 - 2*a^2*b^2)^(1/2))*(a^4 + b^4 - 2*a^2*b^2)^(1/2))/(a^10*b^3* (a^2 - b^2)^2*(-a^6)^(1/2))))/(8*(a^4 + b^4 - 2*a^2*b^2)^(1/2)) + (a^6*...
Time = 0.23 (sec) , antiderivative size = 292, normalized size of antiderivative = 5.12 \[ \int \frac {\tanh ^3(x)}{a+b \cosh (x)} \, dx=\frac {e^{4 x} \mathrm {log}\left (e^{2 x}+1\right ) a^{2}-e^{4 x} \mathrm {log}\left (e^{2 x}+1\right ) b^{2}-e^{4 x} \mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) a^{2}+e^{4 x} \mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) b^{2}-e^{4 x} a^{2}-2 e^{3 x} a b +2 e^{2 x} \mathrm {log}\left (e^{2 x}+1\right ) a^{2}-2 e^{2 x} \mathrm {log}\left (e^{2 x}+1\right ) b^{2}-2 e^{2 x} \mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) a^{2}+2 e^{2 x} \mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) b^{2}-2 e^{x} a b +\mathrm {log}\left (e^{2 x}+1\right ) a^{2}-\mathrm {log}\left (e^{2 x}+1\right ) b^{2}-\mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) a^{2}+\mathrm {log}\left (e^{2 x} b +2 e^{x} a +b \right ) b^{2}-a^{2}}{a^{3} \left (e^{4 x}+2 e^{2 x}+1\right )} \] Input:
int(tanh(x)^3/(a+b*cosh(x)),x)
Output:
(e**(4*x)*log(e**(2*x) + 1)*a**2 - e**(4*x)*log(e**(2*x) + 1)*b**2 - e**(4 *x)*log(e**(2*x)*b + 2*e**x*a + b)*a**2 + e**(4*x)*log(e**(2*x)*b + 2*e**x *a + b)*b**2 - e**(4*x)*a**2 - 2*e**(3*x)*a*b + 2*e**(2*x)*log(e**(2*x) + 1)*a**2 - 2*e**(2*x)*log(e**(2*x) + 1)*b**2 - 2*e**(2*x)*log(e**(2*x)*b + 2*e**x*a + b)*a**2 + 2*e**(2*x)*log(e**(2*x)*b + 2*e**x*a + b)*b**2 - 2*e* *x*a*b + log(e**(2*x) + 1)*a**2 - log(e**(2*x) + 1)*b**2 - log(e**(2*x)*b + 2*e**x*a + b)*a**2 + log(e**(2*x)*b + 2*e**x*a + b)*b**2 - a**2)/(a**3*( e**(4*x) + 2*e**(2*x) + 1))