Integrand size = 13, antiderivative size = 92 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=\frac {(a+2 b) \log (1-\coth (x))}{4 (a+b)^2}-\frac {(a-2 b) \log (1+\coth (x))}{4 (a-b)^2}-\frac {b^3 \log (a+b \coth (x))}{\left (a^2-b^2\right )^2}-\frac {(b-a \coth (x)) \sinh ^2(x)}{2 \left (a^2-b^2\right )} \]
1/4*(a+2*b)*ln(1-coth(x))/(a+b)^2-1/4*(a-2*b)*ln(1+coth(x))/(a-b)^2-b^3*ln (a+b*coth(x))/(a^2-b^2)^2-1/2*(b-a*coth(x))*sinh(x)^2/(a^2-b^2)
Time = 0.46 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.82 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=\frac {-2 a^3 x+6 a b^2 x+\left (-a^2 b+b^3\right ) \cosh (2 x)-4 b^3 \log (b \cosh (x)+a \sinh (x))+a \left (a^2-b^2\right ) \sinh (2 x)}{4 (a-b)^2 (a+b)^2} \]
(-2*a^3*x + 6*a*b^2*x + (-(a^2*b) + b^3)*Cosh[2*x] - 4*b^3*Log[b*Cosh[x] + a*Sinh[x]] + a*(a^2 - b^2)*Sinh[2*x])/(4*(a - b)^2*(a + b)^2)
Time = 0.37 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.28, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3042, 25, 3987, 27, 477, 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 {\sinh ^2(x)}{a+b \coth (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {1}{\sec \left (-\frac {\pi }{2}+i x\right )^2 \left (a-i b \tan \left (-\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\sec \left (i x-\frac {\pi }{2}\right )^2 \left (a-i b \tan \left (i x-\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 3987 |
\(\displaystyle -\frac {\int \frac {b^4}{(a+b \coth (x)) \left (b^2-b^2 \coth ^2(x)\right )^2}d(b \coth (x))}{b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -b^3 \int \frac {1}{(a+b \coth (x)) \left (b^2-b^2 \coth ^2(x)\right )^2}d(b \coth (x))\) |
\(\Big \downarrow \) 477 |
\(\displaystyle -\frac {\int \left (\frac {b^4}{\left (a^2-b^2\right )^2 (a+b \coth (x))}+\frac {b^2}{4 (a+b) (b-b \coth (x))^2}+\frac {b^2}{4 (a-b) (\coth (x) b+b)^2}+\frac {(a+2 b) b}{4 (a+b)^2 (b-b \coth (x))}+\frac {(a-2 b) b}{4 (a-b)^2 (\coth (x) b+b)}\right )d(b \coth (x))}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {b^4 \log (a+b \coth (x))}{\left (a^2-b^2\right )^2}+\frac {b^2}{4 (a+b) (b-b \coth (x))}-\frac {b^2}{4 (a-b) (b \coth (x)+b)}-\frac {b (a+2 b) \log (b-b \coth (x))}{4 (a+b)^2}+\frac {b (a-2 b) \log (b \coth (x)+b)}{4 (a-b)^2}}{b}\) |
-((b^2/(4*(a + b)*(b - b*Coth[x])) - b^2/(4*(a - b)*(b + b*Coth[x])) - (b* (a + 2*b)*Log[b - b*Coth[x]])/(4*(a + b)^2) + (b^4*Log[a + b*Coth[x]])/(a^ 2 - b^2)^2 + ((a - 2*b)*b*Log[b + b*Coth[x]])/(4*(a - b)^2))/b)
3.1.99.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ a^p Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 ]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & & NiceSqrtQ[-b/a] && !FractionalPowerFactorQ[Rt[-b/a, 2]]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(b*f) Subst[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[m/2]
Time = 0.61 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.16
method | result | size |
risch | \(-\frac {a x}{2 \left (a +b \right )^{2}}-\frac {x b}{\left (a +b \right )^{2}}+\frac {{\mathrm e}^{2 x}}{8 a +8 b}-\frac {{\mathrm e}^{-2 x}}{8 \left (a -b \right )}+\frac {2 b^{3} x}{a^{4}-2 a^{2} b^{2}+b^{4}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 x}-\frac {a -b}{a +b}\right )}{a^{4}-2 a^{2} b^{2}+b^{4}}\) | \(107\) |
default | \(-\frac {8}{\left (16 a -16 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {16}{\left (32 a -32 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (-a +2 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 \left (a -b \right )^{2}}+\frac {8}{\left (16 a +16 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {16}{\left (32 a +32 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (a +2 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 \left (a +b \right )^{2}}-\frac {b^{3} \ln \left (\tanh \left (\frac {x}{2}\right )^{2} b +2 a \tanh \left (\frac {x}{2}\right )+b \right )}{\left (a -b \right )^{2} \left (a +b \right )^{2}}\) | \(155\) |
-1/2*a*x/(a+b)^2-x/(a+b)^2*b+1/8/(a+b)*exp(2*x)-1/8/(a-b)*exp(-2*x)+2*b^3/ (a^4-2*a^2*b^2+b^4)*x-b^3/(a^4-2*a^2*b^2+b^4)*ln(exp(2*x)-(a-b)/(a+b))
Leaf count of result is larger than twice the leaf count of optimal. 331 vs. \(2 (87) = 174\).
Time = 0.26 (sec) , antiderivative size = 331, normalized size of antiderivative = 3.60 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=\frac {{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{4} - 4 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x \cosh \left (x\right )^{2} - a^{3} - a^{2} b + a b^{2} + b^{3} + 2 \, {\left (3 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} - 2 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x\right )} \sinh \left (x\right )^{2} - 8 \, {\left (b^{3} \cosh \left (x\right )^{2} + 2 \, b^{3} \cosh \left (x\right ) \sinh \left (x\right ) + b^{3} \sinh \left (x\right )^{2}\right )} \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + a \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left ({\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{3} - 2 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right )}{8 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2}\right )}} \]
1/8*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^4 + 4*(a^3 - a^2*b - a*b^2 + b^3) *cosh(x)*sinh(x)^3 + (a^3 - a^2*b - a*b^2 + b^3)*sinh(x)^4 - 4*(a^3 - 3*a* b^2 - 2*b^3)*x*cosh(x)^2 - a^3 - a^2*b + a*b^2 + b^3 + 2*(3*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^2 - 2*(a^3 - 3*a*b^2 - 2*b^3)*x)*sinh(x)^2 - 8*(b^3* cosh(x)^2 + 2*b^3*cosh(x)*sinh(x) + b^3*sinh(x)^2)*log(2*(b*cosh(x) + a*si nh(x))/(cosh(x) - sinh(x))) + 4*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^3 - 2 *(a^3 - 3*a*b^2 - 2*b^3)*x*cosh(x))*sinh(x))/((a^4 - 2*a^2*b^2 + b^4)*cosh (x)^2 + 2*(a^4 - 2*a^2*b^2 + b^4)*cosh(x)*sinh(x) + (a^4 - 2*a^2*b^2 + b^4 )*sinh(x)^2)
\[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=\int \frac {\sinh ^{2}{\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \]
Time = 0.20 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.90 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=-\frac {b^{3} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} + a + b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} - \frac {{\left (a + 2 \, b\right )} x}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {e^{\left (2 \, x\right )}}{8 \, {\left (a + b\right )}} - \frac {e^{\left (-2 \, x\right )}}{8 \, {\left (a - b\right )}} \]
-b^3*log(-(a - b)*e^(-2*x) + a + b)/(a^4 - 2*a^2*b^2 + b^4) - 1/2*(a + 2*b )*x/(a^2 + 2*a*b + b^2) + 1/8*e^(2*x)/(a + b) - 1/8*e^(-2*x)/(a - b)
Time = 0.27 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.24 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=-\frac {b^{3} \log \left ({\left | -a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} - \frac {{\left (a - 2 \, b\right )} x}{2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {{\left (2 \, a e^{\left (2 \, x\right )} - 4 \, b e^{\left (2 \, x\right )} - a + b\right )} e^{\left (-2 \, x\right )}}{8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {e^{\left (2 \, x\right )}}{8 \, {\left (a + b\right )}} \]
-b^3*log(abs(-a*e^(2*x) - b*e^(2*x) + a - b))/(a^4 - 2*a^2*b^2 + b^4) - 1/ 2*(a - 2*b)*x/(a^2 - 2*a*b + b^2) + 1/8*(2*a*e^(2*x) - 4*b*e^(2*x) - a + b )*e^(-2*x)/(a^2 - 2*a*b + b^2) + 1/8*e^(2*x)/(a + b)
Time = 2.08 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.92 \[ \int \frac {\sinh ^2(x)}{a+b \coth (x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{8\,a+8\,b}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a-8\,b}-\frac {b^3\,\ln \left (b-a+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^4-2\,a^2\,b^2+b^4}-\frac {x\,\left (a-2\,b\right )}{2\,{\left (a-b\right )}^2} \]