Optimal. Leaf size=44 \[ -\frac {2 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2739, 632, 210}
\begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rubi steps
\begin {align*} \int \frac {1}{a+b \sinh (c+d x)} \, dx &=-\frac {(2 i) \text {Subst}\left (\int \frac {1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d}\\ &=\frac {(4 i) \text {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d}\\ &=-\frac {2 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 52, normalized size = 1.18 \begin {gather*} \frac {2 \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.66, size = 43, normalized size = 0.98
method | result | size |
derivativedivides | \(\frac {2 \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) | \(43\) |
default | \(\frac {2 \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) | \(43\) |
risch | \(\frac {\ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d}-\frac {\ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d}\) | \(111\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 67, normalized size = 1.52 \begin {gather*} \frac {\log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {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. 162 vs.
\(2 (41) = 82\).
time = 0.44, size = 162, normalized size = 3.68 \begin {gather*} \frac {\log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right )}{\sqrt {a^{2} + b^{2}} d} \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. 196 vs.
\(2 (39) = 78\).
time = 4.93, size = 196, normalized size = 4.45 \begin {gather*} \begin {cases} \frac {\tilde {\infty } x}{\sinh {\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {x}{a + b \sinh {\left (c \right )}} & \text {for}\: d = 0 \\\frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )}}{b d} & \text {for}\: a = 0 \\\frac {2 \sqrt {- b^{2}}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - b d \sqrt {- b^{2}}} & \text {for}\: a = - \sqrt {- b^{2}} \\- \frac {2 \sqrt {- b^{2}}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} + b d \sqrt {- b^{2}}} & \text {for}\: a = \sqrt {- b^{2}} \\- \frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} - \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{d \sqrt {a^{2} + b^{2}}} + \frac {\log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} + \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{d \sqrt {a^{2} + b^{2}}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 67, normalized size = 1.52 \begin {gather*} \frac {\log \left (\frac {{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.76, size = 55, normalized size = 1.25 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {a\,d+b\,d\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c}{\sqrt {-a^2\,d^2-b^2\,d^2}}\right )}{\sqrt {-a^2\,d^2-b^2\,d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________