Optimal. Leaf size=244 \[ -\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 {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}}{a+\sqrt {a^2-b^2}}\right )}{b^2 d^2}+\frac {x \sinh (c+d x)}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, 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 = {5685, 30,
3377, 2718, 3401, 2296, 2221, 2317, 2438} \begin {gather*} \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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 2718
Rule 3377
Rule 3401
Rule 5685
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} \text {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} \text {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 = 0.69, size = 187, normalized size = 0.77 \begin {gather*} \frac {a (c-d x) (c+d x)-2 b \cosh (c+d x)+2 \sqrt {a^2-b^2} \left (d x \left (\log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2-b^2}}\right )-\log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )\right )+\text {PolyLog}\left (2,\frac {b e^{c+d x}}{-a+\sqrt {a^2-b^2}}\right )-\text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2-b^2}}\right )\right )+2 b d x \sinh (c+d x)}{2 b^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(861\) vs.
\(2(222)=444\).
time = 2.13, size = 862, normalized size = 3.53
method | result | size |
risch | \(-\frac {a \,x^{2}}{2 b^{2}}+\frac {\left (d x -1\right ) {\mathrm e}^{d x +c}}{2 d^{2} b}-\frac {\left (d x +1\right ) {\mathrm e}^{-d x -c}}{2 d^{2} b}-\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}}}\) | \(862\) |
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. 669 vs.
\(2 (220) = 440\).
time = 0.54, size = 669, normalized size = 2.74 \begin {gather*} -\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 )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \sinh ^{2}{\left (c + d x \right )}}{a + b \cosh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x\,{\mathrm {sinh}\left (c+d\,x\right )}^2}{a+b\,\mathrm {cosh}\left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________