Optimal. Leaf size=244 \[ \frac {\sqrt {a^2-b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d^2}-\frac {\sqrt {a^2-b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d^2}+\frac {x \sqrt {a^2-b^2} \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}+1\right )}{b^2 d}-\frac {x \sqrt {a^2-b^2} \log \left (\frac {b e^{c+d x}}{\sqrt {a^2-b^2}+a}+1\right )}{b^2 d}-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {x \sinh (c+d x)}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.42, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {5566, 30, 3296, 2638, 3320, 2264, 2190, 2279, 2391} \[ \frac {\sqrt {a^2-b^2} \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d^2}-\frac {\sqrt {a^2-b^2} \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{\sqrt {a^2-b^2}+a}\right )}{b^2 d^2}+\frac {x \sqrt {a^2-b^2} \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}+1\right )}{b^2 d}-\frac {x \sqrt {a^2-b^2} \log \left (\frac {b e^{c+d x}}{\sqrt {a^2-b^2}+a}+1\right )}{b^2 d}-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {x \sinh (c+d x)}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2190
Rule 2264
Rule 2279
Rule 2391
Rule 2638
Rule 3296
Rule 3320
Rule 5566
Rubi steps
\begin {align*} \int \frac {x \sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx &=-\frac {a \int x \, dx}{b^2}+\frac {\int x \cosh (c+d x) \, dx}{b}+\frac {\left (a^2-b^2\right ) \int \frac {x}{a+b \cosh (c+d x)} \, dx}{b^2}\\ &=-\frac {a x^2}{2 b^2}+\frac {x \sinh (c+d x)}{b d}+\frac {\left (2 \left (a^2-b^2\right )\right ) \int \frac {e^{c+d x} x}{b+2 a e^{c+d x}+b e^{2 (c+d x)}} \, dx}{b^2}-\frac {\int \sinh (c+d x) \, dx}{b d}\\ &=-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {x \sinh (c+d x)}{b d}+\frac {\left (2 \sqrt {a^2-b^2}\right ) \int \frac {e^{c+d x} x}{2 a-2 \sqrt {a^2-b^2}+2 b e^{c+d x}} \, dx}{b}-\frac {\left (2 \sqrt {a^2-b^2}\right ) \int \frac {e^{c+d x} x}{2 a+2 \sqrt {a^2-b^2}+2 b e^{c+d x}} \, dx}{b}\\ &=-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d}+\frac {x \sinh (c+d x)}{b d}-\frac {\sqrt {a^2-b^2} \int \log \left (1+\frac {2 b e^{c+d x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{b^2 d}+\frac {\sqrt {a^2-b^2} \int \log \left (1+\frac {2 b e^{c+d x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{b^2 d}\\ &=-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d}+\frac {x \sinh (c+d x)}{b d}-\frac {\sqrt {a^2-b^2} \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a-2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b^2 d^2}+\frac {\sqrt {a^2-b^2} \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a+2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b^2 d^2}\\ &=-\frac {a x^2}{2 b^2}-\frac {\cosh (c+d x)}{b d^2}+\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2-b^2} x \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d}+\frac {\sqrt {a^2-b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )}{b^2 d^2}-\frac {\sqrt {a^2-b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d^2}+\frac {x \sinh (c+d x)}{b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.03, size = 187, normalized size = 0.77 \[ \frac {2 \sqrt {a^2-b^2} \left (\text {Li}_2\left (\frac {b e^{c+d x}}{\sqrt {a^2-b^2}-a}\right )-\text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )+d x \left (\log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}+1\right )-\log \left (\frac {b e^{c+d x}}{\sqrt {a^2-b^2}+a}+1\right )\right )\right )+a (c-d x) (c+d x)+2 b d x \sinh (c+d x)-2 b \cosh (c+d x)}{2 b^2 d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.73, size = 669, normalized size = 2.74 \[ -\frac {a d^{2} x^{2} \cosh \left (d x + c\right ) + b d x - {\left (b d x - b\right )} \cosh \left (d x + c\right )^{2} - {\left (b d x - b\right )} \sinh \left (d x + c\right )^{2} - 2 \, {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) - 2 \, {\left (b c \cosh \left (d x + c\right ) + b c \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) + 2 \, {\left (b c \cosh \left (d x + c\right ) + b c \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) - 2 \, {\left ({\left (b d x + b c\right )} \cosh \left (d x + c\right ) + {\left (b d x + b c\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right ) + 2 \, {\left ({\left (b d x + b c\right )} \cosh \left (d x + c\right ) + {\left (b d x + b c\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right ) + {\left (a d^{2} x^{2} - 2 \, {\left (b d x - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d^{2} \cosh \left (d x + c\right ) + b^{2} d^{2} \sinh \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sinh \left (d x + c\right )^{2}}{b \cosh \left (d x + c\right ) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.29, size = 862, normalized size = 3.53 \[ -\frac {a \,x^{2}}{2 b^{2}}+\frac {\left (d x -1\right ) {\mathrm e}^{d x +c}}{2 b \,d^{2}}-\frac {\left (d x +1\right ) {\mathrm e}^{-d x -c}}{2 b \,d^{2}}+\frac {\ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) x \,a^{2}}{b^{2} d \sqrt {a^{2}-b^{2}}}-\frac {\ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) x}{d \sqrt {a^{2}-b^{2}}}-\frac {\ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) x \,a^{2}}{b^{2} d \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) x}{d \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) c \,a^{2}}{b^{2} d^{2} \sqrt {a^{2}-b^{2}}}-\frac {\ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) c}{d^{2} \sqrt {a^{2}-b^{2}}}-\frac {\ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) c \,a^{2}}{b^{2} d^{2} \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) c}{d^{2} \sqrt {a^{2}-b^{2}}}+\frac {\dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) a^{2}}{b^{2} d^{2} \sqrt {a^{2}-b^{2}}}-\frac {\dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right )}{d^{2} \sqrt {a^{2}-b^{2}}}-\frac {\dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) a^{2}}{b^{2} d^{2} \sqrt {a^{2}-b^{2}}}+\frac {\dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right )}{d^{2} \sqrt {a^{2}-b^{2}}}-\frac {2 c \arctan \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right ) a^{2}}{b^{2} d^{2} \sqrt {-a^{2}+b^{2}}}+\frac {2 c \arctan \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{d^{2} \sqrt {-a^{2}+b^{2}}} \]
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 [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x\,{\mathrm {sinh}\left (c+d\,x\right )}^2}{a+b\,\mathrm {cosh}\left (c+d\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sinh ^{2}{\left (c + d x \right )}}{a + b \cosh {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________