Optimal. Leaf size=31 \[ \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.0353816, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3181, 208} \[ \frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2+b^2}}\right )}{a \sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3181
Rule 208
Rubi steps
\begin{align*} \int \frac{1}{a^2+b^2 \cosh ^2(x)} \, dx &=\operatorname{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.0638357, size = 31, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{a \tanh (x)}{\sqrt{a^2+b^2}}\right )}{a \sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.047, size = 98, normalized size = 3.2 \begin{align*}{\frac{1}{2\,a}\ln \left ( \sqrt{{a}^{2}+{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,a\tanh \left ( x/2 \right ) +\sqrt{{a}^{2}+{b}^{2}} \right ){\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}}-{\frac{1}{2\,a}\ln \left ( \sqrt{{a}^{2}+{b}^{2}} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,a\tanh \left ( x/2 \right ) +\sqrt{{a}^{2}+{b}^{2}} \right ){\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.14807, size = 743, normalized size = 23.97 \begin{align*} \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 )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.10479, size = 107, normalized size = 3.45 \begin{align*} \frac{\log \left (\frac{b^{2} e^{\left (2 \, x\right )} + 2 \, a^{2} + b^{2} - 2 \, \sqrt{a^{2} + b^{2}}{\left | a \right |}}{b^{2} e^{\left (2 \, x\right )} + 2 \, a^{2} + b^{2} + 2 \, \sqrt{a^{2} + b^{2}}{\left | a \right |}}\right )}{2 \, \sqrt{a^{2} + b^{2}}{\left | a \right |}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]