\(\int \frac {\sinh ^2(a+b \log (c x^n))}{x} \, dx\) [275]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 39 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\log (x)}{2}+\frac {\cosh \left (a+b \log \left (c x^n\right )\right ) \sinh \left (a+b \log \left (c x^n\right )\right )}{2 b n} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2715, 8} \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\sinh \left (a+b \log \left (c x^n\right )\right ) \cosh \left (a+b \log \left (c x^n\right )\right )}{2 b n}-\frac {\log (x)}{2} \]

[In]

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

[Out]

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

Rule 8

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

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {-2 \left (a+b \log \left (c x^n\right )\right )+\sinh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )}{4 b n} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.70 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.77

method result size
parallelrisch \(\frac {-2 \ln \left (x \right ) b n +\sinh \left (2 b \ln \left (c \,x^{n}\right )+2 a \right )}{4 b n}\) \(30\)
derivativedivides \(\frac {\frac {\cosh \left (a +b \ln \left (c \,x^{n}\right )\right ) \sinh \left (a +b \ln \left (c \,x^{n}\right )\right )}{2}-\frac {b \ln \left (c \,x^{n}\right )}{2}-\frac {a}{2}}{n b}\) \(45\)
default \(\frac {\frac {\cosh \left (a +b \ln \left (c \,x^{n}\right )\right ) \sinh \left (a +b \ln \left (c \,x^{n}\right )\right )}{2}-\frac {b \ln \left (c \,x^{n}\right )}{2}-\frac {a}{2}}{n b}\) \(45\)

[In]

int(sinh(a+b*ln(c*x^n))^2/x,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.03 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {b n \log \left (x\right ) - \cosh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sinh \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{2 \, b n} \]

[In]

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

[Out]

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

Sympy [F]

\[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\int \frac {\sinh ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{x}\, dx \]

[In]

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

[Out]

Integral(sinh(a + b*log(c*x**n))**2/x, x)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.26 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {e^{\left (2 \, b \log \left (c x^{n}\right ) + 2 \, a\right )}}{8 \, b n} - \frac {e^{\left (-2 \, b \log \left (c x^{n}\right ) - 2 \, a\right )}}{8 \, b n} - \frac {1}{2} \, \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 81 vs. \(2 (35) = 70\).

Time = 0.27 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.08 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {{\left (4 \, b c^{2 \, b} n e^{\left (2 \, a\right )} \log \left (x\right ) - c^{4 \, b} x^{2 \, b n} e^{\left (4 \, a\right )} - \frac {2 \, c^{2 \, b} x^{2 \, b n} e^{\left (2 \, a\right )} - 1}{x^{2 \, b n}}\right )} e^{\left (-2 \, a\right )}}{8 \, b c^{2 \, b} n} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.45 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.82 \[ \int \frac {\sinh ^2\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\mathrm {sinh}\left (2\,a+2\,b\,\ln \left (c\,x^n\right )\right )}{4\,b\,n}-\frac {\ln \left (x^n\right )}{2\,n} \]

[In]

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

[Out]

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