Optimal. Leaf size=36 \[ -\frac{a^2 \tanh (c+d x)}{d}+\frac{2 a^2 \log (\cosh (c+d x))}{d}+2 a^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0206018, antiderivative size = 36, 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 = {3477, 3475} \[ -\frac{a^2 \tanh (c+d x)}{d}+\frac{2 a^2 \log (\cosh (c+d x))}{d}+2 a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3477
Rule 3475
Rubi steps
\begin{align*} \int (a+a \tanh (c+d x))^2 \, dx &=2 a^2 x-\frac{a^2 \tanh (c+d x)}{d}+\left (2 a^2\right ) \int \tanh (c+d x) \, dx\\ &=2 a^2 x+\frac{2 a^2 \log (\cosh (c+d x))}{d}-\frac{a^2 \tanh (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.5045, size = 58, normalized size = 1.61 \[ \frac{a^2 \text{sech}(c) \text{sech}(c+d x) (\cosh (d x) (\log (\cosh (c+d x))+d x)+\cosh (2 c+d x) (\log (\cosh (c+d x))+d x)-\sinh (d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 33, normalized size = 0.9 \begin{align*} -{\frac{{a}^{2}\tanh \left ( dx+c \right ) }{d}}-2\,{\frac{{a}^{2}\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07999, size = 68, normalized size = 1.89 \begin{align*} a^{2}{\left (x + \frac{c}{d} - \frac{2}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + a^{2} x + \frac{2 \, a^{2} \log \left (\cosh \left (d x + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.19895, size = 308, normalized size = 8.56 \begin{align*} \frac{2 \,{\left (a^{2} +{\left (a^{2} \cosh \left (d x + c\right )^{2} + 2 \, a^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{2} \sinh \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac{2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )\right )}}{d \cosh \left (d x + c\right )^{2} + 2 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + d \sinh \left (d x + c\right )^{2} + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.296032, size = 44, normalized size = 1.22 \begin{align*} \begin{cases} 4 a^{2} x - \frac{2 a^{2} \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{a^{2} \tanh{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \tanh{\left (c \right )} + a\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16192, size = 53, normalized size = 1.47 \begin{align*} 2 \, a^{2}{\left (\frac{\log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{d} + \frac{1}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]