Optimal. Leaf size=281 \[ \frac{x \text{PolyLog}\left (2,-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x \text{PolyLog}\left (2,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{\sqrt{4 a^2+b^2}}-\frac{\text{PolyLog}\left (3,-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{\text{PolyLog}\left (3,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{x^2 \log \left (\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}+1\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}+1\right )}{\sqrt{4 a^2+b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.515022, antiderivative size = 281, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5628, 3322, 2264, 2190, 2531, 2282, 6589} \[ \frac{x \text{PolyLog}\left (2,-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x \text{PolyLog}\left (2,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{\sqrt{4 a^2+b^2}}-\frac{\text{PolyLog}\left (3,-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{\text{PolyLog}\left (3,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{x^2 \log \left (\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}+1\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}+1\right )}{\sqrt{4 a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5628
Rule 3322
Rule 2264
Rule 2190
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int \frac{x^2}{a+b \cosh (x) \sinh (x)} \, dx &=\int \frac{x^2}{a+\frac{1}{2} b \sinh (2 x)} \, dx\\ &=2 \int \frac{e^{2 x} x^2}{-\frac{b}{2}+2 a e^{2 x}+\frac{1}{2} b e^{4 x}} \, dx\\ &=\frac{(2 b) \int \frac{e^{2 x} x^2}{2 a-\sqrt{4 a^2+b^2}+b e^{2 x}} \, dx}{\sqrt{4 a^2+b^2}}-\frac{(2 b) \int \frac{e^{2 x} x^2}{2 a+\sqrt{4 a^2+b^2}+b e^{2 x}} \, dx}{\sqrt{4 a^2+b^2}}\\ &=\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{2 \int x \log \left (1+\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right ) \, dx}{\sqrt{4 a^2+b^2}}+\frac{2 \int x \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right ) \, dx}{\sqrt{4 a^2+b^2}}\\ &=\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}+\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{\int \text{Li}_2\left (-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right ) \, dx}{\sqrt{4 a^2+b^2}}+\frac{\int \text{Li}_2\left (-\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right ) \, dx}{\sqrt{4 a^2+b^2}}\\ &=\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}+\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{\operatorname{Subst}\left (\int \frac{\text{Li}_2\left (\frac{b x}{-2 a+\sqrt{4 a^2+b^2}}\right )}{x} \, dx,x,e^{2 x}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{\operatorname{Subst}\left (\int \frac{\text{Li}_2\left (-\frac{b x}{2 a+\sqrt{4 a^2+b^2}}\right )}{x} \, dx,x,e^{2 x}\right )}{2 \sqrt{4 a^2+b^2}}\\ &=\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x^2 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}+\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{x \text{Li}_2\left (-\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{\text{Li}_3\left (-\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{\text{Li}_3\left (-\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{2 \sqrt{4 a^2+b^2}}\\ \end{align*}
Mathematica [A] time = 0.25076, size = 210, normalized size = 0.75 \[ \frac{2 x \text{PolyLog}\left (2,\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}-2 a}\right )-2 x \text{PolyLog}\left (2,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )-\text{PolyLog}\left (3,\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}-2 a}\right )+\text{PolyLog}\left (3,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )+2 x^2 \log \left (\frac{b e^{2 x}}{2 a-\sqrt{4 a^2+b^2}}+1\right )-2 x^2 \log \left (\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}+1\right )}{2 \sqrt{4 a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.053, size = 530, normalized size = 1.9 \begin{align*} -{\frac{2\,{x}^{3}}{3} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}+{{x}^{2}\ln \left ( 1-{b{{\rm e}^{2\,x}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}} \right ) \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}+{x{\it polylog} \left ( 2,{b{{\rm e}^{2\,x}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}} \right ) \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}-{\frac{1}{2}{\it polylog} \left ( 3,{b{{\rm e}^{2\,x}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}} \right ) \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}-{\frac{4\,a{x}^{3}}{3}{\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}+2\,{\frac{a{x}^{2}}{\sqrt{4\,{a}^{2}+{b}^{2}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) }\ln \left ( 1-{\frac{b{{\rm e}^{2\,x}}}{-2\,a-\sqrt{4\,{a}^{2}+{b}^{2}}}} \right ) }+2\,{\frac{ax}{\sqrt{4\,{a}^{2}+{b}^{2}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) }{\it polylog} \left ( 2,{\frac{b{{\rm e}^{2\,x}}}{-2\,a-\sqrt{4\,{a}^{2}+{b}^{2}}}} \right ) }-{a{\it polylog} \left ( 3,{b{{\rm e}^{2\,x}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}-{\frac{2\,{x}^{3}}{3}{\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}}}+{{x}^{2}\ln \left ( 1-{b{{\rm e}^{2\,x}} \left ( \sqrt{4\,{a}^{2}+{b}^{2}}-2\,a \right ) ^{-1}} \right ){\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}}}+{x{\it polylog} \left ( 2,{b{{\rm e}^{2\,x}} \left ( \sqrt{4\,{a}^{2}+{b}^{2}}-2\,a \right ) ^{-1}} \right ){\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}}}-{\frac{1}{2}{\it polylog} \left ( 3,{b{{\rm e}^{2\,x}} \left ( \sqrt{4\,{a}^{2}+{b}^{2}}-2\,a \right ) ^{-1}} \right ){\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{b \cosh \left (x\right ) \sinh \left (x\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 1.98174, size = 2738, normalized size = 9.74 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{a + b \sinh{\left (x \right )} \cosh{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2}}{b \cosh \left (x\right ) \sinh \left (x\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]