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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {3229} \[ \int \frac {b^2-c^2+a b \cosh (x)+a c \sinh (x)}{(a+b \cosh (x)+c \sinh (x))^2} \, dx=\frac {b \sinh (x)+c \cosh (x)}{a+b \cosh (x)+c \sinh (x)} \]

[In]

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

[Out]

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

Rule 3229

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^2, x_Symbol] :> Simp[(c*B - b*C - (a*C - c*A)*Cos[d + e*x] + (a*B - b*A)
*Sin[d + e*x])/(e*(a^2 - b^2 - c^2)*(a + b*Cos[d + e*x] + c*Sin[d + e*x])), x] /; FreeQ[{a, b, c, d, e, A, B,
C}, x] && NeQ[a^2 - b^2 - c^2, 0] && EqQ[a*A - b*B - c*C, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {c \cosh (x)+b \sinh (x)}{a+b \cosh (x)+c \sinh (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.55 \[ \int \frac {b^2-c^2+a b \cosh (x)+a c \sinh (x)}{(a+b \cosh (x)+c \sinh (x))^2} \, dx=\frac {-a c+b^2 \sinh (x)-c^2 \sinh (x)}{b (a+b \cosh (x)+c \sinh (x))} \]

[In]

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

[Out]

(-(a*c) + b^2*Sinh[x] - c^2*Sinh[x])/(b*(a + b*Cosh[x] + c*Sinh[x]))

Maple [A] (verified)

Time = 1.69 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.64

method result size
risch \(-\frac {2 \left (a \,{\mathrm e}^{x}+b -c \right )}{{\mathrm e}^{2 x} b +{\mathrm e}^{2 x} c +2 a \,{\mathrm e}^{x}+b -c}\) \(36\)
default \(\frac {-\frac {2 \left (a b -b^{2}+c^{2}\right ) \tanh \left (\frac {x}{2}\right )}{a -b}-\frac {2 a c}{a -b}}{a \tanh \left (\frac {x}{2}\right )^{2}-\tanh \left (\frac {x}{2}\right )^{2} b -2 c \tanh \left (\frac {x}{2}\right )-a -b}\) \(73\)

[In]

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

[Out]

-2*(a*exp(x)+b-c)/(exp(2*x)*b+exp(2*x)*c+2*a*exp(x)+b-c)

Fricas [B] (verification not implemented)

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

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

[In]

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

[Out]

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

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F(-2)]

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

[In]

integrate((b^2-c^2+a*b*cosh(x)+a*c*sinh(x))/(a+b*cosh(x)+c*sinh(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(c^2-b^2+a^2>0)', see `assume?`
 for more de

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.59 \[ \int \frac {b^2-c^2+a b \cosh (x)+a c \sinh (x)}{(a+b \cosh (x)+c \sinh (x))^2} \, dx=-\frac {2 \, {\left (a e^{x} + b - c\right )}}{b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + 2 \, a e^{x} + b - c} \]

[In]

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

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {b^2-c^2+a b \cosh (x)+a c \sinh (x)}{(a+b \cosh (x)+c \sinh (x))^2} \, dx=\int \frac {b^2+a\,\mathrm {cosh}\left (x\right )\,b-c^2+a\,\mathrm {sinh}\left (x\right )\,c}{{\left (a+b\,\mathrm {cosh}\left (x\right )+c\,\mathrm {sinh}\left (x\right )\right )}^2} \,d x \]

[In]

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

[Out]

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