### 3.357 $$\int x^2 \sinh (a+b x) \tanh (a+b x) \, dx$$

Optimal. Leaf size=135 $\frac{2 i x \text{PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}-\frac{2 i x \text{PolyLog}\left (2,i e^{a+b x}\right )}{b^2}-\frac{2 i \text{PolyLog}\left (3,-i e^{a+b x}\right )}{b^3}+\frac{2 i \text{PolyLog}\left (3,i e^{a+b x}\right )}{b^3}+\frac{2 \sinh (a+b x)}{b^3}-\frac{2 x \cosh (a+b x)}{b^2}-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x^2 \sinh (a+b x)}{b}$

[Out]

(-2*x^2*ArcTan[E^(a + b*x)])/b - (2*x*Cosh[a + b*x])/b^2 + ((2*I)*x*PolyLog[2, (-I)*E^(a + b*x)])/b^2 - ((2*I)
*x*PolyLog[2, I*E^(a + b*x)])/b^2 - ((2*I)*PolyLog[3, (-I)*E^(a + b*x)])/b^3 + ((2*I)*PolyLog[3, I*E^(a + b*x)
])/b^3 + (2*Sinh[a + b*x])/b^3 + (x^2*Sinh[a + b*x])/b

________________________________________________________________________________________

Rubi [A]  time = 0.129759, antiderivative size = 135, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 7, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.438, Rules used = {5449, 3296, 2637, 4180, 2531, 2282, 6589} $\frac{2 i x \text{PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}-\frac{2 i x \text{PolyLog}\left (2,i e^{a+b x}\right )}{b^2}-\frac{2 i \text{PolyLog}\left (3,-i e^{a+b x}\right )}{b^3}+\frac{2 i \text{PolyLog}\left (3,i e^{a+b x}\right )}{b^3}+\frac{2 \sinh (a+b x)}{b^3}-\frac{2 x \cosh (a+b x)}{b^2}-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x^2 \sinh (a+b x)}{b}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-2*x^2*ArcTan[E^(a + b*x)])/b - (2*x*Cosh[a + b*x])/b^2 + ((2*I)*x*PolyLog[2, (-I)*E^(a + b*x)])/b^2 - ((2*I)
*x*PolyLog[2, I*E^(a + b*x)])/b^2 - ((2*I)*PolyLog[3, (-I)*E^(a + b*x)])/b^3 + ((2*I)*PolyLog[3, I*E^(a + b*x)
])/b^3 + (2*Sinh[a + b*x])/b^3 + (x^2*Sinh[a + b*x])/b

Rule 5449

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

Rule 3296

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

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4180

Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c
+ d*x)^m*ArcTanh[E^(-(I*e) + f*fz*x)/E^(I*k*Pi)])/(f*fz*I), x] + (-Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*
Log[1 - E^(-(I*e) + f*fz*x)/E^(I*k*Pi)], x], x] + Dist[(d*m)/(f*fz*I), Int[(c + d*x)^(m - 1)*Log[1 + E^(-(I*e)
+ f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx &=\int x^2 \cosh (a+b x) \, dx-\int x^2 \text{sech}(a+b x) \, dx\\ &=-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x^2 \sinh (a+b x)}{b}+\frac{(2 i) \int x \log \left (1-i e^{a+b x}\right ) \, dx}{b}-\frac{(2 i) \int x \log \left (1+i e^{a+b x}\right ) \, dx}{b}-\frac{2 \int x \sinh (a+b x) \, dx}{b}\\ &=-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac{2 x \cosh (a+b x)}{b^2}+\frac{2 i x \text{Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac{2 i x \text{Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac{x^2 \sinh (a+b x)}{b}-\frac{(2 i) \int \text{Li}_2\left (-i e^{a+b x}\right ) \, dx}{b^2}+\frac{(2 i) \int \text{Li}_2\left (i e^{a+b x}\right ) \, dx}{b^2}+\frac{2 \int \cosh (a+b x) \, dx}{b^2}\\ &=-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac{2 x \cosh (a+b x)}{b^2}+\frac{2 i x \text{Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac{2 i x \text{Li}_2\left (i e^{a+b x}\right )}{b^2}+\frac{2 \sinh (a+b x)}{b^3}+\frac{x^2 \sinh (a+b x)}{b}-\frac{(2 i) \operatorname{Subst}\left (\int \frac{\text{Li}_2(-i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}+\frac{(2 i) \operatorname{Subst}\left (\int \frac{\text{Li}_2(i x)}{x} \, dx,x,e^{a+b x}\right )}{b^3}\\ &=-\frac{2 x^2 \tan ^{-1}\left (e^{a+b x}\right )}{b}-\frac{2 x \cosh (a+b x)}{b^2}+\frac{2 i x \text{Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac{2 i x \text{Li}_2\left (i e^{a+b x}\right )}{b^2}-\frac{2 i \text{Li}_3\left (-i e^{a+b x}\right )}{b^3}+\frac{2 i \text{Li}_3\left (i e^{a+b x}\right )}{b^3}+\frac{2 \sinh (a+b x)}{b^3}+\frac{x^2 \sinh (a+b x)}{b}\\ \end{align*}

Mathematica [A]  time = 1.42879, size = 153, normalized size = 1.13 $-\frac{i \left (-2 b x \text{PolyLog}\left (2,-i e^{a+b x}\right )+2 b x \text{PolyLog}\left (2,i e^{a+b x}\right )+2 \text{PolyLog}\left (3,-i e^{a+b x}\right )-2 \text{PolyLog}\left (3,i e^{a+b x}\right )+b^2 x^2 \log \left (1-i e^{a+b x}\right )-b^2 x^2 \log \left (1+i e^{a+b x}\right )+i b^2 x^2 \sinh (a+b x)+2 i \sinh (a+b x)-2 i b x \cosh (a+b x)\right )}{b^3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

((-I)*((-2*I)*b*x*Cosh[a + b*x] + b^2*x^2*Log[1 - I*E^(a + b*x)] - b^2*x^2*Log[1 + I*E^(a + b*x)] - 2*b*x*Poly
Log[2, (-I)*E^(a + b*x)] + 2*b*x*PolyLog[2, I*E^(a + b*x)] + 2*PolyLog[3, (-I)*E^(a + b*x)] - 2*PolyLog[3, I*E
^(a + b*x)] + (2*I)*Sinh[a + b*x] + I*b^2*x^2*Sinh[a + b*x]))/b^3

________________________________________________________________________________________

Maple [F]  time = 0.057, size = 0, normalized size = 0. \begin{align*} \int{x}^{2}{\rm sech} \left (bx+a\right ) \left ( \sinh \left ( bx+a \right ) \right ) ^{2}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left ({\left (b^{2} x^{2} e^{\left (2 \, a\right )} - 2 \, b x e^{\left (2 \, a\right )} + 2 \, e^{\left (2 \, a\right )}\right )} e^{\left (b x\right )} -{\left (b^{2} x^{2} + 2 \, b x + 2\right )} e^{\left (-b x\right )}\right )} e^{\left (-a\right )}}{2 \, b^{3}} - 2 \, \int \frac{x^{2} e^{\left (b x + a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((b^2*x^2*e^(2*a) - 2*b*x*e^(2*a) + 2*e^(2*a))*e^(b*x) - (b^2*x^2 + 2*b*x + 2)*e^(-b*x))*e^(-a)/b^3 - 2*in
tegrate(x^2*e^(b*x + a)/(e^(2*b*x + 2*a) + 1), x)

________________________________________________________________________________________

Fricas [C]  time = 2.35461, size = 1345, normalized size = 9.96 \begin{align*} -\frac{b^{2} x^{2} -{\left (b^{2} x^{2} - 2 \, b x + 2\right )} \cosh \left (b x + a\right )^{2} - 2 \,{\left (b^{2} x^{2} - 2 \, b x + 2\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) -{\left (b^{2} x^{2} - 2 \, b x + 2\right )} \sinh \left (b x + a\right )^{2} + 2 \, b x -{\left (-4 i \, b x \cosh \left (b x + a\right ) - 4 i \, b x \sinh \left (b x + a\right )\right )}{\rm Li}_2\left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) -{\left (4 i \, b x \cosh \left (b x + a\right ) + 4 i \, b x \sinh \left (b x + a\right )\right )}{\rm Li}_2\left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) -{\left (-2 i \, a^{2} \cosh \left (b x + a\right ) - 2 i \, a^{2} \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + i\right ) -{\left (2 i \, a^{2} \cosh \left (b x + a\right ) + 2 i \, a^{2} \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - i\right ) -{\left ({\left (2 i \, b^{2} x^{2} - 2 i \, a^{2}\right )} \cosh \left (b x + a\right ) +{\left (2 i \, b^{2} x^{2} - 2 i \, a^{2}\right )} \sinh \left (b x + a\right )\right )} \log \left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right ) + 1\right ) -{\left ({\left (-2 i \, b^{2} x^{2} + 2 i \, a^{2}\right )} \cosh \left (b x + a\right ) +{\left (-2 i \, b^{2} x^{2} + 2 i \, a^{2}\right )} \sinh \left (b x + a\right )\right )} \log \left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right ) + 1\right ) -{\left (4 i \, \cosh \left (b x + a\right ) + 4 i \, \sinh \left (b x + a\right )\right )}{\rm polylog}\left (3, i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) -{\left (-4 i \, \cosh \left (b x + a\right ) - 4 i \, \sinh \left (b x + a\right )\right )}{\rm polylog}\left (3, -i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) + 2}{2 \,{\left (b^{3} \cosh \left (b x + a\right ) + b^{3} \sinh \left (b x + a\right )\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(b^2*x^2 - (b^2*x^2 - 2*b*x + 2)*cosh(b*x + a)^2 - 2*(b^2*x^2 - 2*b*x + 2)*cosh(b*x + a)*sinh(b*x + a) -
(b^2*x^2 - 2*b*x + 2)*sinh(b*x + a)^2 + 2*b*x - (-4*I*b*x*cosh(b*x + a) - 4*I*b*x*sinh(b*x + a))*dilog(I*cosh(
b*x + a) + I*sinh(b*x + a)) - (4*I*b*x*cosh(b*x + a) + 4*I*b*x*sinh(b*x + a))*dilog(-I*cosh(b*x + a) - I*sinh(
b*x + a)) - (-2*I*a^2*cosh(b*x + a) - 2*I*a^2*sinh(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a) + I) - (2*I*a^2
*cosh(b*x + a) + 2*I*a^2*sinh(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a) - I) - ((2*I*b^2*x^2 - 2*I*a^2)*cosh
(b*x + a) + (2*I*b^2*x^2 - 2*I*a^2)*sinh(b*x + a))*log(I*cosh(b*x + a) + I*sinh(b*x + a) + 1) - ((-2*I*b^2*x^2
+ 2*I*a^2)*cosh(b*x + a) + (-2*I*b^2*x^2 + 2*I*a^2)*sinh(b*x + a))*log(-I*cosh(b*x + a) - I*sinh(b*x + a) + 1
) - (4*I*cosh(b*x + a) + 4*I*sinh(b*x + a))*polylog(3, I*cosh(b*x + a) + I*sinh(b*x + a)) - (-4*I*cosh(b*x + a
) - 4*I*sinh(b*x + a))*polylog(3, -I*cosh(b*x + a) - I*sinh(b*x + a)) + 2)/(b^3*cosh(b*x + a) + b^3*sinh(b*x +
a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sinh ^{2}{\left (a + b x \right )} \operatorname{sech}{\left (a + b x \right )}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(x**2*sinh(a + b*x)**2*sech(a + b*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \operatorname{sech}\left (b x + a\right ) \sinh \left (b x + a\right )^{2}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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