Optimal. Leaf size=73 \[ \frac {2 \sqrt {a-b} \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}-\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2695, 2735, 2659, 205} \[ \frac {2 \sqrt {a-b} \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}-\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 2659
Rule 2695
Rule 2735
Rubi steps
\begin {align*} \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx &=\frac {\sinh (c+d x)}{b d}+\frac {\int \frac {-b-a \cosh (c+d x)}{a+b \cosh (c+d x)} \, dx}{b}\\ &=-\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d}-\left (1-\frac {a^2}{b^2}\right ) \int \frac {1}{a+b \cosh (c+d x)} \, dx\\ &=-\frac {a x}{b^2}+\frac {\sinh (c+d x)}{b d}+\frac {\left (2 i \left (1-\frac {a^2}{b^2}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{d}\\ &=-\frac {a x}{b^2}+\frac {2 \sqrt {a-b} \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}+\frac {\sinh (c+d x)}{b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 69, normalized size = 0.95 \[ \frac {2 \sqrt {b^2-a^2} \tan ^{-1}\left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^2-a^2}}\right )-a (c+d x)+b \sinh (c+d x)}{b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 415, normalized size = 5.68 \[ \left [-\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \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 ) + 2 \, {\left (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}, -\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} + 4 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{a^{2} - b^{2}}\right ) + 2 \, {\left (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 89, normalized size = 1.22 \[ -\frac {\frac {2 \, {\left (d x + c\right )} a}{b^{2}} - \frac {e^{\left (d x + c\right )}}{b} + \frac {e^{\left (-d x - c\right )}}{b} - \frac {4 \, {\left (a^{2} - b^{2}\right )} \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 177, normalized size = 2.42 \[ -\frac {1}{d b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d \,b^{2}}-\frac {1}{d b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,b^{2}}+\frac {2 \arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right ) a^{2}}{d \,b^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {2 \arctanh \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{d \sqrt {\left (a +b \right ) \left (a -b \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.12, size = 176, normalized size = 2.41 \[ \frac {{\mathrm {e}}^{c+d\,x}}{2\,b\,d}-\frac {{\mathrm {e}}^{-c-d\,x}}{2\,b\,d}-\frac {a\,x}{b^2}+\frac {\ln \left (-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}-\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d}-\frac {\ln \left (\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 122.50, size = 1122, normalized size = 15.37 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________