Optimal. Leaf size=395 \[ -4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-\frac {1}{2} \left (1-i \sqrt {3}\right ) \log ^2\left (1-i \sqrt {3}+2 \sinh (x)\right )-\left (1+i \sqrt {3}\right ) \log \left (\frac {i \left (1-i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right )-\frac {1}{2} \left (1+i \sqrt {3}\right ) \log ^2\left (1+i \sqrt {3}+2 \sinh (x)\right )-\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (-\frac {i \left (1+i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )-\left (1+i \sqrt {3}\right ) \text {Li}_2\left (-\frac {i-\sqrt {3}+2 i \sinh (x)}{2 \sqrt {3}}\right )-\left (1-i \sqrt {3}\right ) \text {Li}_2\left (\frac {i+\sqrt {3}+2 i \sinh (x)}{2 \sqrt {3}}\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 395, normalized size of antiderivative = 1.00, number of steps
used = 28, number of rules used = 15, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.154, Rules used =
{4443, 2603, 2608, 787, 648, 632, 210, 642, 2604, 2465, 2437, 2338, 2441, 2440, 2438}
\begin {gather*} -\left (1+i \sqrt {3}\right ) \text {PolyLog}\left (2,-\frac {2 i \sinh (x)-\sqrt {3}+i}{2 \sqrt {3}}\right )-\left (1-i \sqrt {3}\right ) \text {PolyLog}\left (2,\frac {2 i \sinh (x)+\sqrt {3}+i}{2 \sqrt {3}}\right )-4 \sqrt {3} \text {ArcTan}\left (\frac {2 \sinh (x)+1}{\sqrt {3}}\right )+8 \sinh (x)+\sinh (x) \log ^2\left (\sinh ^2(x)+\sinh (x)+1\right )-\frac {1}{2} \left (1-i \sqrt {3}\right ) \log ^2\left (2 \sinh (x)-i \sqrt {3}+1\right )-\frac {1}{2} \left (1+i \sqrt {3}\right ) \log ^2\left (2 \sinh (x)+i \sqrt {3}+1\right )+\left (1-i \sqrt {3}\right ) \log \left (\sinh ^2(x)+\sinh (x)+1\right ) \log \left (2 \sinh (x)-i \sqrt {3}+1\right )+\left (1+i \sqrt {3}\right ) \log \left (2 \sinh (x)+i \sqrt {3}+1\right ) \log \left (\sinh ^2(x)+\sinh (x)+1\right )-2 \log \left (\sinh ^2(x)+\sinh (x)+1\right )-4 \sinh (x) \log \left (\sinh ^2(x)+\sinh (x)+1\right )-\left (1-i \sqrt {3}\right ) \log \left (-\frac {i \left (2 \sinh (x)+i \sqrt {3}+1\right )}{2 \sqrt {3}}\right ) \log \left (2 \sinh (x)-i \sqrt {3}+1\right )-\left (1+i \sqrt {3}\right ) \log \left (\frac {i \left (2 \sinh (x)-i \sqrt {3}+1\right )}{2 \sqrt {3}}\right ) \log \left (2 \sinh (x)+i \sqrt {3}+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 787
Rule 2338
Rule 2437
Rule 2438
Rule 2440
Rule 2441
Rule 2465
Rule 2603
Rule 2604
Rule 2608
Rule 4443
Rubi steps
\begin {align*} \int \cosh (x) \log ^2\left (\cosh ^2(x)+\sinh (x)\right ) \, dx &=\text {Subst}\left (\int \log ^2\left (1+x+x^2\right ) \, dx,x,\sinh (x)\right )\\ &=\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)-2 \text {Subst}\left (\int \frac {x (1+2 x) \log \left (1+x+x^2\right )}{1+x+x^2} \, dx,x,\sinh (x)\right )\\ &=\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)-2 \text {Subst}\left (\int \left (2 \log \left (1+x+x^2\right )-\frac {(2+x) \log \left (1+x+x^2\right )}{1+x+x^2}\right ) \, dx,x,\sinh (x)\right )\\ &=\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+2 \text {Subst}\left (\int \frac {(2+x) \log \left (1+x+x^2\right )}{1+x+x^2} \, dx,x,\sinh (x)\right )-4 \text {Subst}\left (\int \log \left (1+x+x^2\right ) \, dx,x,\sinh (x)\right )\\ &=-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+2 \text {Subst}\left (\int \left (\frac {\left (1-i \sqrt {3}\right ) \log \left (1+x+x^2\right )}{1-i \sqrt {3}+2 x}+\frac {\left (1+i \sqrt {3}\right ) \log \left (1+x+x^2\right )}{1+i \sqrt {3}+2 x}\right ) \, dx,x,\sinh (x)\right )+4 \text {Subst}\left (\int \frac {x (1+2 x)}{1+x+x^2} \, dx,x,\sinh (x)\right )\\ &=8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+4 \text {Subst}\left (\int \frac {-2-x}{1+x+x^2} \, dx,x,\sinh (x)\right )+\left (2 \left (1-i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1+x+x^2\right )}{1-i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )+\left (2 \left (1+i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1+x+x^2\right )}{1+i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )\\ &=\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)-2 \text {Subst}\left (\int \frac {1+2 x}{1+x+x^2} \, dx,x,\sinh (x)\right )-6 \text {Subst}\left (\int \frac {1}{1+x+x^2} \, dx,x,\sinh (x)\right )+\left (-1-i \sqrt {3}\right ) \text {Subst}\left (\int \frac {(1+2 x) \log \left (1+i \sqrt {3}+2 x\right )}{1+x+x^2} \, dx,x,\sinh (x)\right )+\left (-1+i \sqrt {3}\right ) \text {Subst}\left (\int \frac {(1+2 x) \log \left (1-i \sqrt {3}+2 x\right )}{1+x+x^2} \, dx,x,\sinh (x)\right )\\ &=-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+12 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 \sinh (x)\right )+\left (-1-i \sqrt {3}\right ) \text {Subst}\left (\int \left (\frac {2 \log \left (1+i \sqrt {3}+2 x\right )}{1-i \sqrt {3}+2 x}+\frac {2 \log \left (1+i \sqrt {3}+2 x\right )}{1+i \sqrt {3}+2 x}\right ) \, dx,x,\sinh (x)\right )+\left (-1+i \sqrt {3}\right ) \text {Subst}\left (\int \left (\frac {2 \log \left (1-i \sqrt {3}+2 x\right )}{1-i \sqrt {3}+2 x}+\frac {2 \log \left (1-i \sqrt {3}+2 x\right )}{1+i \sqrt {3}+2 x}\right ) \, dx,x,\sinh (x)\right )\\ &=-4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)-\left (2 \left (1-i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-i \sqrt {3}+2 x\right )}{1-i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )-\left (2 \left (1-i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1-i \sqrt {3}+2 x\right )}{1+i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )-\left (2 \left (1+i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1+i \sqrt {3}+2 x\right )}{1-i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )-\left (2 \left (1+i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (1+i \sqrt {3}+2 x\right )}{1+i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )\\ &=-4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-\left (1+i \sqrt {3}\right ) \log \left (\frac {i \left (1-i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right )-\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (-\frac {i \left (1+i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)-\left (1-i \sqrt {3}\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1-i \sqrt {3}+2 \sinh (x)\right )+\left (2 \left (1-i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2 \left (1+i \sqrt {3}+2 x\right )}{-2 \left (1-i \sqrt {3}\right )+2 \left (1+i \sqrt {3}\right )}\right )}{1-i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )-\left (1+i \sqrt {3}\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1+i \sqrt {3}+2 \sinh (x)\right )+\left (2 \left (1+i \sqrt {3}\right )\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2 \left (1-i \sqrt {3}+2 x\right )}{2 \left (1-i \sqrt {3}\right )-2 \left (1+i \sqrt {3}\right )}\right )}{1+i \sqrt {3}+2 x} \, dx,x,\sinh (x)\right )\\ &=-4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-\frac {1}{2} \left (1-i \sqrt {3}\right ) \log ^2\left (1-i \sqrt {3}+2 \sinh (x)\right )-\left (1+i \sqrt {3}\right ) \log \left (\frac {i \left (1-i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right )-\frac {1}{2} \left (1+i \sqrt {3}\right ) \log ^2\left (1+i \sqrt {3}+2 \sinh (x)\right )-\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (-\frac {i \left (1+i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\left (1-i \sqrt {3}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 x}{-2 \left (1-i \sqrt {3}\right )+2 \left (1+i \sqrt {3}\right )}\right )}{x} \, dx,x,1-i \sqrt {3}+2 \sinh (x)\right )+\left (1+i \sqrt {3}\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 x}{2 \left (1-i \sqrt {3}\right )-2 \left (1+i \sqrt {3}\right )}\right )}{x} \, dx,x,1+i \sqrt {3}+2 \sinh (x)\right )\\ &=-4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-\frac {1}{2} \left (1-i \sqrt {3}\right ) \log ^2\left (1-i \sqrt {3}+2 \sinh (x)\right )-\left (1+i \sqrt {3}\right ) \log \left (\frac {i \left (1-i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right )-\frac {1}{2} \left (1+i \sqrt {3}\right ) \log ^2\left (1+i \sqrt {3}+2 \sinh (x)\right )-\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (-\frac {i \left (1+i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )-\left (1-i \sqrt {3}\right ) \text {Li}_2\left (\frac {i \left (1-i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )-\left (1+i \sqrt {3}\right ) \text {Li}_2\left (-\frac {i \left (1+i \sqrt {3}+2 \sinh (x)\right )}{2 \sqrt {3}}\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 347, normalized size = 0.88 \begin {gather*} -4 \sqrt {3} \tan ^{-1}\left (\frac {1+2 \sinh (x)}{\sqrt {3}}\right )-2 \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1-i \sqrt {3}\right ) \log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )+\left (1+i \sqrt {3}\right ) \log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \log \left (1+\sinh (x)+\sinh ^2(x)\right )-\frac {1}{2} i \left (-i+\sqrt {3}\right ) \left (\log \left (1+i \sqrt {3}+2 \sinh (x)\right ) \left (2 \log \left (\frac {i+\sqrt {3}+2 i \sinh (x)}{2 \sqrt {3}}\right )+\log \left (1+i \sqrt {3}+2 \sinh (x)\right )\right )+2 \text {Li}_2\left (\frac {-i+\sqrt {3}-2 i \sinh (x)}{2 \sqrt {3}}\right )\right )+\frac {1}{2} i \left (i+\sqrt {3}\right ) \left (\log \left (1-i \sqrt {3}+2 \sinh (x)\right ) \left (2 \log \left (\frac {-i+\sqrt {3}-2 i \sinh (x)}{2 \sqrt {3}}\right )+\log \left (1-i \sqrt {3}+2 \sinh (x)\right )\right )+2 \text {Li}_2\left (\frac {i+\sqrt {3}+2 i \sinh (x)}{2 \sqrt {3}}\right )\right )+8 \sinh (x)-4 \log \left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x)+\log ^2\left (1+\sinh (x)+\sinh ^2(x)\right ) \sinh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \cosh \left (x \right ) \ln \left (\cosh ^{2}\left (x \right )+\sinh \left (x \right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [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]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \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 \mathrm {cosh}\left (x\right )\,{\ln \left ({\mathrm {cosh}\left (x\right )}^2+\mathrm {sinh}\left (x\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________