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]
________________________________________________________________________________________
Rubi [A] time = 0.0406585, antiderivative size = 43, normalized size of antiderivative = 1., 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]
[Out]
Rule 3129
Rule 12
Rule 3124
Rule 31
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.291693, 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]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.063, size = 58, normalized size = 1.4 \begin{align*} -{\frac{1}{2\,{c}^{2}}\tanh \left ({\frac{x}{2}} \right ) }+{\frac{{a}^{2}}{2\,{c}^{3}} \left ( a+c\tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{1}{2\,c} \left ( a+c\tanh \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{a}{{c}^{3}}\ln \left ( a+c\tanh \left ({\frac{x}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.04669, size = 116, normalized size = 2.7 \begin{align*} -\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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.41647, size = 657, normalized size = 15.28 \begin{align*} \frac{2 \, a c \cosh \left (x\right ) + 2 \, a c \sinh \left (x\right ) + 2 \, a c - 2 \, c^{2} +{\left (2 \, a^{2} \cosh \left (x\right ) +{\left (a^{2} + a c\right )} \cosh \left (x\right )^{2} +{\left (a^{2} + a c\right )} \sinh \left (x\right )^{2} + a^{2} - a c + 2 \,{\left (a^{2} +{\left (a^{2} + a c\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left ({\left (a + c\right )} \cosh \left (x\right ) +{\left (a + c\right )} \sinh \left (x\right ) + a - c\right ) -{\left (2 \, a^{2} \cosh \left (x\right ) +{\left (a^{2} + a c\right )} \cosh \left (x\right )^{2} +{\left (a^{2} + a c\right )} \sinh \left (x\right )^{2} + a^{2} - a c + 2 \,{\left (a^{2} +{\left (a^{2} + a c\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right )}{2 \, a c^{3} \cosh \left (x\right ) + a c^{3} - c^{4} +{\left (a c^{3} + c^{4}\right )} \cosh \left (x\right )^{2} +{\left (a c^{3} + c^{4}\right )} \sinh \left (x\right )^{2} + 2 \,{\left (a c^{3} +{\left (a c^{3} + c^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13695, size = 113, normalized size = 2.63 \begin{align*} \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}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]