Optimal. Leaf size=77 \[ -\frac{4 a^4 \tanh (c+d x)}{d}-\frac{\left (a^2 \tanh (c+d x)+a^2\right )^2}{d}+\frac{8 a^4 \log (\cosh (c+d x))}{d}+8 a^4 x-\frac{a (a \tanh (c+d x)+a)^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0527818, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3478, 3477, 3475} \[ -\frac{4 a^4 \tanh (c+d x)}{d}-\frac{\left (a^2 \tanh (c+d x)+a^2\right )^2}{d}+\frac{8 a^4 \log (\cosh (c+d x))}{d}+8 a^4 x-\frac{a (a \tanh (c+d x)+a)^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3478
Rule 3477
Rule 3475
Rubi steps
\begin{align*} \int (a+a \tanh (c+d x))^4 \, dx &=-\frac{a (a+a \tanh (c+d x))^3}{3 d}+(2 a) \int (a+a \tanh (c+d x))^3 \, dx\\ &=-\frac{a (a+a \tanh (c+d x))^3}{3 d}-\frac{\left (a^2+a^2 \tanh (c+d x)\right )^2}{d}+\left (4 a^2\right ) \int (a+a \tanh (c+d x))^2 \, dx\\ &=8 a^4 x-\frac{4 a^4 \tanh (c+d x)}{d}-\frac{a (a+a \tanh (c+d x))^3}{3 d}-\frac{\left (a^2+a^2 \tanh (c+d x)\right )^2}{d}+\left (8 a^4\right ) \int \tanh (c+d x) \, dx\\ &=8 a^4 x+\frac{8 a^4 \log (\cosh (c+d x))}{d}-\frac{4 a^4 \tanh (c+d x)}{d}-\frac{a (a+a \tanh (c+d x))^3}{3 d}-\frac{\left (a^2+a^2 \tanh (c+d x)\right )^2}{d}\\ \end{align*}
Mathematica [B] time = 1.08826, size = 178, normalized size = 2.31 \[ \frac{a^4 \text{sech}(c) \text{sech}^3(c+d x) (\sinh (4 d x)+\cosh (4 d x)) (12 \sinh (2 c+d x)-11 \sinh (2 c+3 d x)+6 d x \cosh (2 c+3 d x)+6 d x \cosh (4 c+3 d x)+6 \cosh (2 c+3 d x) \log (\cosh (c+d x))+6 \cosh (4 c+3 d x) \log (\cosh (c+d x))+6 \cosh (d x) (3 \log (\cosh (c+d x))+3 d x+1)+6 \cosh (2 c+d x) (3 \log (\cosh (c+d x))+3 d x+1)-21 \sinh (d x))}{6 d (\sinh (d x)+\cosh (d x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 65, normalized size = 0.8 \begin{align*} -{\frac{{a}^{4} \left ( \tanh \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-2\,{\frac{{a}^{4} \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}{d}}-7\,{\frac{{a}^{4}\tanh \left ( dx+c \right ) }{d}}-8\,{\frac{{a}^{4}\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 [B] time = 1.65821, size = 265, normalized size = 3.44 \begin{align*} \frac{1}{3} \, a^{4}{\left (3 \, x + \frac{3 \, c}{d} - \frac{4 \,{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + 2\right )}}{d{\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + 4 \, a^{4}{\left (x + \frac{c}{d} + \frac{\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac{2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d{\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + 6 \, a^{4}{\left (x + \frac{c}{d} - \frac{2}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + a^{4} x + \frac{4 \, a^{4} \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.34099, size = 1470, normalized size = 19.09 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.422028, size = 76, normalized size = 0.99 \begin{align*} \begin{cases} 16 a^{4} x - \frac{8 a^{4} \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{a^{4} \tanh ^{3}{\left (c + d x \right )}}{3 d} - \frac{2 a^{4} \tanh ^{2}{\left (c + d x \right )}}{d} - \frac{7 a^{4} \tanh{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \tanh{\left (c \right )} + a\right )^{4} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17487, size = 86, normalized size = 1.12 \begin{align*} \frac{4}{3} \, a^{4}{\left (\frac{6 \, \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{d} + \frac{18 \, e^{\left (4 \, d x + 4 \, c\right )} + 27 \, e^{\left (2 \, d x + 2 \, c\right )} + 11}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]