Optimal. Leaf size=51 \[ \frac {x}{4 a^2}-\frac {1}{4 d (a+a \tanh (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \tanh (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 3, 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}{4 d \left (a^2 \tanh (c+d x)+a^2\right )}+\frac {x}{4 a^2}-\frac {1}{4 d (a \tanh (c+d x)+a)^2} \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))^2} \, dx &=-\frac {1}{4 d (a+a \tanh (c+d x))^2}+\frac {\int \frac {1}{a+a \tanh (c+d x)} \, dx}{2 a}\\ &=-\frac {1}{4 d (a+a \tanh (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \tanh (c+d x)\right )}+\frac {\int 1 \, dx}{4 a^2}\\ &=\frac {x}{4 a^2}-\frac {1}{4 d (a+a \tanh (c+d x))^2}-\frac {1}{4 d \left (a^2+a^2 \tanh (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 60, normalized size = 1.18 \begin {gather*} \frac {\text {sech}^2(c+d x) (-4+(-1+4 d x) \cosh (2 (c+d x))+(1+4 d x) \sinh (2 (c+d x)))}{16 a^2 d (1+\tanh (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 55, normalized size = 1.08
method | result | size |
risch | \(\frac {x}{4 a^{2}}-\frac {{\mathrm e}^{-2 d x -2 c}}{4 a^{2} d}-\frac {{\mathrm e}^{-4 d x -4 c}}{16 a^{2} d}\) | \(42\) |
derivativedivides | \(\frac {-\frac {1}{4 \left (\tanh \left (d x +c \right )+1\right )^{2}}-\frac {1}{4 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{8}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{8}}{d \,a^{2}}\) | \(55\) |
default | \(\frac {-\frac {1}{4 \left (\tanh \left (d x +c \right )+1\right )^{2}}-\frac {1}{4 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{8}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{8}}{d \,a^{2}}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 43, normalized size = 0.84 \begin {gather*} \frac {d x + c}{4 \, a^{2} d} - \frac {4 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )}}{16 \, a^{2} 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. 101 vs.
\(2 (45) = 90\).
time = 0.36, size = 101, normalized size = 1.98 \begin {gather*} \frac {{\left (4 \, d x - 1\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (4 \, d x + 1\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (4 \, d x - 1\right )} \sinh \left (d x + c\right )^{2} - 4}{16 \, {\left (a^{2} d \cosh \left (d x + c\right )^{2} + 2 \, a^{2} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{2} d \sinh \left (d x + c\right )^{2}\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. 223 vs.
\(2 (41) = 82\).
time = 0.54, size = 223, normalized size = 4.37 \begin {gather*} \begin {cases} \frac {d x \tanh ^{2}{\left (c + d x \right )}}{4 a^{2} d \tanh ^{2}{\left (c + d x \right )} + 8 a^{2} d \tanh {\left (c + d x \right )} + 4 a^{2} d} + \frac {2 d x \tanh {\left (c + d x \right )}}{4 a^{2} d \tanh ^{2}{\left (c + d x \right )} + 8 a^{2} d \tanh {\left (c + d x \right )} + 4 a^{2} d} + \frac {d x}{4 a^{2} d \tanh ^{2}{\left (c + d x \right )} + 8 a^{2} d \tanh {\left (c + d x \right )} + 4 a^{2} d} - \frac {\tanh {\left (c + d x \right )}}{4 a^{2} d \tanh ^{2}{\left (c + d x \right )} + 8 a^{2} d \tanh {\left (c + d x \right )} + 4 a^{2} d} - \frac {2}{4 a^{2} d \tanh ^{2}{\left (c + d x \right )} + 8 a^{2} d \tanh {\left (c + d x \right )} + 4 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x}{\left (a \tanh {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 42, normalized size = 0.82 \begin {gather*} -\frac {\frac {{\left (4 \, e^{\left (2 \, d x + 2 \, c\right )} + 1\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{a^{2}} - \frac {4 \, {\left (d x + c\right )}}{a^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.09, size = 41, normalized size = 0.80 \begin {gather*} \frac {x}{4\,a^2}-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}}{4\,a^2\,d}-\frac {{\mathrm {e}}^{-4\,c-4\,d\,x}}{16\,a^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________