\(\int \sinh ^2(a+b x) \, dx\) [2]

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

Optimal result

Integrand size = 8, antiderivative size = 25 \[ \int \sinh ^2(a+b x) \, dx=-\frac {x}{2}+\frac {\cosh (a+b x) \sinh (a+b x)}{2 b} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2715, 8} \[ \int \sinh ^2(a+b x) \, dx=\frac {\sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {x}{2} \]

[In]

Int[Sinh[a + b*x]^2,x]

[Out]

-1/2*x + (Cosh[a + b*x]*Sinh[a + b*x])/(2*b)

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 {\cosh (a+b x) \sinh (a+b x)}{2 b}-\frac {\int 1 \, dx}{2} \\ & = -\frac {x}{2}+\frac {\cosh (a+b x) \sinh (a+b x)}{2 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \sinh ^2(a+b x) \, dx=\frac {-2 (a+b x)+\sinh (2 (a+b x))}{4 b} \]

[In]

Integrate[Sinh[a + b*x]^2,x]

[Out]

(-2*(a + b*x) + Sinh[2*(a + b*x)])/(4*b)

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80

method result size
parallelrisch \(\frac {-2 b x +\sinh \left (2 b x +2 a \right )}{4 b}\) \(20\)
derivativedivides \(\frac {\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}}{b}\) \(27\)
default \(\frac {\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}}{b}\) \(27\)
risch \(-\frac {x}{2}+\frac {{\mathrm e}^{2 b x +2 a}}{8 b}-\frac {{\mathrm e}^{-2 b x -2 a}}{8 b}\) \(33\)

[In]

int(sinh(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/4*(-2*b*x+sinh(2*b*x+2*a))/b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \sinh ^2(a+b x) \, dx=-\frac {b x - \cosh \left (b x + a\right ) \sinh \left (b x + a\right )}{2 \, b} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (19) = 38\).

Time = 0.08 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.84 \[ \int \sinh ^2(a+b x) \, dx=\begin {cases} \frac {x \sinh ^{2}{\left (a + b x \right )}}{2} - \frac {x \cosh ^{2}{\left (a + b x \right )}}{2} + \frac {\sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b} & \text {for}\: b \neq 0 \\x \sinh ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(sinh(b*x+a)**2,x)

[Out]

Piecewise((x*sinh(a + b*x)**2/2 - x*cosh(a + b*x)**2/2 + sinh(a + b*x)*cosh(a + b*x)/(2*b), Ne(b, 0)), (x*sinh
(a)**2, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.28 \[ \int \sinh ^2(a+b x) \, dx=-\frac {1}{2} \, x + \frac {e^{\left (2 \, b x + 2 \, a\right )}}{8 \, b} - \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{8 \, b} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.28 \[ \int \sinh ^2(a+b x) \, dx=-\frac {1}{2} \, x + \frac {e^{\left (2 \, b x + 2 \, a\right )}}{8 \, b} - \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{8 \, b} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 1.09 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \sinh ^2(a+b x) \, dx=\frac {\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{4\,b}-\frac {x}{2} \]

[In]

int(sinh(a + b*x)^2,x)

[Out]

sinh(2*a + 2*b*x)/(4*b) - x/2