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

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

Optimal result

Integrand size = 18, antiderivative size = 83 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {4 \cosh (a+b x)}{9 b^3}+\frac {2 \cosh ^3(a+b x)}{27 b^3}+\frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {4 x \sinh (a+b x)}{9 b^2}-\frac {2 x \cosh ^2(a+b x) \sinh (a+b x)}{9 b^2} \] Output:

4/9*cosh(b*x+a)/b^3+2/27*cosh(b*x+a)^3/b^3+1/3*x^2*cosh(b*x+a)^3/b-4/9*x*s 
inh(b*x+a)/b^2-2/9*x*cosh(b*x+a)^2*sinh(b*x+a)/b^2
 

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.78 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {27 \left (2+b^2 x^2\right ) \cosh (a+b x)+\left (2+9 b^2 x^2\right ) \cosh (3 (a+b x))-6 b x (9 \sinh (a+b x)+\sinh (3 (a+b x)))}{108 b^3} \] Input:

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

Output:

(27*(2 + b^2*x^2)*Cosh[a + b*x] + (2 + 9*b^2*x^2)*Cosh[3*(a + b*x)] - 6*b* 
x*(9*Sinh[a + b*x] + Sinh[3*(a + b*x)]))/(108*b^3)
 

Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.10, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5896, 3042, 3791, 3042, 3777, 26, 3042, 26, 3118}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \sinh (a+b x) \cosh ^2(a+b x) \, dx\)

\(\Big \downarrow \) 5896

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \int x \cosh ^3(a+b x)dx}{3 b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \int x \sin \left (i a+i b x+\frac {\pi }{2}\right )^3dx}{3 b}\)

\(\Big \downarrow \) 3791

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \int x \cosh (a+b x)dx-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \int x \sin \left (i a+i b x+\frac {\pi }{2}\right )dx-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 3777

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \left (\frac {x \sinh (a+b x)}{b}-\frac {i \int -i \sinh (a+b x)dx}{b}\right )-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \left (\frac {x \sinh (a+b x)}{b}-\frac {\int \sinh (a+b x)dx}{b}\right )-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \left (\frac {x \sinh (a+b x)}{b}-\frac {\int -i \sin (i a+i b x)dx}{b}\right )-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (\frac {2}{3} \left (\frac {x \sinh (a+b x)}{b}+\frac {i \int \sin (i a+i b x)dx}{b}\right )-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

\(\Big \downarrow \) 3118

\(\displaystyle \frac {x^2 \cosh ^3(a+b x)}{3 b}-\frac {2 \left (-\frac {\cosh ^3(a+b x)}{9 b^2}+\frac {2}{3} \left (\frac {x \sinh (a+b x)}{b}-\frac {\cosh (a+b x)}{b^2}\right )+\frac {x \sinh (a+b x) \cosh ^2(a+b x)}{3 b}\right )}{3 b}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3118
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ 
[{c, d}, x]
 

rule 3777
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( 
-(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f)   Int[(c + d*x)^(m - 1)*C 
os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
 

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

rule 5896
Int[Cosh[(a_.) + (b_.)*(x_)^(n_.)]^(p_.)*(x_)^(m_.)*Sinh[(a_.) + (b_.)*(x_) 
^(n_.)], x_Symbol] :> Simp[x^(m - n + 1)*(Cosh[a + b*x^n]^(p + 1)/(b*n*(p + 
 1))), x] - Simp[(m - n + 1)/(b*n*(p + 1))   Int[x^(m - n)*Cosh[a + b*x^n]^ 
(p + 1), x], x] /; FreeQ[{a, b, p}, x] && LtQ[0, n, m + 1] && NeQ[p, -1]
 
Maple [A] (verified)

Time = 2.90 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.31

method result size
risch \(\frac {\left (9 b^{2} x^{2}-6 b x +2\right ) {\mathrm e}^{3 b x +3 a}}{216 b^{3}}+\frac {\left (b^{2} x^{2}-2 b x +2\right ) {\mathrm e}^{b x +a}}{8 b^{3}}+\frac {\left (b^{2} x^{2}+2 b x +2\right ) {\mathrm e}^{-b x -a}}{8 b^{3}}+\frac {\left (9 b^{2} x^{2}+6 b x +2\right ) {\mathrm e}^{-3 b x -3 a}}{216 b^{3}}\) \(109\)
derivativedivides \(\frac {\frac {a^{2} \cosh \left (b x +a \right )^{3}}{3}-2 a \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right )^{3}}{3}-\frac {2 \sinh \left (b x +a \right )}{9}-\frac {\cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right )}{9}\right )+\frac {\left (b x +a \right )^{2} \cosh \left (b x +a \right )^{3}}{3}-\frac {4 \left (b x +a \right ) \sinh \left (b x +a \right )}{9}-\frac {2 \left (b x +a \right ) \sinh \left (b x +a \right ) \cosh \left (b x +a \right )^{2}}{9}+\frac {4 \cosh \left (b x +a \right )}{9}+\frac {2 \cosh \left (b x +a \right )^{3}}{27}}{b^{3}}\) \(131\)
default \(\frac {\frac {a^{2} \cosh \left (b x +a \right )^{3}}{3}-2 a \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right )^{3}}{3}-\frac {2 \sinh \left (b x +a \right )}{9}-\frac {\cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right )}{9}\right )+\frac {\left (b x +a \right )^{2} \cosh \left (b x +a \right )^{3}}{3}-\frac {4 \left (b x +a \right ) \sinh \left (b x +a \right )}{9}-\frac {2 \left (b x +a \right ) \sinh \left (b x +a \right ) \cosh \left (b x +a \right )^{2}}{9}+\frac {4 \cosh \left (b x +a \right )}{9}+\frac {2 \cosh \left (b x +a \right )^{3}}{27}}{b^{3}}\) \(131\)
orering \(-\frac {40 \left (9 b^{4} x^{4}+b^{2} x^{2}-12\right ) \cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right )}{81 b^{6} x^{3}}+\frac {2 \left (45 b^{4} x^{4}-26 b^{2} x^{2}-180\right ) \left (2 x \cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right )+2 x^{2} \cosh \left (b x +a \right ) \sinh \left (b x +a \right )^{2} b +x^{2} \cosh \left (b x +a \right )^{3} b \right )}{81 b^{6} x^{4}}+\frac {8 \left (3 b^{2} x^{2}+5\right ) \left (2 \cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right )+8 x \cosh \left (b x +a \right ) \sinh \left (b x +a \right )^{2} b +4 x \cosh \left (b x +a \right )^{3} b +2 x^{2} b^{2} \sinh \left (b x +a \right )^{3}+7 x^{2} \cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right ) b^{2}\right )}{27 b^{6} x^{3}}-\frac {\left (9 b^{2} x^{2}+20\right ) \left (12 \cosh \left (b x +a \right ) \sinh \left (b x +a \right )^{2} b +6 \cosh \left (b x +a \right )^{3} b +12 x \,b^{2} \sinh \left (b x +a \right )^{3}+42 x \cosh \left (b x +a \right )^{2} \sinh \left (b x +a \right ) b^{2}+20 x^{2} b^{3} \sinh \left (b x +a \right )^{2} \cosh \left (b x +a \right )+7 x^{2} \cosh \left (b x +a \right )^{3} b^{3}\right )}{81 b^{6} x^{2}}\) \(340\)

Input:

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

Output:

1/216*(9*b^2*x^2-6*b*x+2)/b^3*exp(3*b*x+3*a)+1/8*(b^2*x^2-2*b*x+2)/b^3*exp 
(b*x+a)+1/8*(b^2*x^2+2*b*x+2)/b^3*exp(-b*x-a)+1/216*(9*b^2*x^2+6*b*x+2)/b^ 
3*exp(-3*b*x-3*a)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.27 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=-\frac {6 \, b x \sinh \left (b x + a\right )^{3} - {\left (9 \, b^{2} x^{2} + 2\right )} \cosh \left (b x + a\right )^{3} - 3 \, {\left (9 \, b^{2} x^{2} + 2\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} - 27 \, {\left (b^{2} x^{2} + 2\right )} \cosh \left (b x + a\right ) + 18 \, {\left (b x \cosh \left (b x + a\right )^{2} + 3 \, b x\right )} \sinh \left (b x + a\right )}{108 \, b^{3}} \] Input:

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

Output:

-1/108*(6*b*x*sinh(b*x + a)^3 - (9*b^2*x^2 + 2)*cosh(b*x + a)^3 - 3*(9*b^2 
*x^2 + 2)*cosh(b*x + a)*sinh(b*x + a)^2 - 27*(b^2*x^2 + 2)*cosh(b*x + a) + 
 18*(b*x*cosh(b*x + a)^2 + 3*b*x)*sinh(b*x + a))/b^3
 

Sympy [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.27 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\begin {cases} \frac {x^{2} \cosh ^{3}{\left (a + b x \right )}}{3 b} + \frac {4 x \sinh ^{3}{\left (a + b x \right )}}{9 b^{2}} - \frac {2 x \sinh {\left (a + b x \right )} \cosh ^{2}{\left (a + b x \right )}}{3 b^{2}} - \frac {4 \sinh ^{2}{\left (a + b x \right )} \cosh {\left (a + b x \right )}}{9 b^{3}} + \frac {14 \cosh ^{3}{\left (a + b x \right )}}{27 b^{3}} & \text {for}\: b \neq 0 \\\frac {x^{3} \sinh {\left (a \right )} \cosh ^{2}{\left (a \right )}}{3} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((x**2*cosh(a + b*x)**3/(3*b) + 4*x*sinh(a + b*x)**3/(9*b**2) - 2 
*x*sinh(a + b*x)*cosh(a + b*x)**2/(3*b**2) - 4*sinh(a + b*x)**2*cosh(a + b 
*x)/(9*b**3) + 14*cosh(a + b*x)**3/(27*b**3), Ne(b, 0)), (x**3*sinh(a)*cos 
h(a)**2/3, True))
 

Maxima [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.47 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {{\left (9 \, b^{2} x^{2} e^{\left (3 \, a\right )} - 6 \, b x e^{\left (3 \, a\right )} + 2 \, e^{\left (3 \, a\right )}\right )} e^{\left (3 \, b x\right )}}{216 \, b^{3}} + \frac {{\left (b^{2} x^{2} e^{a} - 2 \, b x e^{a} + 2 \, e^{a}\right )} e^{\left (b x\right )}}{8 \, b^{3}} + \frac {{\left (b^{2} x^{2} + 2 \, b x + 2\right )} e^{\left (-b x - a\right )}}{8 \, b^{3}} + \frac {{\left (9 \, b^{2} x^{2} + 6 \, b x + 2\right )} e^{\left (-3 \, b x - 3 \, a\right )}}{216 \, b^{3}} \] Input:

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

Output:

1/216*(9*b^2*x^2*e^(3*a) - 6*b*x*e^(3*a) + 2*e^(3*a))*e^(3*b*x)/b^3 + 1/8* 
(b^2*x^2*e^a - 2*b*x*e^a + 2*e^a)*e^(b*x)/b^3 + 1/8*(b^2*x^2 + 2*b*x + 2)* 
e^(-b*x - a)/b^3 + 1/216*(9*b^2*x^2 + 6*b*x + 2)*e^(-3*b*x - 3*a)/b^3
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.30 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {{\left (9 \, b^{2} x^{2} - 6 \, b x + 2\right )} e^{\left (3 \, b x + 3 \, a\right )}}{216 \, b^{3}} + \frac {{\left (b^{2} x^{2} - 2 \, b x + 2\right )} e^{\left (b x + a\right )}}{8 \, b^{3}} + \frac {{\left (b^{2} x^{2} + 2 \, b x + 2\right )} e^{\left (-b x - a\right )}}{8 \, b^{3}} + \frac {{\left (9 \, b^{2} x^{2} + 6 \, b x + 2\right )} e^{\left (-3 \, b x - 3 \, a\right )}}{216 \, b^{3}} \] Input:

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

Output:

1/216*(9*b^2*x^2 - 6*b*x + 2)*e^(3*b*x + 3*a)/b^3 + 1/8*(b^2*x^2 - 2*b*x + 
 2)*e^(b*x + a)/b^3 + 1/8*(b^2*x^2 + 2*b*x + 2)*e^(-b*x - a)/b^3 + 1/216*( 
9*b^2*x^2 + 6*b*x + 2)*e^(-3*b*x - 3*a)/b^3
 

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.83 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {\frac {4\,\mathrm {cosh}\left (a+b\,x\right )}{9}-b\,\left (\frac {2\,x\,\mathrm {sinh}\left (a+b\,x\right )\,{\mathrm {cosh}\left (a+b\,x\right )}^2}{9}+\frac {4\,x\,\mathrm {sinh}\left (a+b\,x\right )}{9}\right )+\frac {2\,{\mathrm {cosh}\left (a+b\,x\right )}^3}{27}+\frac {b^2\,x^2\,{\mathrm {cosh}\left (a+b\,x\right )}^3}{3}}{b^3} \] Input:

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

Output:

((4*cosh(a + b*x))/9 - b*((4*x*sinh(a + b*x))/9 + (2*x*cosh(a + b*x)^2*sin 
h(a + b*x))/9) + (2*cosh(a + b*x)^3)/27 + (b^2*x^2*cosh(a + b*x)^3)/3)/b^3
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.96 \[ \int x^2 \cosh ^2(a+b x) \sinh (a+b x) \, dx=\frac {9 e^{6 b x +6 a} b^{2} x^{2}-6 e^{6 b x +6 a} b x +2 e^{6 b x +6 a}+27 e^{4 b x +4 a} b^{2} x^{2}-54 e^{4 b x +4 a} b x +54 e^{4 b x +4 a}+27 e^{2 b x +2 a} b^{2} x^{2}+54 e^{2 b x +2 a} b x +54 e^{2 b x +2 a}+9 b^{2} x^{2}+6 b x +2}{216 e^{3 b x +3 a} b^{3}} \] Input:

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

Output:

(9*e**(6*a + 6*b*x)*b**2*x**2 - 6*e**(6*a + 6*b*x)*b*x + 2*e**(6*a + 6*b*x 
) + 27*e**(4*a + 4*b*x)*b**2*x**2 - 54*e**(4*a + 4*b*x)*b*x + 54*e**(4*a + 
 4*b*x) + 27*e**(2*a + 2*b*x)*b**2*x**2 + 54*e**(2*a + 2*b*x)*b*x + 54*e** 
(2*a + 2*b*x) + 9*b**2*x**2 + 6*b*x + 2)/(216*e**(3*a + 3*b*x)*b**3)