Optimal. Leaf size=50 \[ \frac{a x}{a^2-b^2}-\frac{b \log (a \cosh (c+d x)+b \sinh (c+d x))}{d \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0538593, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3484, 3530} \[ \frac{a x}{a^2-b^2}-\frac{b \log (a \cosh (c+d x)+b \sinh (c+d x))}{d \left (a^2-b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3484
Rule 3530
Rubi steps
\begin{align*} \int \frac{1}{a+b \tanh (c+d x)} \, dx &=\frac{a x}{a^2-b^2}-\frac{(i b) \int \frac{-i b-i a \tanh (c+d x)}{a+b \tanh (c+d x)} \, dx}{a^2-b^2}\\ &=\frac{a x}{a^2-b^2}-\frac{b \log (a \cosh (c+d x)+b \sinh (c+d x))}{\left (a^2-b^2\right ) d}\\ \end{align*}
Mathematica [A] time = 0.0821919, size = 64, normalized size = 1.28 \[ \frac{(b-a) \log (1-\tanh (c+d x))+(a+b) \log (\tanh (c+d x)+1)-2 b \log (a+b \tanh (c+d x))}{2 d (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 76, normalized size = 1.5 \begin{align*}{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) }{d \left ( 2\,a-2\,b \right ) }}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{d \left ( 2\,b+2\,a \right ) }}-{\frac{b\ln \left ( a+b\tanh \left ( dx+c \right ) \right ) }{d \left ( a-b \right ) \left ( a+b \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.17669, size = 76, normalized size = 1.52 \begin{align*} -\frac{b \log \left (-{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - a - b\right )}{{\left (a^{2} - b^{2}\right )} d} + \frac{d x + c}{{\left (a + b\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.32217, size = 149, normalized size = 2.98 \begin{align*} \frac{{\left (a + b\right )} d x - b \log \left (\frac{2 \,{\left (a \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{{\left (a^{2} - b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.36528, size = 224, normalized size = 4.48 \begin{align*} \begin{cases} \frac{\tilde{\infty } x}{\tanh{\left (c \right )}} & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac{d x \tanh{\left (c + d x \right )}}{2 b d \tanh{\left (c + d x \right )} - 2 b d} + \frac{d x}{2 b d \tanh{\left (c + d x \right )} - 2 b d} + \frac{1}{2 b d \tanh{\left (c + d x \right )} - 2 b d} & \text{for}\: a = - b \\\frac{d x \tanh{\left (c + d x \right )}}{2 b d \tanh{\left (c + d x \right )} + 2 b d} + \frac{d x}{2 b d \tanh{\left (c + d x \right )} + 2 b d} - \frac{1}{2 b d \tanh{\left (c + d x \right )} + 2 b d} & \text{for}\: a = b \\\frac{x}{a + b \tanh{\left (c \right )}} & \text{for}\: d = 0 \\\frac{x}{a} & \text{for}\: b = 0 \\\frac{a d x}{a^{2} d - b^{2} d} - \frac{b d x}{a^{2} d - b^{2} d} - \frac{b \log{\left (\frac{a}{b} + \tanh{\left (c + d x \right )} \right )}}{a^{2} d - b^{2} d} + \frac{b \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{a^{2} d - b^{2} d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.24107, size = 85, normalized size = 1.7 \begin{align*} -\frac{b \log \left ({\left | a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b \right |}\right )}{a^{2} d - b^{2} d} + \frac{d x + c}{a d - b d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]