### 3.571 $$\int \frac{x (b+a \cosh (x))}{(a+b \cosh (x))^2} \, dx$$

Optimal. Leaf size=25 $\frac{x \sinh (x)}{a+b \cosh (x)}-\frac{\log (a+b \cosh (x))}{b}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0579455, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.188, Rules used = {5637, 2668, 31} $\frac{x \sinh (x)}{a+b \cosh (x)}-\frac{\log (a+b \cosh (x))}{b}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 5637

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

Rule 2668

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 31

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

Rubi steps

\begin{align*} \int \frac{x (b+a \cosh (x))}{(a+b \cosh (x))^2} \, dx &=\frac{x \sinh (x)}{a+b \cosh (x)}-\int \frac{\sinh (x)}{a+b \cosh (x)} \, dx\\ &=\frac{x \sinh (x)}{a+b \cosh (x)}-\frac{\operatorname{Subst}\left (\int \frac{1}{a+x} \, dx,x,b \cosh (x)\right )}{b}\\ &=-\frac{\log (a+b \cosh (x))}{b}+\frac{x \sinh (x)}{a+b \cosh (x)}\\ \end{align*}

Mathematica [A]  time = 0.122942, size = 25, normalized size = 1. $\frac{x \sinh (x)}{a+b \cosh (x)}-\frac{\log (a+b \cosh (x))}{b}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.062, size = 55, normalized size = 2.2 \begin{align*} 2\,{\frac{x}{b}}-2\,{\frac{x \left ( a{{\rm e}^{x}}+b \right ) }{b \left ( b{{\rm e}^{2\,x}}+2\,a{{\rm e}^{x}}+b \right ) }}-{\frac{1}{b}\ln \left ({{\rm e}^{2\,x}}+2\,{\frac{a{{\rm e}^{x}}}{b}}+1 \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[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/b*a*exp(x)+1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.43145, size = 394, normalized size = 15.76 \begin{align*} \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 \cosh \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 )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*cosh(x))/(a+b*cosh(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*cosh(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)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*cosh(x))/(a+b*cosh(x))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.21412, size = 135, normalized size = 5.4 \begin{align*} \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}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*cosh(x))/(a+b*cosh(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*l
og(-b*e^(2*x) - 2*a*e^x - b))/(b^2*e^(2*x) + 2*a*b*e^x + b^2)