Optimal. Leaf size=120 \[ -\frac {2 b^2 n^2 x^{1+m}}{(1+m) \left ((1+m)^2-4 b^2 n^2\right )}+\frac {(1+m) x^{1+m} \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2}-\frac {2 b n x^{1+m} \cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 122, normalized size of antiderivative = 1.02, number of steps
used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {5641, 30}
\begin {gather*} \frac {(m+1) x^{m+1} \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{-4 b^2 n^2+m^2+2 m+1}-\frac {2 b n x^{m+1} \sinh \left (a+b \log \left (c x^n\right )\right ) \cosh \left (a+b \log \left (c x^n\right )\right )}{(m+1)^2-4 b^2 n^2}-\frac {2 b^2 n^2 x^{m+1}}{(m+1) \left ((m+1)^2-4 b^2 n^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 5641
Rubi steps
\begin {align*} \int x^m \cosh ^2\left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {(1+m) x^{1+m} \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2}-\frac {2 b n x^{1+m} \cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2}-\frac {\left (2 b^2 n^2\right ) \int x^m \, dx}{(1+m)^2-4 b^2 n^2}\\ &=-\frac {2 b^2 n^2 x^{1+m}}{(1+m) \left ((1+m)^2-4 b^2 n^2\right )}+\frac {(1+m) x^{1+m} \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2}-\frac {2 b n x^{1+m} \cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{(1+m)^2-4 b^2 n^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 87, normalized size = 0.72 \begin {gather*} \frac {x^{1+m} \left (1+2 m+m^2-4 b^2 n^2+(1+m)^2 \cosh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-2 b (1+m) n \sinh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )\right )}{2 (1+m) (1+m-2 b n) (1+m+2 b n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 2.90, size = 0, normalized size = 0.00 \[\int x^{m} \left (\cosh ^{2}\left (a +b \ln \left (c \,x^{n}\right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 87, normalized size = 0.72 \begin {gather*} \frac {c^{2 \, b} x e^{\left (2 \, b \log \left (x^{n}\right ) + m \log \left (x\right ) + 2 \, a\right )}}{4 \, {\left (2 \, b n + m + 1\right )}} - \frac {x e^{\left (-2 \, b \log \left (x^{n}\right ) + m \log \left (x\right ) - 2 \, a\right )}}{4 \, {\left (2 \, b c^{2 \, b} n - c^{2 \, b} {\left (m + 1\right )}\right )}} + \frac {x^{m + 1}}{2 \, {\left (m + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 250, normalized size = 2.08 \begin {gather*} \frac {{\left (m^{2} + 2 \, m + 1\right )} x \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} \cosh \left (m \log \left (x\right )\right ) - {\left (4 \, b^{2} n^{2} - m^{2} - 2 \, m - 1\right )} x \cosh \left (m \log \left (x\right )\right ) + {\left ({\left (m^{2} + 2 \, m + 1\right )} x \cosh \left (m \log \left (x\right )\right ) + {\left (m^{2} + 2 \, m + 1\right )} x \sinh \left (m \log \left (x\right )\right )\right )} \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} - 4 \, {\left ({\left (b m + b\right )} n x \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \cosh \left (m \log \left (x\right )\right ) + {\left (b m + b\right )} n x \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (m \log \left (x\right )\right )\right )} \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + {\left ({\left (m^{2} + 2 \, m + 1\right )} x \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} - {\left (4 \, b^{2} n^{2} - m^{2} - 2 \, m - 1\right )} x\right )} \sinh \left (m \log \left (x\right )\right )}{2 \, {\left (m^{3} - 4 \, {\left (b^{2} m + b^{2}\right )} n^{2} + 3 \, m^{2} + 3 \, m + 1\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*} \begin {cases} \log {\left (x \right )} \cosh ^{2}{\left (a \right )} & \text {for}\: b = 0 \wedge m = -1 \\\int x^{m} \cosh ^{2}{\left (- a + \frac {m \log {\left (c x^{n} \right )}}{2 n} + \frac {\log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = \frac {- m - 1}{2 n} \\\int x^{m} \cosh ^{2}{\left (a + \frac {m \log {\left (c x^{n} \right )}}{2 n} + \frac {\log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = \frac {m + 1}{2 n} \\\int \frac {\cosh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{x}\, dx & \text {for}\: m = -1 \\- \frac {2 b^{2} n^{2} x x^{m} \sinh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} + \frac {2 b^{2} n^{2} x x^{m} \cosh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} + \frac {2 b m n x x^{m} \sinh {\left (a + b \log {\left (c x^{n} \right )} \right )} \cosh {\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} + \frac {2 b n x x^{m} \sinh {\left (a + b \log {\left (c x^{n} \right )} \right )} \cosh {\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} - \frac {m^{2} x x^{m} \cosh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} - \frac {2 m x x^{m} \cosh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} - \frac {x x^{m} \cosh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b^{2} m n^{2} + 4 b^{2} n^{2} - m^{3} - 3 m^{2} - 3 m - 1} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 759 vs.
\(2 (127) = 254\).
time = 0.44, size = 759, normalized size = 6.32 \begin {gather*} \frac {b c^{2 \, b} m n x x^{2 \, b n} x^{m} e^{\left (2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} - \frac {c^{2 \, b} m^{2} x x^{2 \, b n} x^{m} e^{\left (2 \, a\right )}}{4 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} + \frac {b c^{2 \, b} n x x^{2 \, b n} x^{m} e^{\left (2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} + \frac {2 \, b^{2} n^{2} x x^{m}}{4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1} - \frac {c^{2 \, b} m x x^{2 \, b n} x^{m} e^{\left (2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} - \frac {c^{2 \, b} x x^{2 \, b n} x^{m} e^{\left (2 \, a\right )}}{4 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} - \frac {m^{2} x x^{m}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} - \frac {b m n x x^{m} e^{\left (-2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )} c^{2 \, b} x^{2 \, b n}} - \frac {m x x^{m}}{4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1} - \frac {m^{2} x x^{m} e^{\left (-2 \, a\right )}}{4 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )} c^{2 \, b} x^{2 \, b n}} - \frac {b n x x^{m} e^{\left (-2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )} c^{2 \, b} x^{2 \, b n}} - \frac {x x^{m}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )}} - \frac {m x x^{m} e^{\left (-2 \, a\right )}}{2 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )} c^{2 \, b} x^{2 \, b n}} - \frac {x x^{m} e^{\left (-2 \, a\right )}}{4 \, {\left (4 \, b^{2} m n^{2} + 4 \, b^{2} n^{2} - m^{3} - 3 \, m^{2} - 3 \, m - 1\right )} c^{2 \, b} x^{2 \, b n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.09, size = 73, normalized size = 0.61 \begin {gather*} \frac {x\,x^m}{2\,m+2}+\frac {x\,x^m\,{\mathrm {e}}^{-2\,a}}{{\left (c\,x^n\right )}^{2\,b}\,\left (4\,m-8\,b\,n+4\right )}+\frac {x\,x^m\,{\mathrm {e}}^{2\,a}\,{\left (c\,x^n\right )}^{2\,b}}{4\,m+8\,b\,n+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________