Optimal. Leaf size=51 \[ -\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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0275757, antiderivative size = 51, normalized size of antiderivative = 1., 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 = {3479, 8} \[ -\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} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3479
Rule 8
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.170535, size = 60, normalized size = 1.18 \[ \frac{\text{sech}^2(c+d x) ((4 d x+1) \sinh (2 (c+d x))+(4 d x-1) \cosh (2 (c+d x))-4)}{16 a^2 d (\tanh (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 72, normalized size = 1.4 \begin{align*} -{\frac{1}{4\,d{a}^{2} \left ( \tanh \left ( dx+c \right ) +1 \right ) ^{2}}}-{\frac{1}{4\,d{a}^{2} \left ( \tanh \left ( dx+c \right ) +1 \right ) }}+{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) }{8\,d{a}^{2}}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{8\,d{a}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.08075, size = 58, normalized size = 1.14 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.22352, size = 270, normalized size = 5.29 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.64479, size = 223, normalized size = 4.37 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16991, size = 54, normalized size = 1.06 \begin{align*} \frac{4 \, d x -{\left (4 \, e^{\left (2 \, d x + 2 \, c\right )} + 1\right )} e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, c}{16 \, a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]