3.750 \(\int \frac {1}{(a+a \cosh (x)+c \sinh (x))^2} \, dx\)

Optimal. Leaf size=43 \[ \frac {a \log \left (a+c \tanh \left (\frac {x}{2}\right )\right )}{c^3}-\frac {a \sinh (x)+c \cosh (x)}{c^2 (a \cosh (x)+a+c \sinh (x))} \]

[Out]

a*ln(a+c*tanh(1/2*x))/c^3+(-c*cosh(x)-a*sinh(x))/c^2/(a+a*cosh(x)+c*sinh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3129, 12, 3124, 31} \[ \frac {a \log \left (a+c \tanh \left (\frac {x}{2}\right )\right )}{c^3}-\frac {a \sinh (x)+c \cosh (x)}{c^2 (a \cosh (x)+a+c \sinh (x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a*Log[a + c*Tanh[x/2]])/c^3 - (c*Cosh[x] + a*Sinh[x])/(c^2*(a + a*Cosh[x] + c*Sinh[x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

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

Rule 3124

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2], x]}, Dist[(2*f)/e, Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d +
e*x)/2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]

Rule 3129

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_), x_Symbol] :> Simp[((-(c*Cos[d
 + e*x]) + b*Sin[d + e*x])*(a + b*Cos[d + e*x] + c*Sin[d + e*x])^(n + 1))/(e*(n + 1)*(a^2 - b^2 - c^2)), x] +
Dist[1/((n + 1)*(a^2 - b^2 - c^2)), Int[(a*(n + 1) - b*(n + 2)*Cos[d + e*x] - c*(n + 2)*Sin[d + e*x])*(a + b*C
os[d + e*x] + c*Sin[d + e*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0] && LtQ[n
, -1] && NeQ[n, -3/2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.32, size = 87, normalized size = 2.02 \[ \frac {\frac {c \left (c^2-a^2\right ) \sinh \left (\frac {x}{2}\right )}{a \left (a \cosh \left (\frac {x}{2}\right )+c \sinh \left (\frac {x}{2}\right )\right )}+2 a \left (\log \left (a \cosh \left (\frac {x}{2}\right )+c \sinh \left (\frac {x}{2}\right )\right )-\log \left (\cosh \left (\frac {x}{2}\right )\right )\right )-c \tanh \left (\frac {x}{2}\right )}{2 c^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*a*(-Log[Cosh[x/2]] + Log[a*Cosh[x/2] + c*Sinh[x/2]]) + (c*(-a^2 + c^2)*Sinh[x/2])/(a*(a*Cosh[x/2] + c*Sinh[
x/2])) - c*Tanh[x/2])/(2*c^3)

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 236, normalized size = 5.49 \[ \frac {2 \, a c \cosh \relax (x) + 2 \, a c \sinh \relax (x) + 2 \, a c - 2 \, c^{2} + {\left (2 \, a^{2} \cosh \relax (x) + {\left (a^{2} + a c\right )} \cosh \relax (x)^{2} + {\left (a^{2} + a c\right )} \sinh \relax (x)^{2} + a^{2} - a c + 2 \, {\left (a^{2} + {\left (a^{2} + a c\right )} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \log \left ({\left (a + c\right )} \cosh \relax (x) + {\left (a + c\right )} \sinh \relax (x) + a - c\right ) - {\left (2 \, a^{2} \cosh \relax (x) + {\left (a^{2} + a c\right )} \cosh \relax (x)^{2} + {\left (a^{2} + a c\right )} \sinh \relax (x)^{2} + a^{2} - a c + 2 \, {\left (a^{2} + {\left (a^{2} + a c\right )} \cosh \relax (x)\right )} \sinh \relax (x)\right )} \log \left (\cosh \relax (x) + \sinh \relax (x) + 1\right )}{2 \, a c^{3} \cosh \relax (x) + a c^{3} - c^{4} + {\left (a c^{3} + c^{4}\right )} \cosh \relax (x)^{2} + {\left (a c^{3} + c^{4}\right )} \sinh \relax (x)^{2} + 2 \, {\left (a c^{3} + {\left (a c^{3} + c^{4}\right )} \cosh \relax (x)\right )} \sinh \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*a*c*cosh(x) + 2*a*c*sinh(x) + 2*a*c - 2*c^2 + (2*a^2*cosh(x) + (a^2 + a*c)*cosh(x)^2 + (a^2 + a*c)*sinh(x)^
2 + a^2 - a*c + 2*(a^2 + (a^2 + a*c)*cosh(x))*sinh(x))*log((a + c)*cosh(x) + (a + c)*sinh(x) + a - c) - (2*a^2
*cosh(x) + (a^2 + a*c)*cosh(x)^2 + (a^2 + a*c)*sinh(x)^2 + a^2 - a*c + 2*(a^2 + (a^2 + a*c)*cosh(x))*sinh(x))*
log(cosh(x) + sinh(x) + 1))/(2*a*c^3*cosh(x) + a*c^3 - c^4 + (a*c^3 + c^4)*cosh(x)^2 + (a*c^3 + c^4)*sinh(x)^2
 + 2*(a*c^3 + (a*c^3 + c^4)*cosh(x))*sinh(x))

________________________________________________________________________________________

giac [B]  time = 0.14, size = 84, normalized size = 1.95 \[ \frac {{\left (a^{2} + a c\right )} \log \left ({\left | a e^{x} + c e^{x} + a - c \right |}\right )}{a c^{3} + c^{4}} - \frac {a \log \left (e^{x} + 1\right )}{c^{3}} + \frac {2 \, {\left (a e^{x} + a - c\right )}}{{\left (a e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + 2 \, a e^{x} + a - c\right )} c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a^2 + a*c)*log(abs(a*e^x + c*e^x + a - c))/(a*c^3 + c^4) - a*log(e^x + 1)/c^3 + 2*(a*e^x + a - c)/((a*e^(2*x)
 + c*e^(2*x) + 2*a*e^x + a - c)*c^2)

________________________________________________________________________________________

maple [A]  time = 0.25, size = 58, normalized size = 1.35 \[ -\frac {\tanh \left (\frac {x}{2}\right )}{2 c^{2}}+\frac {a^{2}}{2 c^{3} \left (a +c \tanh \left (\frac {x}{2}\right )\right )}-\frac {1}{2 c \left (a +c \tanh \left (\frac {x}{2}\right )\right )}+\frac {a \ln \left (a +c \tanh \left (\frac {x}{2}\right )\right )}{c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2/c^2*tanh(1/2*x)+1/2/c^3/(a+c*tanh(1/2*x))*a^2-1/2/c/(a+c*tanh(1/2*x))+a*ln(a+c*tanh(1/2*x))/c^3

________________________________________________________________________________________

maxima [B]  time = 0.53, size = 86, normalized size = 2.00 \[ -\frac {2 \, {\left (a e^{\left (-x\right )} + a + c\right )}}{2 \, a c^{2} e^{\left (-x\right )} + a c^{2} + c^{3} + {\left (a c^{2} - c^{3}\right )} e^{\left (-2 \, x\right )}} + \frac {a \log \left (-{\left (a - c\right )} e^{\left (-x\right )} - a - c\right )}{c^{3}} - \frac {a \log \left (e^{\left (-x\right )} + 1\right )}{c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(a*e^(-x) + a + c)/(2*a*c^2*e^(-x) + a*c^2 + c^3 + (a*c^2 - c^3)*e^(-2*x)) + a*log(-(a - c)*e^(-x) - a - c)
/c^3 - a*log(e^(-x) + 1)/c^3

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{{\left (a+a\,\mathrm {cosh}\relax (x)+c\,\mathrm {sinh}\relax (x)\right )}^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________