\(\int \frac {a+b \cosh (x)}{(b+a \cosh (x))^2} \, dx\) [116]

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

Optimal result

Integrand size = 15, antiderivative size = 11 \[ \int \frac {a+b \cosh (x)}{(b+a \cosh (x))^2} \, dx=\frac {\sinh (x)}{b+a \cosh (x)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2833, 8} \[ \int \frac {a+b \cosh (x)}{(b+a \cosh (x))^2} \, dx=\frac {\sinh (x)}{a \cosh (x)+b} \]

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2833

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(
b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Dist[1/((m + 1)*(a^2 - b
^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[e + f*x], x], x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rubi steps \begin{align*} \text {integral}& = \frac {\sinh (x)}{b+a \cosh (x)}+\frac {\int 0 \, dx}{a^2-b^2} \\ & = \frac {\sinh (x)}{b+a \cosh (x)} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
parallelrisch \(\frac {\sinh \left (x \right )}{b +a \cosh \left (x \right )}\) \(12\)
risch \(-\frac {2 \left ({\mathrm e}^{x} b +a \right )}{a \left (a \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{x} b +a \right )}\) \(27\)
default \(\frac {2 \tanh \left (\frac {x}{2}\right )}{\tanh \left (\frac {x}{2}\right )^{2} a -\tanh \left (\frac {x}{2}\right )^{2} b +a +b}\) \(29\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (11) = 22\).

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

[In]

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

[Out]

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

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b \cosh (x)}{(b+a \cosh (x))^2} \, dx=\text {Exception raised: ValueError} \]

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (11) = 22\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.78 (sec) , antiderivative size = 51, normalized size of antiderivative = 4.64 \[ \int \frac {a+b \cosh (x)}{(b+a \cosh (x))^2} \, dx=-\frac {\frac {2\,{\mathrm {e}}^x\,\left (a\,b^3-a^3\,b\right )}{a\,\left (a\,b^2-a^3\right )}+2}{a+2\,b\,{\mathrm {e}}^x+a\,{\mathrm {e}}^{2\,x}} \]

[In]

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

[Out]

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