Optimal. Leaf size=37 \[ -\frac {\coth (a-c) \log (\cosh (a+b x))}{b}+\frac {\coth (a-c) \log (\cosh (b x+c))}{b}+x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {5646, 5644, 3475} \[ -\frac {\coth (a-c) \log (\cosh (a+b x))}{b}+\frac {\coth (a-c) \log (\cosh (b x+c))}{b}+x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 5644
Rule 5646
Rubi steps
\begin {align*} \int \tanh (a+b x) \tanh (c+b x) \, dx &=x-\cosh (a-c) \int \text {sech}(a+b x) \text {sech}(c+b x) \, dx\\ &=x-\coth (a-c) \int \tanh (a+b x) \, dx+\coth (a-c) \int \tanh (c+b x) \, dx\\ &=x-\frac {\coth (a-c) \log (\cosh (a+b x))}{b}+\frac {\coth (a-c) \log (\cosh (c+b x))}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.52, size = 29, normalized size = 0.78 \[ \frac {\coth (a-c) (\log (\cosh (b x+c))-\log (\cosh (a+b x)))}{b}+x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 259, normalized size = 7.00 \[ \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 + c\right ) \cosh \left (-a + c\right ) - \sinh \left (b x + c\right ) \sinh \left (-a + c\right )\right )}}{\cosh \left (b x + c\right ) \cosh \left (-a + c\right ) - {\left (\cosh \left (-a + c\right ) + \sinh \left (-a + c\right )\right )} \sinh \left (b x + c\right ) + \cosh \left (b x + c\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 + c\right )}{\cosh \left (b x + c\right ) - \sinh \left (b x + c\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 95, normalized size = 2.57 \[ \frac {b x - \frac {{\left (e^{\left (4 \, a\right )} + e^{\left (2 \, a + 2 \, c\right )}\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}{e^{\left (4 \, a\right )} - e^{\left (2 \, a + 2 \, c\right )}} + \frac {{\left (e^{\left (2 \, a + 2 \, c\right )} + e^{\left (4 \, c\right )}\right )} \log \left (e^{\left (2 \, b x + 2 \, c\right )} + 1\right )}{e^{\left (2 \, a + 2 \, c\right )} - e^{\left (4 \, c\right )}}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.20, size = 151, normalized size = 4.08 \[ x -\frac {\ln \left (1+{\mathrm e}^{2 b x +2 a}\right ) {\mathrm e}^{2 a}}{b \left ({\mathrm e}^{2 a}-{\mathrm e}^{2 c}\right )}-\frac {\ln \left (1+{\mathrm e}^{2 b x +2 a}\right ) {\mathrm e}^{2 c}}{b \left ({\mathrm e}^{2 a}-{\mathrm e}^{2 c}\right )}+\frac {\ln \left ({\mathrm e}^{2 b x +2 a}+{\mathrm e}^{2 a -2 c}\right ) {\mathrm e}^{2 a}}{b \left ({\mathrm e}^{2 a}-{\mathrm e}^{2 c}\right )}+\frac {\ln \left ({\mathrm e}^{2 b x +2 a}+{\mathrm e}^{2 a -2 c}\right ) {\mathrm e}^{2 c}}{b \left ({\mathrm e}^{2 a}-{\mathrm e}^{2 c}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 83, normalized size = 2.24 \[ x + \frac {a}{b} - \frac {{\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \log \left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right )}{b {\left (e^{\left (2 \, a\right )} - e^{\left (2 \, c\right )}\right )}} + \frac {{\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \log \left (e^{\left (-2 \, b x\right )} + e^{\left (2 \, c\right )}\right )}{b {\left (e^{\left (2 \, a\right )} - e^{\left (2 \, c\right )}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.93, size = 115, normalized size = 3.11 \[ x-\frac {\ln \left (4\,{\mathrm {e}}^{4\,a}+4\,{\mathrm {e}}^{6\,a}\,{\mathrm {e}}^{2\,b\,x}+4\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,c}+4\,{\mathrm {e}}^{4\,a}\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,b\,x}\right )\,\mathrm {coth}\left (a-c\right )}{b}+\frac {\ln \left (4\,{\mathrm {e}}^{4\,a}+4\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,c}+4\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{2\,b\,x}+4\,{\mathrm {e}}^{4\,a}\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,b\,x}\right )\,\mathrm {coth}\left (a-c\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \tanh {\left (a + b x \right )} \tanh {\left (b x + c \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________