Optimal. Leaf size=55 \[ \frac {a x}{b \left (a^2-b^2\right )}-\frac {\log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac {x}{b (a+b \tanh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {5466, 3484, 3530} \[ \frac {a x}{b \left (a^2-b^2\right )}-\frac {\log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac {x}{b (a+b \tanh (x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3484
Rule 3530
Rule 5466
Rubi steps
\begin {align*} \int \frac {x \text {sech}^2(x)}{(a+b \tanh (x))^2} \, dx &=-\frac {x}{b (a+b \tanh (x))}+\frac {\int \frac {1}{a+b \tanh (x)} \, dx}{b}\\ &=\frac {a x}{b \left (a^2-b^2\right )}-\frac {x}{b (a+b \tanh (x))}-\frac {i \int \frac {-i b-i a \tanh (x)}{a+b \tanh (x)} \, dx}{a^2-b^2}\\ &=\frac {a x}{b \left (a^2-b^2\right )}-\frac {\log (a \cosh (x)+b \sinh (x))}{a^2-b^2}-\frac {x}{b (a+b \tanh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.19, size = 49, normalized size = 0.89 \[ \frac {b x-a \log (a \cosh (x)+b \sinh (x))}{a^3-a b^2}+\frac {x \sinh (x)}{a^2 \cosh (x)+a b \sinh (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.96, size = 182, normalized size = 3.31 \[ \frac {2 \, {\left (a + b\right )} x \cosh \relax (x)^{2} + 4 \, {\left (a + b\right )} x \cosh \relax (x) \sinh \relax (x) + 2 \, {\left (a + b\right )} x \sinh \relax (x)^{2} - {\left ({\left (a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (a + b\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a + b\right )} \sinh \relax (x)^{2} + a - b\right )} \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b \sinh \relax (x)\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{3} - a^{2} b - a b^{2} + b^{3} + {\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \cosh \relax (x)^{2} + 2 \, {\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \cosh \relax (x) \sinh \relax (x) + {\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \sinh \relax (x)^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.13, size = 174, normalized size = 3.16 \[ \frac {2 \, a x e^{\left (2 \, x\right )} + 2 \, b x e^{\left (2 \, x\right )} - a e^{\left (2 \, x\right )} \log \left (-a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} - a + b\right ) - b e^{\left (2 \, x\right )} \log \left (-a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} - a + b\right ) - a \log \left (-a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} - a + b\right ) + b \log \left (-a e^{\left (2 \, x\right )} - b e^{\left (2 \, x\right )} - a + b\right )}{a^{3} e^{\left (2 \, x\right )} + a^{2} b e^{\left (2 \, x\right )} - a b^{2} e^{\left (2 \, x\right )} - b^{3} e^{\left (2 \, x\right )} + a^{3} - a^{2} b - a b^{2} + b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.28, size = 73, normalized size = 1.33 \[ \frac {2 x}{a^{2}-b^{2}}-\frac {2 x}{\left (a \,{\mathrm e}^{2 x}+b \,{\mathrm e}^{2 x}+a -b \right ) \left (a +b \right )}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{a^{2}-b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 68, normalized size = 1.24 \[ \frac {2 \, x e^{\left (2 \, x\right )}}{a^{2} - 2 \, a b + b^{2} + {\left (a^{2} - b^{2}\right )} e^{\left (2 \, x\right )}} - \frac {\log \left (\frac {{\left (a + b\right )} e^{\left (2 \, x\right )} + a - b}{a + b}\right )}{a^{2} - b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.15, size = 69, normalized size = 1.25 \[ \frac {2\,x}{a^2-b^2}-\frac {\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^2-b^2}-\frac {2\,x}{\left (a+b\right )\,\left (a-b+{\mathrm {e}}^{2\,x}\,\left (a+b\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \operatorname {sech}^{2}{\relax (x )}}{\left (a + b \tanh {\relax (x )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________