Optimal. Leaf size=50 \[ \frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (c+d x)+b \sinh (c+d x))}{d \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 50, 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 = {3484, 3530} \[ \frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (c+d x)+b \sinh (c+d x))}{d \left (a^2-b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3484
Rule 3530
Rubi steps
\begin {align*} \int \frac {1}{a+b \tanh (c+d x)} \, dx &=\frac {a x}{a^2-b^2}-\frac {(i b) \int \frac {-i b-i a \tanh (c+d x)}{a+b \tanh (c+d x)} \, dx}{a^2-b^2}\\ &=\frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (c+d x)+b \sinh (c+d x))}{\left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 64, normalized size = 1.28 \[ \frac {(b-a) \log (1-\tanh (c+d x))+(a+b) \log (\tanh (c+d x)+1)-2 b \log (a+b \tanh (c+d x))}{2 d (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.52, size = 62, normalized size = 1.24 \[ \frac {{\left (a + b\right )} d x - b \log \left (\frac {2 \, {\left (a \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{{\left (a^{2} - b^{2}\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 62, normalized size = 1.24 \[ -\frac {\frac {b \log \left ({\left | a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b \right |}\right )}{a^{2} - b^{2}} - \frac {d x + c}{a - b}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 76, normalized size = 1.52 \[ -\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{d \left (2 b +2 a \right )}+\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{d \left (2 a -2 b \right )}-\frac {b \ln \left (a +b \tanh \left (d x +c \right )\right )}{d \left (a -b \right ) \left (a +b \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 56, normalized size = 1.12 \[ -\frac {b \log \left (-{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - a - b\right )}{{\left (a^{2} - b^{2}\right )} d} + \frac {d x + c}{{\left (a + b\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.14, size = 60, normalized size = 1.20 \[ \frac {a\,x-b\,x}{a^2-b^2}+\frac {b\,\left (\ln \left (\mathrm {tanh}\left (c+d\,x\right )+1\right )-\ln \left (a+b\,\mathrm {tanh}\left (c+d\,x\right )\right )\right )}{d\,\left (a^2-b^2\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.13, size = 224, normalized size = 4.48 \[ \begin {cases} \frac {\tilde {\infty } x}{\tanh {\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac {d x \tanh {\left (c + d x \right )}}{2 b d \tanh {\left (c + d x \right )} - 2 b d} + \frac {d x}{2 b d \tanh {\left (c + d x \right )} - 2 b d} + \frac {1}{2 b d \tanh {\left (c + d x \right )} - 2 b d} & \text {for}\: a = - b \\\frac {d x \tanh {\left (c + d x \right )}}{2 b d \tanh {\left (c + d x \right )} + 2 b d} + \frac {d x}{2 b d \tanh {\left (c + d x \right )} + 2 b d} - \frac {1}{2 b d \tanh {\left (c + d x \right )} + 2 b d} & \text {for}\: a = b \\\frac {x}{a + b \tanh {\relax (c )}} & \text {for}\: d = 0 \\\frac {x}{a} & \text {for}\: b = 0 \\\frac {a d x}{a^{2} d - b^{2} d} - \frac {b d x}{a^{2} d - b^{2} d} - \frac {b \log {\left (\frac {a}{b} + \tanh {\left (c + d x \right )} \right )}}{a^{2} d - b^{2} d} + \frac {b \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{a^{2} d - b^{2} d} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________