Optimal. Leaf size=36 \[ -\frac{\coth (a+c) \log (\cosh (c-b x))}{b}+\frac{\coth (a+c) \log (\cosh (a+b x))}{b}-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0691853, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {5646, 5644, 3475} \[ -\frac{\coth (a+c) \log (\cosh (c-b x))}{b}+\frac{\coth (a+c) \log (\cosh (a+b x))}{b}-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5646
Rule 5644
Rule 3475
Rubi steps
\begin{align*} \int \tanh (c-b x) \tanh (a+b x) \, dx &=-x+\cosh (a+c) \int \text{sech}(c-b x) \text{sech}(a+b x) \, dx\\ &=-x+\coth (a+c) \int \tanh (c-b x) \, dx+\coth (a+c) \int \tanh (a+b x) \, dx\\ &=-x-\frac{\coth (a+c) \log (\cosh (c-b x))}{b}+\frac{\coth (a+c) \log (\cosh (a+b x))}{b}\\ \end{align*}
Mathematica [A] time = 0.460417, size = 30, normalized size = 0.83 \[ \frac{\coth (a+c) (\log (\cosh (a+b x))-\log (\cosh (c-b x)))}{b}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.042, size = 149, normalized size = 4.1 \begin{align*} -x-{\frac{\ln \left ({{\rm e}^{2\,a+2\,c}}+{{\rm e}^{2\,bx+2\,a}} \right ){{\rm e}^{2\,a+2\,c}}}{b \left ({{\rm e}^{2\,a+2\,c}}-1 \right ) }}-{\frac{\ln \left ({{\rm e}^{2\,a+2\,c}}+{{\rm e}^{2\,bx+2\,a}} \right ) }{b \left ({{\rm e}^{2\,a+2\,c}}-1 \right ) }}+{\frac{\ln \left ( 1+{{\rm e}^{2\,bx+2\,a}} \right ){{\rm e}^{2\,a+2\,c}}}{b \left ({{\rm e}^{2\,a+2\,c}}-1 \right ) }}+{\frac{\ln \left ( 1+{{\rm e}^{2\,bx+2\,a}} \right ) }{b \left ({{\rm e}^{2\,a+2\,c}}-1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.71157, size = 117, normalized size = 3.25 \begin{align*} -x - \frac{a}{b} + \frac{{\left (e^{\left (2 \, a + 2 \, c\right )} + 1\right )} \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right )}{b{\left (e^{\left (2 \, a + 2 \, c\right )} - 1\right )}} - \frac{{\left (e^{\left (2 \, a + 2 \, c\right )} + 1\right )} \log \left (e^{\left (-2 \, b x + 2 \, c\right )} + 1\right )}{b{\left (e^{\left (2 \, a + 2 \, c\right )} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.97328, size = 672, normalized size = 18.67 \begin{align*} -\frac{b x \cosh \left (a + c\right )^{2} - 2 \, b x \cosh \left (a + c\right ) \sinh \left (a + c\right ) + b x \sinh \left (a + c\right )^{2} - b x -{\left (\cosh \left (a + c\right )^{2} - 2 \, \cosh \left (a + c\right ) \sinh \left (a + c\right ) + \sinh \left (a + c\right )^{2} + 1\right )} \log \left (\frac{2 \,{\left (\cosh \left (b x + a\right ) \cosh \left (a + c\right ) - \sinh \left (b x + a\right ) \sinh \left (a + c\right )\right )}}{\cosh \left (b x + a\right ) \cosh \left (a + c\right ) -{\left (\cosh \left (a + c\right ) + \sinh \left (a + c\right )\right )} \sinh \left (b x + a\right ) + \cosh \left (b x + a\right ) \sinh \left (a + c\right )}\right ) +{\left (\cosh \left (a + c\right )^{2} - 2 \, \cosh \left (a + c\right ) \sinh \left (a + c\right ) + \sinh \left (a + c\right )^{2} + 1\right )} \log \left (\frac{2 \, \cosh \left (b x + a\right )}{\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )}\right )}{b \cosh \left (a + c\right )^{2} - 2 \, b \cosh \left (a + c\right ) \sinh \left (a + c\right ) + b \sinh \left (a + c\right )^{2} - b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \tanh{\left (a + b x \right )} \tanh{\left (b x - c \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19637, size = 116, normalized size = 3.22 \begin{align*} -\frac{b x + \frac{{\left (e^{\left (2 \, a + 2 \, c\right )} + 1\right )} \log \left (e^{\left (2 \, b x\right )} + e^{\left (2 \, c\right )}\right )}{e^{\left (2 \, a + 2 \, c\right )} - 1} + \frac{{\left (e^{\left (2 \, a\right )} + e^{\left (4 \, a + 2 \, c\right )}\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}{e^{\left (2 \, a\right )} - e^{\left (4 \, a + 2 \, c\right )}}}{b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]