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.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]
[Out]
Rule 12
Rule 31
Rule 3124
Rule 3129
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________