\(\int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx\) [570]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 25 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=\frac {\log (a+b \sinh (x))}{b}-\frac {x \cosh (x)}{a+b \sinh (x)} \]

[Out]

ln(a+b*sinh(x))/b-x*cosh(x)/(a+b*sinh(x))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {5755, 2747, 31} \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=\frac {\log (a+b \sinh (x))}{b}-\frac {x \cosh (x)}{a+b \sinh (x)} \]

[In]

Int[(x*(b - a*Sinh[x]))/(a + b*Sinh[x])^2,x]

[Out]

Log[a + b*Sinh[x]]/b - (x*Cosh[x])/(a + b*Sinh[x])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2747

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(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] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 5755

Int[(((e_.) + (f_.)*(x_))*((A_) + (B_.)*Sinh[(c_.) + (d_.)*(x_)]))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)])^2,
x_Symbol] :> Simp[B*(e + f*x)*(Cosh[c + d*x]/(a*d*(a + b*Sinh[c + d*x]))), x] - Dist[B*(f/(a*d)), Int[Cosh[c +
 d*x]/(a + b*Sinh[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && EqQ[a*A + b*B, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {x \cosh (x)}{a+b \sinh (x)}+\int \frac {\cosh (x)}{a+b \sinh (x)} \, dx \\ & = -\frac {x \cosh (x)}{a+b \sinh (x)}+\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sinh (x)\right )}{b} \\ & = \frac {\log (a+b \sinh (x))}{b}-\frac {x \cosh (x)}{a+b \sinh (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=\frac {\log (a+b \sinh (x))}{b}-\frac {x \cosh (x)}{a+b \sinh (x)} \]

[In]

Integrate[(x*(b - a*Sinh[x]))/(a + b*Sinh[x])^2,x]

[Out]

Log[a + b*Sinh[x]]/b - (x*Cosh[x])/(a + b*Sinh[x])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(57\) vs. \(2(25)=50\).

Time = 0.62 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.32

method result size
risch \(-\frac {2 x}{b}+\frac {2 x \left (a \,{\mathrm e}^{x}-b \right )}{b \left (b \,{\mathrm e}^{2 x}+2 a \,{\mathrm e}^{x}-b \right )}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \,{\mathrm e}^{x}}{b}-1\right )}{b}\) \(58\)
parallelrisch \(\frac {\left (a +b \sinh \left (x \right )\right ) \ln \left (\frac {-2 b \sinh \left (x \right )-2 a}{\cosh \left (x \right )+1}\right )+\left (-2 b \sinh \left (x \right )-2 a \right ) \ln \left (1-\coth \left (x \right )+\operatorname {csch}\left (x \right )\right )-x \left (a +b \cosh \left (x \right )+b \sinh \left (x \right )\right )}{b \left (a +b \sinh \left (x \right )\right )}\) \(70\)

[In]

int(x*(b-a*sinh(x))/(a+b*sinh(x))^2,x,method=_RETURNVERBOSE)

[Out]

-2*x/b+2*x*(a*exp(x)-b)/b/(b*exp(2*x)+2*a*exp(x)-b)+1/b*ln(exp(2*x)+2*a/b*exp(x)-1)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 134, normalized size of antiderivative = 5.36 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=-\frac {2 \, b x \cosh \left (x\right )^{2} + 2 \, b x \sinh \left (x\right )^{2} + 2 \, a x \cosh \left (x\right ) - {\left (b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, {\left (2 \, b x \cosh \left (x\right ) + a x\right )} \sinh \left (x\right )}{b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) - b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right )} \]

[In]

integrate(x*(b-a*sinh(x))/(a+b*sinh(x))^2,x, algorithm="fricas")

[Out]

-(2*b*x*cosh(x)^2 + 2*b*x*sinh(x)^2 + 2*a*x*cosh(x) - (b*cosh(x)^2 + b*sinh(x)^2 + 2*a*cosh(x) + 2*(b*cosh(x)
+ a)*sinh(x) - b)*log(2*(b*sinh(x) + a)/(cosh(x) - sinh(x))) + 2*(2*b*x*cosh(x) + a*x)*sinh(x))/(b^2*cosh(x)^2
 + b^2*sinh(x)^2 + 2*a*b*cosh(x) - b^2 + 2*(b^2*cosh(x) + a*b)*sinh(x))

Sympy [F(-1)]

Timed out. \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=\text {Timed out} \]

[In]

integrate(x*(b-a*sinh(x))/(a+b*sinh(x))**2,x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (25) = 50\).

Time = 0.41 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.48 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=-\frac {2 \, {\left (b x e^{\left (2 \, x\right )} + a x e^{x}\right )}}{b^{2} e^{\left (2 \, x\right )} + 2 \, a b e^{x} - b^{2}} + \frac {\log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b}{b}\right )}{b} \]

[In]

integrate(x*(b-a*sinh(x))/(a+b*sinh(x))^2,x, algorithm="maxima")

[Out]

-2*(b*x*e^(2*x) + a*x*e^x)/(b^2*e^(2*x) + 2*a*b*e^x - b^2) + log((b*e^(2*x) + 2*a*e^x - b)/b)/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (25) = 50\).

Time = 0.30 (sec) , antiderivative size = 96, normalized size of antiderivative = 3.84 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=-\frac {2 \, b x e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} \log \left (-b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right ) - 2 \, a e^{x} \log \left (-b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right ) + 2 \, b x + b \log \left (-b e^{\left (2 \, x\right )} - 2 \, a e^{x} + b\right )}{b^{2} e^{\left (2 \, x\right )} + 2 \, a b e^{x} - b^{2}} \]

[In]

integrate(x*(b-a*sinh(x))/(a+b*sinh(x))^2,x, algorithm="giac")

[Out]

-(2*b*x*e^(2*x) - b*e^(2*x)*log(-b*e^(2*x) - 2*a*e^x + b) - 2*a*e^x*log(-b*e^(2*x) - 2*a*e^x + b) + 2*b*x + b*
log(-b*e^(2*x) - 2*a*e^x + b))/(b^2*e^(2*x) + 2*a*b*e^x - b^2)

Mupad [B] (verification not implemented)

Time = 2.43 (sec) , antiderivative size = 103, normalized size of antiderivative = 4.12 \[ \int \frac {x (b-a \sinh (x))}{(a+b \sinh (x))^2} \, dx=\frac {\ln \left (2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}\right )}{b}-\frac {\frac {2\,\left (x\,a^2\,b+x\,b^3\right )}{a^2\,b+b^3}-\frac {2\,{\mathrm {e}}^x\,\left (x\,a^3\,b+x\,a\,b^3\right )}{b\,\left (a^2\,b+b^3\right )}}{2\,a\,{\mathrm {e}}^x-b+b\,{\mathrm {e}}^{2\,x}}-\frac {2\,x}{b} \]

[In]

int((x*(b - a*sinh(x)))/(a + b*sinh(x))^2,x)

[Out]

log(2*a*exp(x) - b + b*exp(2*x))/b - ((2*(b^3*x + a^2*b*x))/(a^2*b + b^3) - (2*exp(x)*(a*b^3*x + a^3*b*x))/(b*
(a^2*b + b^3)))/(2*a*exp(x) - b + b*exp(2*x)) - (2*x)/b