Optimal. Leaf size=28 \[ \frac {x}{2 a}-\frac {1}{2 d (a+a \tanh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps
used = 2, 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 {x}{2 a}-\frac {1}{2 d (a \tanh (c+d x)+a)} \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)} \, dx &=-\frac {1}{2 d (a+a \tanh (c+d x))}+\frac {\int 1 \, dx}{2 a}\\ &=\frac {x}{2 a}-\frac {1}{2 d (a+a \tanh (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 39, normalized size = 1.39 \begin {gather*} \frac {-1+2 d x+(1+2 d x) \tanh (c+d x)}{4 a d (1+\tanh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.52, size = 43, normalized size = 1.54
method | result | size |
risch | \(\frac {x}{2 a}-\frac {{\mathrm e}^{-2 d x -2 c}}{4 a d}\) | \(25\) |
derivativedivides | \(\frac {-\frac {1}{2 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{4}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{4}}{d a}\) | \(43\) |
default | \(\frac {-\frac {1}{2 \left (\tanh \left (d x +c \right )+1\right )}+\frac {\ln \left (\tanh \left (d x +c \right )+1\right )}{4}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{4}}{d a}\) | \(43\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 31, normalized size = 1.11 \begin {gather*} \frac {d x + c}{2 \, a d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{4 \, a 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. 50 vs.
\(2 (24) = 48\).
time = 0.39, size = 50, normalized size = 1.79 \begin {gather*} \frac {{\left (2 \, d x - 1\right )} \cosh \left (d x + c\right ) + {\left (2 \, d x + 1\right )} \sinh \left (d x + c\right )}{4 \, {\left (a d \cosh \left (d x + c\right ) + a d \sinh \left (d x + c\right )\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. 73 vs.
\(2 (19) = 38\).
time = 0.31, size = 73, normalized size = 2.61 \begin {gather*} \begin {cases} \frac {d x \tanh {\left (c + d x \right )}}{2 a d \tanh {\left (c + d x \right )} + 2 a d} + \frac {d x}{2 a d \tanh {\left (c + d x \right )} + 2 a d} - \frac {1}{2 a d \tanh {\left (c + d x \right )} + 2 a d} & \text {for}\: d \neq 0 \\\frac {x}{a \tanh {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 30, normalized size = 1.07 \begin {gather*} \frac {\frac {2 \, {\left (d x + c\right )}}{a} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{a}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.07, size = 25, normalized size = 0.89 \begin {gather*} \frac {x}{2\,a}-\frac {1}{2\,a\,d\,\left (\mathrm {tanh}\left (c+d\,x\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________