Optimal. Leaf size=44 \[ -\frac {2 \tanh ^{-1}\left (\frac {b-2 a \tanh (c+d x)}{\sqrt {4 a^2+b^2}}\right )}{\sqrt {4 a^2+b^2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2745, 2739,
632, 210} \begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {b-2 a \tanh (c+d x)}{\sqrt {4 a^2+b^2}}\right )}{d \sqrt {4 a^2+b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rule 2745
Rubi steps
\begin {align*} \int \frac {1}{a+b \cosh (c+d x) \sinh (c+d x)} \, dx &=\int \frac {1}{a+\frac {1}{2} b \sinh (2 c+2 d x)} \, dx\\ &=-\frac {i \text {Subst}\left (\int \frac {1}{a-i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (2 i c+2 i d x)\right )\right )}{d}\\ &=\frac {(2 i) \text {Subst}\left (\int \frac {1}{-4 a^2-b^2-x^2} \, dx,x,-i b+2 a \tan \left (\frac {1}{2} (2 i c+2 i d x)\right )\right )}{d}\\ &=-\frac {2 \tanh ^{-1}\left (\frac {b-2 a \tanh (c+d x)}{\sqrt {4 a^2+b^2}}\right )}{\sqrt {4 a^2+b^2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 48, normalized size = 1.09 \begin {gather*} \frac {2 \text {ArcTan}\left (\frac {b-2 a \tanh (c+d x)}{\sqrt {-4 a^2-b^2}}\right )}{\sqrt {-4 a^2-b^2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(150\) vs.
\(2(40)=80\).
time = 4.67, size = 151, normalized size = 3.43
method | result | size |
risch | \(\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {4 a^{2}+b^{2}}-4 a^{2}-b^{2}}{\sqrt {4 a^{2}+b^{2}}\, b}\right )}{\sqrt {4 a^{2}+b^{2}}\, d}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {4 a^{2}+b^{2}}+4 a^{2}+b^{2}}{\sqrt {4 a^{2}+b^{2}}\, b}\right )}{\sqrt {4 a^{2}+b^{2}}\, d}\) | \(133\) |
derivativedivides | \(\frac {2 a \left (\frac {\left (-4 a^{2}-b^{2}\right ) \ln \left (-a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {4 a^{2}+b^{2}}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 \left (4 a^{2}+b^{2}\right )^{\frac {3}{2}} a}+\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {4 a^{2}+b^{2}}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{2 \sqrt {4 a^{2}+b^{2}}\, a}\right )}{d}\) | \(151\) |
default | \(\frac {2 a \left (\frac {\left (-4 a^{2}-b^{2}\right ) \ln \left (-a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {4 a^{2}+b^{2}}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 \left (4 a^{2}+b^{2}\right )^{\frac {3}{2}} a}+\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {4 a^{2}+b^{2}}\, \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{2 \sqrt {4 a^{2}+b^{2}}\, a}\right )}{d}\) | \(151\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 73, normalized size = 1.66 \begin {gather*} \frac {\log \left (\frac {b e^{\left (-2 \, d x - 2 \, c\right )} - 2 \, a - \sqrt {4 \, a^{2} + b^{2}}}{b e^{\left (-2 \, d x - 2 \, c\right )} - 2 \, a + \sqrt {4 \, a^{2} + b^{2}}}\right )}{\sqrt {4 \, a^{2} + b^{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. 299 vs.
\(2 (43) = 86\).
time = 0.39, size = 299, normalized size = 6.80 \begin {gather*} \frac {\log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 4 \, a b \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + 2 \, a b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 2 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a\right )} \sqrt {4 \, a^{2} + b^{2}}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + 2 \, a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - b}\right )}{\sqrt {4 \, a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 79, normalized size = 1.80 \begin {gather*} \frac {\log \left (\frac {{\left | 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + 4 \, a - 2 \, \sqrt {4 \, a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + 4 \, a + 2 \, \sqrt {4 \, a^{2} + b^{2}} \right |}}\right )}{\sqrt {4 \, a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.30, size = 343, normalized size = 7.80 \begin {gather*} \frac {2\,\mathrm {atan}\left (\left (\frac {b^4\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}}{16}+\frac {a^2\,b^2\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}}{4}\right )\,\left (\frac {32\,a\,\left (8\,a^2+b^2\right )}{b^4\,d\,{\left (4\,a^2+b^2\right )}^2}-{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (\frac {64\,a\,\left (16\,d\,a^3+4\,d\,a\,b^2\right )}{b^5\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}\,\left (4\,a^2+b^2\right )\,\sqrt {-d^2\,\left (4\,a^2+b^2\right )}}+\frac {16\,\left (8\,a^2+b^2\right )\,\left (8\,a^2\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}+b^2\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}\right )}{b^5\,d\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}\,{\left (4\,a^2+b^2\right )}^2}\right )+\frac {64\,a\,\left (4\,d\,a^2\,b+d\,b^3\right )}{b^5\,\sqrt {-4\,a^2\,d^2-b^2\,d^2}\,\left (4\,a^2+b^2\right )\,\sqrt {-d^2\,\left (4\,a^2+b^2\right )}}\right )\right )}{\sqrt {-4\,a^2\,d^2-b^2\,d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________