Optimal. Leaf size=96 \[ \frac {x}{16 a^4}-\frac {1}{8 d (a+a \tanh (c+d x))^4}-\frac {1}{12 a d (a+a \tanh (c+d x))^3}-\frac {1}{16 d \left (a^2+a^2 \tanh (c+d x)\right )^2}-\frac {1}{16 d \left (a^4+a^4 \tanh (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3560, 8}
\begin {gather*} -\frac {1}{16 d \left (a^4 \tanh (c+d x)+a^4\right )}+\frac {x}{16 a^4}-\frac {1}{16 d \left (a^2 \tanh (c+d x)+a^2\right )^2}-\frac {1}{12 a d (a \tanh (c+d x)+a)^3}-\frac {1}{8 d (a \tanh (c+d x)+a)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3560
Rubi steps
\begin {align*} \int \frac {1}{(a+a \tanh (c+d x))^4} \, dx &=-\frac {1}{8 d (a+a \tanh (c+d x))^4}+\frac {\int \frac {1}{(a+a \tanh (c+d x))^3} \, dx}{2 a}\\ &=-\frac {1}{8 d (a+a \tanh (c+d x))^4}-\frac {1}{12 a d (a+a \tanh (c+d x))^3}+\frac {\int \frac {1}{(a+a \tanh (c+d x))^2} \, dx}{4 a^2}\\ &=-\frac {1}{8 d (a+a \tanh (c+d x))^4}-\frac {1}{12 a d (a+a \tanh (c+d x))^3}-\frac {1}{16 d \left (a^2+a^2 \tanh (c+d x)\right )^2}+\frac {\int \frac {1}{a+a \tanh (c+d x)} \, dx}{8 a^3}\\ &=-\frac {1}{8 d (a+a \tanh (c+d x))^4}-\frac {1}{12 a d (a+a \tanh (c+d x))^3}-\frac {1}{16 d \left (a^2+a^2 \tanh (c+d x)\right )^2}-\frac {1}{16 d \left (a^4+a^4 \tanh (c+d x)\right )}+\frac {\int 1 \, dx}{16 a^4}\\ &=\frac {x}{16 a^4}-\frac {1}{8 d (a+a \tanh (c+d x))^4}-\frac {1}{12 a d (a+a \tanh (c+d x))^3}-\frac {1}{16 d \left (a^2+a^2 \tanh (c+d x)\right )^2}-\frac {1}{16 d \left (a^4+a^4 \tanh (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 88, normalized size = 0.92 \begin {gather*} \frac {\text {sech}^4(c+d x) (-36-64 \cosh (2 (c+d x))+3 (-1+8 d x) \cosh (4 (c+d x))-32 \sinh (2 (c+d x))+3 \sinh (4 (c+d x))+24 d x \sinh (4 (c+d x)))}{384 a^4 d (1+\tanh (c+d x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.64, size = 79, normalized size = 0.82
method | result | size |
risch | \(\frac {x}{16 a^{4}}-\frac {{\mathrm e}^{-2 d x -2 c}}{8 a^{4} d}-\frac {3 \,{\mathrm e}^{-4 d x -4 c}}{32 a^{4} d}-\frac {{\mathrm e}^{-6 d x -6 c}}{24 a^{4} d}-\frac {{\mathrm e}^{-8 d x -8 c}}{128 a^{4} d}\) | \(76\) |
derivativedivides | \(\frac {-\frac {1}{8 \left (\tanh \left (d x +c \right )+1\right )^{4}}-\frac {1}{12 \left (\tanh \left (d x +c \right )+1\right )^{3}}-\frac {1}{16 \left (\tanh \left (d x +c \right )+1\right )^{2}}-\frac {1}{16 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{32}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{32}}{d \,a^{4}}\) | \(79\) |
default | \(\frac {-\frac {1}{8 \left (\tanh \left (d x +c \right )+1\right )^{4}}-\frac {1}{12 \left (\tanh \left (d x +c \right )+1\right )^{3}}-\frac {1}{16 \left (\tanh \left (d x +c \right )+1\right )^{2}}-\frac {1}{16 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{32}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{32}}{d \,a^{4}}\) | \(79\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 67, normalized size = 0.70 \begin {gather*} \frac {d x + c}{16 \, a^{4} d} - \frac {48 \, e^{\left (-2 \, d x - 2 \, c\right )} + 36 \, e^{\left (-4 \, d x - 4 \, c\right )} + 16 \, e^{\left (-6 \, d x - 6 \, c\right )} + 3 \, e^{\left (-8 \, d x - 8 \, c\right )}}{384 \, a^{4} 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. 220 vs.
\(2 (86) = 172\).
time = 0.37, size = 220, normalized size = 2.29 \begin {gather*} \frac {3 \, {\left (8 \, d x - 1\right )} \cosh \left (d x + c\right )^{4} + 12 \, {\left (8 \, d x + 1\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + 3 \, {\left (8 \, d x - 1\right )} \sinh \left (d x + c\right )^{4} + 2 \, {\left (9 \, {\left (8 \, d x - 1\right )} \cosh \left (d x + c\right )^{2} - 32\right )} \sinh \left (d x + c\right )^{2} - 64 \, \cosh \left (d x + c\right )^{2} + 4 \, {\left (3 \, {\left (8 \, d x + 1\right )} \cosh \left (d x + c\right )^{3} - 16 \, \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 36}{384 \, {\left (a^{4} d \cosh \left (d x + c\right )^{4} + 4 \, a^{4} d \cosh \left (d x + c\right )^{3} \sinh \left (d x + c\right ) + 6 \, a^{4} d \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right )^{2} + 4 \, a^{4} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a^{4} d \sinh \left (d x + c\right )^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 694 vs.
\(2 (80) = 160\).
time = 1.08, size = 694, normalized size = 7.23 \begin {gather*} \begin {cases} \frac {3 d x \tanh ^{4}{\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} + \frac {12 d x \tanh ^{3}{\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} + \frac {18 d x \tanh ^{2}{\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} + \frac {12 d x \tanh {\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} + \frac {3 d x}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} - \frac {3 \tanh ^{3}{\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} - \frac {12 \tanh ^{2}{\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} - \frac {19 \tanh {\left (c + d x \right )}}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} - \frac {16}{48 a^{4} d \tanh ^{4}{\left (c + d x \right )} + 192 a^{4} d \tanh ^{3}{\left (c + d x \right )} + 288 a^{4} d \tanh ^{2}{\left (c + d x \right )} + 192 a^{4} d \tanh {\left (c + d x \right )} + 48 a^{4} d} & \text {for}\: d \neq 0 \\\frac {x}{\left (a \tanh {\left (c \right )} + a\right )^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 64, normalized size = 0.67 \begin {gather*} -\frac {\frac {{\left (48 \, e^{\left (6 \, d x + 6 \, c\right )} + 36 \, e^{\left (4 \, d x + 4 \, c\right )} + 16 \, e^{\left (2 \, d x + 2 \, c\right )} + 3\right )} e^{\left (-8 \, d x - 8 \, c\right )}}{a^{4}} - \frac {24 \, {\left (d x + c\right )}}{a^{4}}}{384 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.14, size = 75, normalized size = 0.78 \begin {gather*} \frac {x}{16\,a^4}-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}}{8\,a^4\,d}-\frac {3\,{\mathrm {e}}^{-4\,c-4\,d\,x}}{32\,a^4\,d}-\frac {{\mathrm {e}}^{-6\,c-6\,d\,x}}{24\,a^4\,d}-\frac {{\mathrm {e}}^{-8\,c-8\,d\,x}}{128\,a^4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________