Optimal. Leaf size=35 \[ \frac {\tanh ^{-1}\left (\frac {a \tanh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3260, 214}
\begin {gather*} \frac {\tanh ^{-1}\left (\frac {a \tanh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3260
Rubi steps
\begin {align*} \int \frac {1}{a^2-b^2 \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{a^2-\left (a^2-b^2\right ) x^2} \, dx,x,\coth (x)\right )\\ &=\frac {\tanh ^{-1}\left (\frac {a \tanh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 35, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}\left (\frac {a \tanh (x)}{\sqrt {a^2-b^2}}\right )}{a \sqrt {a^2-b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 20.19, size = 1175, normalized size = 33.57 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\text {DirectedInfinity}\left [\text {Tanh}\left [x\right ]\right ],a\text {==}0\text {\&\&}b\text {==}0\right \},\left \{-\frac {\text {Tanh}\left [x\right ]}{b^2},a\text {==}0\right \},\left \{\frac {\frac {1}{\text {Tanh}\left [\frac {x}{2}\right ]}+\text {Tanh}\left [\frac {x}{2}\right ]}{2 b^2},a\text {==}b\text {$\vert $$\vert $}a\text {==}-b\right \}\right \},-\frac {a \text {Log}\left [\text {Tanh}\left [\frac {x}{2}\right ]-\sqrt {\frac {a}{a+b}-\frac {b}{a+b}}\right ] \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}-\frac {a \text {Log}\left [\text {Tanh}\left [\frac {x}{2}\right ]-\sqrt {\frac {a}{a-b}+\frac {b}{a-b}}\right ] \sqrt {\frac {a}{a+b}-\frac {b}{a+b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}+\frac {a \text {Log}\left [\sqrt {\frac {a}{a+b}-\frac {b}{a+b}}+\text {Tanh}\left [\frac {x}{2}\right ]\right ] \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}+\frac {a \text {Log}\left [\sqrt {\frac {a}{a-b}+\frac {b}{a-b}}+\text {Tanh}\left [\frac {x}{2}\right ]\right ] \sqrt {\frac {a}{a+b}-\frac {b}{a+b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}-\frac {b \text {Log}\left [\sqrt {\frac {a}{a+b}-\frac {b}{a+b}}+\text {Tanh}\left [\frac {x}{2}\right ]\right ] \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}-\frac {b \text {Log}\left [\text {Tanh}\left [\frac {x}{2}\right ]-\sqrt {\frac {a}{a-b}+\frac {b}{a-b}}\right ] \sqrt {\frac {a}{a+b}-\frac {b}{a+b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}+\frac {b \text {Log}\left [\sqrt {\frac {a}{a-b}+\frac {b}{a-b}}+\text {Tanh}\left [\frac {x}{2}\right ]\right ] \sqrt {\frac {a}{a+b}-\frac {b}{a+b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}+\frac {b \text {Log}\left [\text {Tanh}\left [\frac {x}{2}\right ]-\sqrt {\frac {a}{a+b}-\frac {b}{a+b}}\right ] \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}{2 a^3 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}-2 a b^2 \sqrt {\frac {a}{a+b}-\frac {b}{a+b}} \sqrt {\frac {a}{a-b}+\frac {b}{a-b}}}\right ] \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(73\) vs.
\(2(31)=62\).
time = 0.07, size = 74, normalized size = 2.11
method | result | size |
default | \(\frac {\arctanh \left (\frac {\left (a +b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \sqrt {\left (a +b \right ) \left (a -b \right )}}+\frac {\arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \sqrt {\left (a +b \right ) \left (a -b \right )}}\) | \(74\) |
risch | \(\frac {\ln \left ({\mathrm e}^{2 x}-\frac {2 a^{2} \sqrt {a^{2}-b^{2}}-b^{2} \sqrt {a^{2}-b^{2}}-2 a^{3}+2 a \,b^{2}}{b^{2} \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}\, a}-\frac {\ln \left ({\mathrm e}^{2 x}-\frac {2 a^{2} \sqrt {a^{2}-b^{2}}-b^{2} \sqrt {a^{2}-b^{2}}+2 a^{3}-2 a \,b^{2}}{b^{2} \sqrt {a^{2}-b^{2}}}\right )}{2 \sqrt {a^{2}-b^{2}}\, a}\) | \(166\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \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. 84 vs.
\(2 (31) = 62\).
time = 0.32, size = 388, normalized size = 11.09 \begin {gather*} \left [\frac {\sqrt {a^{2} - b^{2}} \log \left (\frac {b^{4} \cosh \left (x\right )^{4} + 4 \, b^{4} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{4} \sinh \left (x\right )^{4} + 8 \, a^{4} - 8 \, a^{2} b^{2} + b^{4} - 2 \, {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{4} \cosh \left (x\right )^{2} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b^{4} \cosh \left (x\right )^{3} - {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + 4 \, {\left (a b^{2} \cosh \left (x\right )^{2} + 2 \, a b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + a b^{2} \sinh \left (x\right )^{2} - 2 \, a^{3} + a b^{2}\right )} \sqrt {a^{2} - b^{2}}}{b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} - 2 \, {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} - 2 \, a^{2} + b^{2}\right )} \sinh \left (x\right )^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} - {\left (2 \, a^{2} - b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )}\right )}{2 \, {\left (a^{3} - a b^{2}\right )}}, \frac {\sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {{\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2} - 2 \, a^{2} + b^{2}\right )} \sqrt {-a^{2} + b^{2}}}{2 \, {\left (a^{3} - a b^{2}\right )}}\right )}{a^{3} - a b^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 16.06, size = 874, normalized size = 24.97
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 54, normalized size = 1.54 \begin {gather*} -\frac {\arctan \left (\frac {-2 a^{2}+b^{2} \left (\mathrm {e}^{x}\right )^{2}+b^{2}}{2 a \sqrt {-a^{2}+b^{2}}}\right )}{a \sqrt {-a^{2}+b^{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.38, size = 106, normalized size = 3.03 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {b^2\,{\left (a^2\,b^2-a^4\right )}^{3/2}-2\,a^2\,{\left (a^2\,b^2-a^4\right )}^{3/2}+b^2\,{\mathrm {e}}^{2\,x}\,{\left (a^2\,b^2-a^4\right )}^{3/2}}{2\,a^8-4\,a^6\,b^2+2\,a^4\,b^4}\right )}{\sqrt {a^2\,b^2-a^4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________