Optimal. Leaf size=142 \[ -\frac {b \left (3 a^2+b^2\right ) (a+b \tanh (c+d x))^2}{2 d}-\frac {4 a b^2 \left (a^2+b^2\right ) \tanh (c+d x)}{d}+\frac {b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\cosh (c+d x))}{d}+a x \left (a^4+10 a^2 b^2+5 b^4\right )-\frac {b (a+b \tanh (c+d x))^4}{4 d}-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3482, 3528, 3525, 3475} \[ -\frac {b \left (3 a^2+b^2\right ) (a+b \tanh (c+d x))^2}{2 d}-\frac {4 a b^2 \left (a^2+b^2\right ) \tanh (c+d x)}{d}+\frac {b \left (10 a^2 b^2+5 a^4+b^4\right ) \log (\cosh (c+d x))}{d}+a x \left (10 a^2 b^2+a^4+5 b^4\right )-\frac {b (a+b \tanh (c+d x))^4}{4 d}-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3482
Rule 3525
Rule 3528
Rubi steps
\begin {align*} \int (a+b \tanh (c+d x))^5 \, dx &=-\frac {b (a+b \tanh (c+d x))^4}{4 d}+\int (a+b \tanh (c+d x))^3 \left (a^2+b^2+2 a b \tanh (c+d x)\right ) \, dx\\ &=-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d}-\frac {b (a+b \tanh (c+d x))^4}{4 d}+\int (a+b \tanh (c+d x))^2 \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \tanh (c+d x)\right ) \, dx\\ &=-\frac {b \left (3 a^2+b^2\right ) (a+b \tanh (c+d x))^2}{2 d}-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d}-\frac {b (a+b \tanh (c+d x))^4}{4 d}+\int (a+b \tanh (c+d x)) \left (a^4+6 a^2 b^2+b^4+4 a b \left (a^2+b^2\right ) \tanh (c+d x)\right ) \, dx\\ &=a \left (a^4+10 a^2 b^2+5 b^4\right ) x-\frac {4 a b^2 \left (a^2+b^2\right ) \tanh (c+d x)}{d}-\frac {b \left (3 a^2+b^2\right ) (a+b \tanh (c+d x))^2}{2 d}-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d}-\frac {b (a+b \tanh (c+d x))^4}{4 d}+\left (b \left (5 a^4+10 a^2 b^2+b^4\right )\right ) \int \tanh (c+d x) \, dx\\ &=a \left (a^4+10 a^2 b^2+5 b^4\right ) x+\frac {b \left (5 a^4+10 a^2 b^2+b^4\right ) \log (\cosh (c+d x))}{d}-\frac {4 a b^2 \left (a^2+b^2\right ) \tanh (c+d x)}{d}-\frac {b \left (3 a^2+b^2\right ) (a+b \tanh (c+d x))^2}{2 d}-\frac {2 a b (a+b \tanh (c+d x))^3}{3 d}-\frac {b (a+b \tanh (c+d x))^4}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.68, size = 114, normalized size = 0.80 \[ -\frac {60 a b^2 \left (2 a^2+b^2\right ) \tanh (c+d x)+6 b^3 \left (10 a^2+b^2\right ) \tanh ^2(c+d x)+20 a b^4 \tanh ^3(c+d x)-6 (a-b)^5 \log (\tanh (c+d x)+1)+6 (a+b)^5 \log (1-\tanh (c+d x))+3 b^5 \tanh ^4(c+d x)}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 2739, normalized size = 19.29 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 224, normalized size = 1.58 \[ \frac {3 \, {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} {\left (d x + c\right )} + 3 \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {4 \, {\left (15 \, a^{3} b^{2} + 10 \, a b^{4} + 3 \, {\left (5 \, a^{3} b^{2} + 5 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} e^{\left (6 \, d x + 6 \, c\right )} + 3 \, {\left (15 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 10 \, a b^{4} + b^{5}\right )} e^{\left (4 \, d x + 4 \, c\right )} + {\left (45 \, a^{3} b^{2} + 15 \, a^{2} b^{3} + 25 \, a b^{4} + 3 \, b^{5}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 322, normalized size = 2.27 \[ -\frac {\left (\tanh ^{2}\left (d x +c \right )\right ) b^{5}}{2 d}-\frac {a^{5} \ln \left (\tanh \left (d x +c \right )-1\right )}{2 d}-\frac {5 \ln \left (\tanh \left (d x +c \right )-1\right ) a^{4} b}{2 d}-\frac {5 \ln \left (\tanh \left (d x +c \right )-1\right ) a^{3} b^{2}}{d}-\frac {5 \ln \left (\tanh \left (d x +c \right )-1\right ) a^{2} b^{3}}{d}-\frac {5 \ln \left (\tanh \left (d x +c \right )-1\right ) a \,b^{4}}{2 d}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right ) b^{5}}{2 d}+\frac {\ln \left (1+\tanh \left (d x +c \right )\right ) a^{5}}{2 d}-\frac {5 \ln \left (1+\tanh \left (d x +c \right )\right ) a^{4} b}{2 d}+\frac {5 \ln \left (1+\tanh \left (d x +c \right )\right ) a^{3} b^{2}}{d}-\frac {5 \ln \left (1+\tanh \left (d x +c \right )\right ) a^{2} b^{3}}{d}+\frac {5 \ln \left (1+\tanh \left (d x +c \right )\right ) a \,b^{4}}{2 d}-\frac {\ln \left (1+\tanh \left (d x +c \right )\right ) b^{5}}{2 d}-\frac {5 \left (\tanh ^{3}\left (d x +c \right )\right ) a \,b^{4}}{3 d}-\frac {5 \left (\tanh ^{2}\left (d x +c \right )\right ) a^{2} b^{3}}{d}-\frac {5 a \,b^{4} \tanh \left (d x +c \right )}{d}-\frac {10 a^{3} b^{2} \tanh \left (d x +c \right )}{d}-\frac {b^{5} \left (\tanh ^{4}\left (d x +c \right )\right )}{4 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 310, normalized size = 2.18 \[ \frac {5}{3} \, a b^{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 )} + b^{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^{2} b^{3} {\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^{3} b^{2} {\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^{4} b \log \left (\cosh \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.16, size = 153, normalized size = 1.08 \[ x\,\left (a^5+5\,a^4\,b+10\,a^3\,b^2+10\,a^2\,b^3+5\,a\,b^4+b^5\right )-\frac {5\,\mathrm {tanh}\left (c+d\,x\right )\,\left (2\,a^3\,b^2+a\,b^4\right )}{d}-\frac {b^5\,{\mathrm {tanh}\left (c+d\,x\right )}^4}{4\,d}-\frac {\ln \left (\mathrm {tanh}\left (c+d\,x\right )+1\right )\,\left (5\,a^4\,b+10\,a^2\,b^3+b^5\right )}{d}-\frac {{\mathrm {tanh}\left (c+d\,x\right )}^2\,\left (10\,a^2\,b^3+b^5\right )}{2\,d}-\frac {5\,a\,b^4\,{\mathrm {tanh}\left (c+d\,x\right )}^3}{3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.63, size = 211, normalized size = 1.49 \[ \begin {cases} a^{5} x + 5 a^{4} b x - \frac {5 a^{4} b \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} + 10 a^{3} b^{2} x - \frac {10 a^{3} b^{2} \tanh {\left (c + d x \right )}}{d} + 10 a^{2} b^{3} x - \frac {10 a^{2} b^{3} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {5 a^{2} b^{3} \tanh ^{2}{\left (c + d x \right )}}{d} + 5 a b^{4} x - \frac {5 a b^{4} \tanh ^{3}{\left (c + d x \right )}}{3 d} - \frac {5 a b^{4} \tanh {\left (c + d x \right )}}{d} + b^{5} x - \frac {b^{5} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {b^{5} \tanh ^{4}{\left (c + d x \right )}}{4 d} - \frac {b^{5} \tanh ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a + b \tanh {\relax (c )}\right )^{5} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________