Optimal. Leaf size=186 \[ \frac{\text{PolyLog}\left (2,-\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 (2,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{x \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 \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.30264, antiderivative size = 186, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5628, 3322, 2264, 2190, 2279, 2391} \[ \frac{\text{PolyLog}\left (2,-\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 (2,-\frac{b e^{2 x}}{\sqrt{4 a^2+b^2}+2 a}\right )}{2 \sqrt{4 a^2+b^2}}+\frac{x \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 \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 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{x}{a+b \cosh (x) \sinh (x)} \, dx &=\int \frac{x}{a+\frac{1}{2} b \sinh (2 x)} \, dx\\ &=2 \int \frac{e^{2 x} x}{-\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 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 a+\sqrt{4 a^2+b^2}+b e^{2 x}} \, dx}{\sqrt{4 a^2+b^2}}\\ &=\frac{x \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 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{\int \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{\int \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 \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 \log \left (1+\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{\log \left (1+\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{\log \left (1+\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 \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 \log \left (1+\frac{b e^{2 x}}{2 a+\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}+\frac{\text{Li}_2\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}_2\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 [C] time = 1.47401, size = 956, normalized size = 5.14 \[ \frac{1}{2} \left (-\frac{i \pi \tanh ^{-1}\left (\frac{2 a \tanh (x)-b}{\sqrt{4 a^2+b^2}}\right )}{\sqrt{4 a^2+b^2}}-\frac{2 \cos ^{-1}\left (-\frac{2 i a}{b}\right ) \tanh ^{-1}\left (\frac{(2 a+i b) \cot \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )+(\pi -4 i x) \tanh ^{-1}\left (\frac{(2 a-i b) \tan \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )-\left (\cos ^{-1}\left (-\frac{2 i a}{b}\right )+2 i \tanh ^{-1}\left (\frac{(2 a+i b) \cot \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )\right ) \log \left (\frac{(2 i a+b) \left (-2 i a+b+\sqrt{-4 a^2-b^2}\right ) \left (i \cot \left (\frac{1}{4} (4 i x+\pi )\right )+1\right )}{b \left (2 i a+b+i \sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}\right )-\left (\cos ^{-1}\left (-\frac{2 i a}{b}\right )-2 i \tanh ^{-1}\left (\frac{(2 a+i b) \cot \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )\right ) \log \left (\frac{(2 i a+b) \left (2 i a-b+\sqrt{-4 a^2-b^2}\right ) \left (\cot \left (\frac{1}{4} (4 i x+\pi )\right )+i\right )}{b \left (2 a-i b+\sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}\right )+\left (\cos ^{-1}\left (-\frac{2 i a}{b}\right )-2 i \tanh ^{-1}\left (\frac{(2 a+i b) \cot \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )-2 i \tanh ^{-1}\left (\frac{(2 a-i b) \tan \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )\right ) \log \left (-\frac{(-1)^{3/4} \sqrt{-4 a^2-b^2} e^{-x}}{2 \sqrt{-i b} \sqrt{a+b \cosh (x) \sinh (x)}}\right )+\left (\cos ^{-1}\left (-\frac{2 i a}{b}\right )+2 i \left (\tanh ^{-1}\left (\frac{(2 a+i b) \cot \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )+\tanh ^{-1}\left (\frac{(2 a-i b) \tan \left (\frac{1}{4} (4 i x+\pi )\right )}{\sqrt{-4 a^2-b^2}}\right )\right )\right ) \log \left (\frac{\sqrt [4]{-1} \sqrt{-4 a^2-b^2} e^x}{2 \sqrt{-i b} \sqrt{a+b \cosh (x) \sinh (x)}}\right )+i \left (\text{PolyLog}\left (2,\frac{\left (2 i a+\sqrt{-4 a^2-b^2}\right ) \left (2 i a+b-i \sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}{b \left (2 i a+b+i \sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}\right )-\text{PolyLog}\left (2,\frac{\left (2 a+i \sqrt{-4 a^2-b^2}\right ) \left (-2 a+i b+\sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}{b \left (2 i a+b+i \sqrt{-4 a^2-b^2} \cot \left (\frac{1}{4} (4 i x+\pi )\right )\right )}\right )\right )}{\sqrt{-4 a^2-b^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.05, size = 376, normalized size = 2. \begin{align*}{x\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}^{2} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) ^{-1}}+2\,{\frac{ax}{\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{a{x}^{2}}{\sqrt{4\,{a}^{2}+{b}^{2}} \left ( -2\,a-\sqrt{4\,{a}^{2}+{b}^{2}} \right ) }}+{\frac{1}{2}{\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}}+{a{\it polylog} \left ( 2,{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}}+{x\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}^{2}{\frac{1}{\sqrt{4\,{a}^{2}+{b}^{2}}}}}+{\frac{1}{2}{\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}}}}} \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}{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 [B] time = 1.87469, size = 1814, normalized size = 9.75 \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}{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}{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]