3.240 \(\int \cosh ^2(a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=88 \[ \frac {x \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b n x \sinh \left (a+b \log \left (c x^n\right )\right ) \cosh \left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b^2 n^2 x}{1-4 b^2 n^2} \]

[Out]

-2*b^2*n^2*x/(-4*b^2*n^2+1)+x*cosh(a+b*ln(c*x^n))^2/(-4*b^2*n^2+1)-2*b*n*x*cosh(a+b*ln(c*x^n))*sinh(a+b*ln(c*x
^n))/(-4*b^2*n^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {5520, 8} \[ \frac {x \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b n x \sinh \left (a+b \log \left (c x^n\right )\right ) \cosh \left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b^2 n^2 x}{1-4 b^2 n^2} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*Log[c*x^n]]^2,x]

[Out]

(-2*b^2*n^2*x)/(1 - 4*b^2*n^2) + (x*Cosh[a + b*Log[c*x^n]]^2)/(1 - 4*b^2*n^2) - (2*b*n*x*Cosh[a + b*Log[c*x^n]
]*Sinh[a + b*Log[c*x^n]])/(1 - 4*b^2*n^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 5520

Int[Cosh[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_), x_Symbol] :> -Simp[(x*Cosh[d*(a + b*Log[c*x^n])]^p
)/(b^2*d^2*n^2*p^2 - 1), x] + (Dist[(b^2*d^2*n^2*p*(p - 1))/(b^2*d^2*n^2*p^2 - 1), Int[Cosh[d*(a + b*Log[c*x^n
])]^(p - 2), x], x] + Simp[(b*d*n*p*x*Cosh[d*(a + b*Log[c*x^n])]^(p - 1)*Sinh[d*(a + b*Log[c*x^n])])/(b^2*d^2*
n^2*p^2 - 1), x]) /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 - 1, 0]

Rubi steps

\begin {align*} \int \cosh ^2\left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {x \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b n x \cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {\left (2 b^2 n^2\right ) \int 1 \, dx}{1-4 b^2 n^2}\\ &=-\frac {2 b^2 n^2 x}{1-4 b^2 n^2}+\frac {x \cosh ^2\left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}-\frac {2 b n x \cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{1-4 b^2 n^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 56, normalized size = 0.64 \[ \frac {x \left (2 b n \sinh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-\cosh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+4 b^2 n^2-1\right )}{8 b^2 n^2-2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*Log[c*x^n]]^2,x]

[Out]

(x*(-1 + 4*b^2*n^2 - Cosh[2*(a + b*Log[c*x^n])] + 2*b*n*Sinh[2*(a + b*Log[c*x^n])]))/(-2 + 8*b^2*n^2)

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 90, normalized size = 1.02 \[ \frac {4 \, b n x \cosh \left (b n \log \relax (x) + b \log \relax (c) + a\right ) \sinh \left (b n \log \relax (x) + b \log \relax (c) + a\right ) - x \cosh \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{2} - x \sinh \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{2} + {\left (4 \, b^{2} n^{2} - 1\right )} x}{2 \, {\left (4 \, b^{2} n^{2} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

1/2*(4*b*n*x*cosh(b*n*log(x) + b*log(c) + a)*sinh(b*n*log(x) + b*log(c) + a) - x*cosh(b*n*log(x) + b*log(c) +
a)^2 - x*sinh(b*n*log(x) + b*log(c) + a)^2 + (4*b^2*n^2 - 1)*x)/(4*b^2*n^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 169, normalized size = 1.92 \[ \frac {b c^{2 \, b} n x x^{2 \, b n} e^{\left (2 \, a\right )}}{2 \, {\left (4 \, b^{2} n^{2} - 1\right )}} + \frac {2 \, b^{2} n^{2} x}{4 \, b^{2} n^{2} - 1} - \frac {c^{2 \, b} x x^{2 \, b n} e^{\left (2 \, a\right )}}{4 \, {\left (4 \, b^{2} n^{2} - 1\right )}} - \frac {b n x e^{\left (-2 \, a\right )}}{2 \, {\left (4 \, b^{2} n^{2} - 1\right )} c^{2 \, b} x^{2 \, b n}} - \frac {x}{2 \, {\left (4 \, b^{2} n^{2} - 1\right )}} - \frac {x e^{\left (-2 \, a\right )}}{4 \, {\left (4 \, b^{2} n^{2} - 1\right )} c^{2 \, b} x^{2 \, b n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

1/2*b*c^(2*b)*n*x*x^(2*b*n)*e^(2*a)/(4*b^2*n^2 - 1) + 2*b^2*n^2*x/(4*b^2*n^2 - 1) - 1/4*c^(2*b)*x*x^(2*b*n)*e^
(2*a)/(4*b^2*n^2 - 1) - 1/2*b*n*x*e^(-2*a)/((4*b^2*n^2 - 1)*c^(2*b)*x^(2*b*n)) - 1/2*x/(4*b^2*n^2 - 1) - 1/4*x
*e^(-2*a)/((4*b^2*n^2 - 1)*c^(2*b)*x^(2*b*n))

________________________________________________________________________________________

maple [F]  time = 0.50, size = 0, normalized size = 0.00 \[ \int \cosh ^{2}\left (a +b \ln \left (c \,x^{n}\right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(a+b*ln(c*x^n))^2,x)

[Out]

int(cosh(a+b*ln(c*x^n))^2,x)

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 67, normalized size = 0.76 \[ \frac {c^{2 \, b} x e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}}{4 \, {\left (2 \, b n + 1\right )}} + \frac {1}{2} \, x - \frac {x e^{\left (-2 \, a\right )}}{4 \, {\left (2 \, b c^{2 \, b} n - c^{2 \, b}\right )} {\left (x^{n}\right )}^{2 \, b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

1/4*c^(2*b)*x*e^(2*b*log(x^n) + 2*a)/(2*b*n + 1) + 1/2*x - 1/4*x*e^(-2*a)/((2*b*c^(2*b)*n - c^(2*b))*(x^n)^(2*
b))

________________________________________________________________________________________

mupad [B]  time = 1.01, size = 53, normalized size = 0.60 \[ \frac {x}{2}-\frac {x\,{\mathrm {e}}^{-2\,a}}{{\left (c\,x^n\right )}^{2\,b}\,\left (8\,b\,n-4\right )}+\frac {x\,{\mathrm {e}}^{2\,a}\,{\left (c\,x^n\right )}^{2\,b}}{8\,b\,n+4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(a + b*log(c*x^n))^2,x)

[Out]

x/2 - (x*exp(-2*a))/((c*x^n)^(2*b)*(8*b*n - 4)) + (x*exp(2*a)*(c*x^n)^(2*b))/(8*b*n + 4)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \begin {cases} \int \cosh ^{2}{\left (a - \frac {\log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = - \frac {1}{2 n} \\\int \cosh ^{2}{\left (a + \frac {\log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = \frac {1}{2 n} \\- \frac {2 b^{2} n^{2} x \sinh ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{4 b^{2} n^{2} - 1} + \frac {2 b^{2} n^{2} x \cosh ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{4 b^{2} n^{2} - 1} + \frac {2 b n x \sinh {\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )} \cosh {\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{4 b^{2} n^{2} - 1} - \frac {x \cosh ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{4 b^{2} n^{2} - 1} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(a+b*ln(c*x**n))**2,x)

[Out]

Piecewise((Integral(cosh(a - log(c*x**n)/(2*n))**2, x), Eq(b, -1/(2*n))), (Integral(cosh(a + log(c*x**n)/(2*n)
)**2, x), Eq(b, 1/(2*n))), (-2*b**2*n**2*x*sinh(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2 - 1) + 2*b**2*n**2*
x*cosh(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2 - 1) + 2*b*n*x*sinh(a + b*n*log(x) + b*log(c))*cosh(a + b*n*
log(x) + b*log(c))/(4*b**2*n**2 - 1) - x*cosh(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2 - 1), True))

________________________________________________________________________________________