Optimal. Leaf size=100 \[ 16 a^5 x+\frac {16 a^5 \log (\cosh (c+d x))}{d}-\frac {8 a^5 \tanh (c+d x)}{d}-\frac {2 a^2 (a+a \tanh (c+d x))^3}{3 d}-\frac {a (a+a \tanh (c+d x))^4}{4 d}-\frac {2 a \left (a^2+a^2 \tanh (c+d x)\right )^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3559, 3558,
3556} \begin {gather*} -\frac {8 a^5 \tanh (c+d x)}{d}+\frac {16 a^5 \log (\cosh (c+d x))}{d}+16 a^5 x-\frac {2 a^2 (a \tanh (c+d x)+a)^3}{3 d}-\frac {2 a \left (a^2 \tanh (c+d x)+a^2\right )^2}{d}-\frac {a (a \tanh (c+d x)+a)^4}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3558
Rule 3559
Rubi steps
\begin {align*} \int (a+a \tanh (c+d x))^5 \, dx &=-\frac {a (a+a \tanh (c+d x))^4}{4 d}+(2 a) \int (a+a \tanh (c+d x))^4 \, dx\\ &=-\frac {2 a^2 (a+a \tanh (c+d x))^3}{3 d}-\frac {a (a+a \tanh (c+d x))^4}{4 d}+\left (4 a^2\right ) \int (a+a \tanh (c+d x))^3 \, dx\\ &=-\frac {2 a^3 (a+a \tanh (c+d x))^2}{d}-\frac {2 a^2 (a+a \tanh (c+d x))^3}{3 d}-\frac {a (a+a \tanh (c+d x))^4}{4 d}+\left (8 a^3\right ) \int (a+a \tanh (c+d x))^2 \, dx\\ &=16 a^5 x-\frac {8 a^5 \tanh (c+d x)}{d}-\frac {2 a^3 (a+a \tanh (c+d x))^2}{d}-\frac {2 a^2 (a+a \tanh (c+d x))^3}{3 d}-\frac {a (a+a \tanh (c+d x))^4}{4 d}+\left (16 a^5\right ) \int \tanh (c+d x) \, dx\\ &=16 a^5 x+\frac {16 a^5 \log (\cosh (c+d x))}{d}-\frac {8 a^5 \tanh (c+d x)}{d}-\frac {2 a^3 (a+a \tanh (c+d x))^2}{d}-\frac {2 a^2 (a+a \tanh (c+d x))^3}{3 d}-\frac {a (a+a \tanh (c+d x))^4}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(202\) vs. \(2(100)=200\).
time = 0.80, size = 202, normalized size = 2.02 \begin {gather*} \frac {a^5 \text {sech}(c) \text {sech}^4(c+d x) (18 \cosh (3 c+2 d x)+48 d x \cosh (3 c+2 d x)+12 d x \cosh (3 c+4 d x)+12 d x \cosh (5 c+4 d x)+48 \cosh (3 c+2 d x) \log (\cosh (c+d x))+12 \cosh (3 c+4 d x) \log (\cosh (c+d x))+12 \cosh (5 c+4 d x) \log (\cosh (c+d x))+6 \cosh (c+2 d x) (3+8 d x+8 \log (\cosh (c+d x)))+\cosh (c) (33+72 d x+72 \log (\cosh (c+d x)))+75 \sinh (c)-70 \sinh (c+2 d x)+30 \sinh (3 c+2 d x)-25 \sinh (3 c+4 d x))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 58, normalized size = 0.58
method | result | size |
derivativedivides | \(\frac {a^{5} \left (-\frac {\left (\tanh ^{4}\left (d x +c \right )\right )}{4}-\frac {5 \left (\tanh ^{3}\left (d x +c \right )\right )}{3}-\frac {11 \left (\tanh ^{2}\left (d x +c \right )\right )}{2}-15 \tanh \left (d x +c \right )-16 \ln \left (\tanh \left (d x +c \right )-1\right )\right )}{d}\) | \(58\) |
default | \(\frac {a^{5} \left (-\frac {\left (\tanh ^{4}\left (d x +c \right )\right )}{4}-\frac {5 \left (\tanh ^{3}\left (d x +c \right )\right )}{3}-\frac {11 \left (\tanh ^{2}\left (d x +c \right )\right )}{2}-15 \tanh \left (d x +c \right )-16 \ln \left (\tanh \left (d x +c \right )-1\right )\right )}{d}\) | \(58\) |
risch | \(-\frac {32 a^{5} c}{d}+\frac {4 a^{5} \left (48 \,{\mathrm e}^{6 d x +6 c}+108 \,{\mathrm e}^{4 d x +4 c}+88 \,{\mathrm e}^{2 d x +2 c}+25\right )}{3 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{4}}+\frac {16 a^{5} \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{d}\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 302 vs.
\(2 (96) = 192\).
time = 0.48, size = 302, normalized size = 3.02 \begin {gather*} \frac {5}{3} \, a^{5} {\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 )} + a^{5} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} + \frac {4 \, {\left (e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} + 10 \, a^{5} {\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 )} + 10 \, a^{5} {\left (x + \frac {c}{d} - \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + a^{5} x + \frac {5 \, a^{5} \log \left (\cosh \left (d x + c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 907 vs.
\(2 (96) = 192\).
time = 0.35, size = 907, normalized size = 9.07 \begin {gather*} \frac {4 \, {\left (48 \, a^{5} \cosh \left (d x + c\right )^{6} + 288 \, a^{5} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + 48 \, a^{5} \sinh \left (d x + c\right )^{6} + 108 \, a^{5} \cosh \left (d x + c\right )^{4} + 88 \, a^{5} \cosh \left (d x + c\right )^{2} + 25 \, a^{5} + 36 \, {\left (20 \, a^{5} \cosh \left (d x + c\right )^{2} + 3 \, a^{5}\right )} \sinh \left (d x + c\right )^{4} + 48 \, {\left (20 \, a^{5} \cosh \left (d x + c\right )^{3} + 9 \, a^{5} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 8 \, {\left (90 \, a^{5} \cosh \left (d x + c\right )^{4} + 81 \, a^{5} \cosh \left (d x + c\right )^{2} + 11 \, a^{5}\right )} \sinh \left (d x + c\right )^{2} + 12 \, {\left (a^{5} \cosh \left (d x + c\right )^{8} + 8 \, a^{5} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{7} + a^{5} \sinh \left (d x + c\right )^{8} + 4 \, a^{5} \cosh \left (d x + c\right )^{6} + 6 \, a^{5} \cosh \left (d x + c\right )^{4} + 4 \, a^{5} \cosh \left (d x + c\right )^{2} + 4 \, {\left (7 \, a^{5} \cosh \left (d x + c\right )^{2} + a^{5}\right )} \sinh \left (d x + c\right )^{6} + 8 \, {\left (7 \, a^{5} \cosh \left (d x + c\right )^{3} + 3 \, a^{5} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{5} + a^{5} + 2 \, {\left (35 \, a^{5} \cosh \left (d x + c\right )^{4} + 30 \, a^{5} \cosh \left (d x + c\right )^{2} + 3 \, a^{5}\right )} \sinh \left (d x + c\right )^{4} + 8 \, {\left (7 \, a^{5} \cosh \left (d x + c\right )^{5} + 10 \, a^{5} \cosh \left (d x + c\right )^{3} + 3 \, a^{5} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 4 \, {\left (7 \, a^{5} \cosh \left (d x + c\right )^{6} + 15 \, a^{5} \cosh \left (d x + c\right )^{4} + 9 \, a^{5} \cosh \left (d x + c\right )^{2} + a^{5}\right )} \sinh \left (d x + c\right )^{2} + 8 \, {\left (a^{5} \cosh \left (d x + c\right )^{7} + 3 \, a^{5} \cosh \left (d x + c\right )^{5} + 3 \, a^{5} \cosh \left (d x + c\right )^{3} + a^{5} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 16 \, {\left (18 \, a^{5} \cosh \left (d x + c\right )^{5} + 27 \, a^{5} \cosh \left (d x + c\right )^{3} + 11 \, a^{5} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )}}{3 \, {\left (d \cosh \left (d x + c\right )^{8} + 8 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{7} + d \sinh \left (d x + c\right )^{8} + 4 \, d \cosh \left (d x + c\right )^{6} + 4 \, {\left (7 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{6} + 8 \, {\left (7 \, d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{5} + 6 \, d \cosh \left (d x + c\right )^{4} + 2 \, {\left (35 \, d \cosh \left (d x + c\right )^{4} + 30 \, d \cosh \left (d x + c\right )^{2} + 3 \, d\right )} \sinh \left (d x + c\right )^{4} + 8 \, {\left (7 \, d \cosh \left (d x + c\right )^{5} + 10 \, d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 4 \, d \cosh \left (d x + c\right )^{2} + 4 \, {\left (7 \, d \cosh \left (d x + c\right )^{6} + 15 \, d \cosh \left (d x + c\right )^{4} + 9 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{2} + 8 \, {\left (d \cosh \left (d x + c\right )^{7} + 3 \, d \cosh \left (d x + c\right )^{5} + 3 \, d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.14, size = 95, normalized size = 0.95 \begin {gather*} \begin {cases} 32 a^{5} x - \frac {16 a^{5} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {a^{5} \tanh ^{4}{\left (c + d x \right )}}{4 d} - \frac {5 a^{5} \tanh ^{3}{\left (c + d x \right )}}{3 d} - \frac {11 a^{5} \tanh ^{2}{\left (c + d x \right )}}{2 d} - \frac {15 a^{5} \tanh {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \tanh {\left (c \right )} + a\right )^{5} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 85, normalized size = 0.85 \begin {gather*} \frac {4 \, {\left (12 \, a^{5} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {48 \, a^{5} e^{\left (6 \, d x + 6 \, c\right )} + 108 \, a^{5} e^{\left (4 \, d x + 4 \, c\right )} + 88 \, a^{5} e^{\left (2 \, d x + 2 \, c\right )} + 25 \, a^{5}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}\right )}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.16, size = 65, normalized size = 0.65 \begin {gather*} 32\,a^5\,x-\frac {a^5\,\left (192\,\ln \left (\mathrm {tanh}\left (c+d\,x\right )+1\right )+180\,\mathrm {tanh}\left (c+d\,x\right )+66\,{\mathrm {tanh}\left (c+d\,x\right )}^2+20\,{\mathrm {tanh}\left (c+d\,x\right )}^3+3\,{\mathrm {tanh}\left (c+d\,x\right )}^4\right )}{12\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________