Integrand size = 11, antiderivative size = 73 \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=-\frac {b^2 \text {arctanh}\left (\frac {(b+a \coth (x)) \sinh (x)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}+\frac {a \cosh (x)}{a^2-b^2}-\frac {b \sinh (x)}{a^2-b^2} \]
-b^2*arctanh((b+a*coth(x))*sinh(x)/(a^2-b^2)^(1/2))/(a^2-b^2)^(3/2)+a*cosh (x)/(a^2-b^2)-b*sinh(x)/(a^2-b^2)
Time = 0.74 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.10 \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\frac {a \cosh (x)}{a^2-b^2}+b \left (-\frac {2 b \arctan \left (\frac {a+b \tanh \left (\frac {x}{2}\right )}{\sqrt {-a+b} \sqrt {a+b}}\right )}{(-a+b)^{3/2} (a+b)^{3/2}}+\frac {\sinh (x)}{-a^2+b^2}\right ) \]
(a*Cosh[x])/(a^2 - b^2) + b*((-2*b*ArcTan[(a + b*Tanh[x/2])/(Sqrt[-a + b]* Sqrt[a + b])])/((-a + b)^(3/2)*(a + b)^(3/2)) + Sinh[x]/(-a^2 + b^2))
Result contains complex when optimal does not.
Time = 0.50 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.03, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.182, Rules used = {3042, 26, 3990, 26, 3042, 26, 3967, 26, 3042, 26, 3118, 3988, 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 {\sinh (x)}{a+b \coth (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i}{\sec \left (-\frac {\pi }{2}+i x\right ) \left (a-i b \tan \left (-\frac {\pi }{2}+i x\right )\right )}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {1}{\sec \left (i x-\frac {\pi }{2}\right ) \left (a-i b \tan \left (i x-\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 3990 |
\(\displaystyle -i \left (\frac {\int i (a-b \coth (x)) \sinh (x)dx}{a^2-b^2}-\frac {b^2 \int -\frac {i \text {csch}(x)}{a+b \coth (x)}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i \int (a-b \coth (x)) \sinh (x)dx}{a^2-b^2}+\frac {i b^2 \int \frac {\text {csch}(x)}{a+b \coth (x)}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {i b^2 \int \frac {i \sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}+\frac {i \int -\frac {i \left (a+i b \tan \left (i x-\frac {\pi }{2}\right )\right )}{\sec \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {\int \frac {a+i b \tan \left (i x-\frac {\pi }{2}\right )}{\sec \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle -i \left (\frac {a \int i \sinh (x)dx-i b \sinh (x)}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {i a \int \sinh (x)dx-i b \sinh (x)}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -i \left (\frac {i a \int -i \sin (i x)dx-i b \sinh (x)}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \left (\frac {a \int \sin (i x)dx-i b \sinh (x)}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 3118 |
\(\displaystyle -i \left (\frac {i a \cosh (x)-i b \sinh (x)}{a^2-b^2}-\frac {b^2 \int \frac {\sec \left (i x-\frac {\pi }{2}\right )}{a-i b \tan \left (i x-\frac {\pi }{2}\right )}dx}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 3988 |
\(\displaystyle -i \left (\frac {i a \cosh (x)-i b \sinh (x)}{a^2-b^2}-\frac {i b^2 \int \frac {1}{a^2-b^2-(b+a \coth (x))^2 \sinh ^2(x)}d((b+a \coth (x)) \sinh (x))}{a^2-b^2}\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -i \left (\frac {i a \cosh (x)-i b \sinh (x)}{a^2-b^2}-\frac {i b^2 \text {arctanh}\left (\frac {\sinh (x) (a \coth (x)+b)}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2}}\right )\) |
(-I)*(((-I)*b^2*ArcTanh[((b + a*Coth[x])*Sinh[x])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(3/2) + (I*a*Cosh[x] - I*b*Sinh[x])/(a^2 - b^2))
3.1.100.3.1 Defintions of rubi rules used
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[((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[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo l] :> Simp[-f^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f *x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ Symbol] :> Simp[1/(a^2 + b^2) Int[Sec[e + f*x]^m*(a - b*Tan[e + f*x]), x] , x] + Simp[b^2/(a^2 + b^2) Int[Sec[e + f*x]^(m + 2)/(a + b*Tan[e + f*x]) , x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && ILtQ[(m - 1)/2, 0]
Time = 0.27 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.27
method | result | size |
default | \(\frac {2 b^{2} \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {-a^{2}+b^{2}}}-\frac {8}{\left (8 a +8 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {8}{\left (8 a -8 b \right ) \left (\tanh \left (\frac {x}{2}\right )+1\right )}\) | \(93\) |
risch | \(\frac {{\mathrm e}^{x}}{2 a +2 b}+\frac {{\mathrm e}^{-x}}{2 a -2 b}+\frac {b^{2} \ln \left ({\mathrm e}^{x}-\frac {a -b}{\sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right )}-\frac {b^{2} \ln \left ({\mathrm e}^{x}+\frac {a -b}{\sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right )}\) | \(122\) |
2*b^2/(a+b)/(a-b)/(-a^2+b^2)^(1/2)*arctan(1/2*(2*b*tanh(1/2*x)+2*a)/(-a^2+ b^2)^(1/2))-8/(8*a+8*b)/(tanh(1/2*x)-1)+8/(8*a-8*b)/(tanh(1/2*x)+1)
Leaf count of result is larger than twice the leaf count of optimal. 188 vs. \(2 (69) = 138\).
Time = 0.28 (sec) , antiderivative size = 431, normalized size of antiderivative = 5.90 \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\left [\frac {a^{3} + a^{2} b - a b^{2} - b^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{2} - 2 \, {\left (b^{2} \cosh \left (x\right ) + b^{2} \sinh \left (x\right )\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} + a - b}{{\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2} - a + b}\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )\right )}}, \frac {a^{3} + a^{2} b - a b^{2} - b^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{2} \cosh \left (x\right ) + b^{2} \sinh \left (x\right )\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (\frac {\sqrt {-a^{2} + b^{2}}}{{\left (a + b\right )} \cosh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )}\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )\right )}}\right ] \]
[1/2*(a^3 + a^2*b - a*b^2 - b^3 + (a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^2 + 2*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)*sinh(x) + (a^3 - a^2*b - a*b^2 + b^3 )*sinh(x)^2 - 2*(b^2*cosh(x) + b^2*sinh(x))*sqrt(a^2 - b^2)*log(((a + b)*c osh(x)^2 + 2*(a + b)*cosh(x)*sinh(x) + (a + b)*sinh(x)^2 + 2*sqrt(a^2 - b^ 2)*(cosh(x) + sinh(x)) + a - b)/((a + b)*cosh(x)^2 + 2*(a + b)*cosh(x)*sin h(x) + (a + b)*sinh(x)^2 - a + b)))/((a^4 - 2*a^2*b^2 + b^4)*cosh(x) + (a^ 4 - 2*a^2*b^2 + b^4)*sinh(x)), 1/2*(a^3 + a^2*b - a*b^2 - b^3 + (a^3 - a^2 *b - a*b^2 + b^3)*cosh(x)^2 + 2*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)*sinh(x ) + (a^3 - a^2*b - a*b^2 + b^3)*sinh(x)^2 + 4*(b^2*cosh(x) + b^2*sinh(x))* sqrt(-a^2 + b^2)*arctan(sqrt(-a^2 + b^2)/((a + b)*cosh(x) + (a + b)*sinh(x ))))/((a^4 - 2*a^2*b^2 + b^4)*cosh(x) + (a^4 - 2*a^2*b^2 + b^4)*sinh(x))]
\[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\int \frac {\sinh {\left (x \right )}}{a + b \coth {\left (x \right )}}\, dx \]
Exception generated. \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.30 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.99 \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\frac {2 \, b^{2} \arctan \left (\frac {a e^{x} + b e^{x}}{\sqrt {-a^{2} + b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {e^{\left (-x\right )}}{2 \, {\left (a - b\right )}} + \frac {e^{x}}{2 \, {\left (a + b\right )}} \]
2*b^2*arctan((a*e^x + b*e^x)/sqrt(-a^2 + b^2))/((a^2 - b^2)*sqrt(-a^2 + b^ 2)) + 1/2*e^(-x)/(a - b) + 1/2*e^x/(a + b)
Time = 2.12 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.14 \[ \int \frac {\sinh (x)}{a+b \coth (x)} \, dx=\frac {{\mathrm {e}}^x}{2\,a+2\,b}+\frac {{\mathrm {e}}^{-x}}{2\,a-2\,b}-\frac {b^2\,\ln \left (\frac {2\,b^2\,{\mathrm {e}}^x}{-a^3-a^2\,b+a\,b^2+b^3}-\frac {2\,b^2}{{\left (a+b\right )}^{5/2}\,\sqrt {a-b}}\right )}{{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}+\frac {b^2\,\ln \left (\frac {2\,b^2}{{\left (a+b\right )}^{5/2}\,\sqrt {a-b}}+\frac {2\,b^2\,{\mathrm {e}}^x}{-a^3-a^2\,b+a\,b^2+b^3}\right )}{{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}} \]
exp(x)/(2*a + 2*b) + exp(-x)/(2*a - 2*b) - (b^2*log((2*b^2*exp(x))/(a*b^2 - a^2*b - a^3 + b^3) - (2*b^2)/((a + b)^(5/2)*(a - b)^(1/2))))/((a + b)^(3 /2)*(a - b)^(3/2)) + (b^2*log((2*b^2)/((a + b)^(5/2)*(a - b)^(1/2)) + (2*b ^2*exp(x))/(a*b^2 - a^2*b - a^3 + b^3)))/((a + b)^(3/2)*(a - b)^(3/2))