Integrand size = 16, antiderivative size = 135 \[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=-\frac {2 x^2 \arctan \left (e^{a+b x}\right )}{b}-\frac {2 x \cosh (a+b x)}{b^2}+\frac {2 i x \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}-\frac {2 i x \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b^2}-\frac {2 i \operatorname {PolyLog}\left (3,-i e^{a+b x}\right )}{b^3}+\frac {2 i \operatorname {PolyLog}\left (3,i e^{a+b x}\right )}{b^3}+\frac {2 \sinh (a+b x)}{b^3}+\frac {x^2 \sinh (a+b x)}{b} \]
-2*x^2*arctan(exp(b*x+a))/b-2*x*cosh(b*x+a)/b^2+2*I*x*polylog(2,-I*exp(b*x +a))/b^2-2*I*x*polylog(2,I*exp(b*x+a))/b^2-2*I*polylog(3,-I*exp(b*x+a))/b^ 3+2*I*polylog(3,I*exp(b*x+a))/b^3+2*sinh(b*x+a)/b^3+x^2*sinh(b*x+a)/b
Time = 0.14 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.13 \[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=-\frac {i \left (-2 i b x \cosh (a+b x)+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 )-2 b x \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )+2 b x \operatorname {PolyLog}\left (2,i e^{a+b x}\right )+2 \operatorname {PolyLog}\left (3,-i e^{a+b x}\right )-2 \operatorname {PolyLog}\left (3,i e^{a+b x}\right )+2 i \sinh (a+b x)+i b^2 x^2 \sinh (a+b x)\right )}{b^3} \]
((-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*PolyLog[2, (-I)*E^(a + b*x)] + 2*b*x*PolyL og[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
Time = 0.77 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.13, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.812, Rules used = {5972, 3042, 3777, 26, 3042, 26, 3777, 3042, 3117, 4668, 3011, 2720, 7143}
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) \tanh (a+b x) \, dx\) |
\(\Big \downarrow \) 5972 |
\(\displaystyle \int x^2 \cosh (a+b x)dx-\int x^2 \text {sech}(a+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x^2 \sin \left (i a+i b x+\frac {\pi }{2}\right )dx-\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx-\frac {2 i \int -i x \sinh (a+b x)dx}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx-\frac {2 \int x \sinh (a+b x)dx}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx-\frac {2 \int -i x \sin (i a+i b x)dx}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx+\frac {2 i \int x \sin (i a+i b x)dx}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \int \cosh (a+b x)dx}{b}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \int \sin \left (i a+i b x+\frac {\pi }{2}\right )dx}{b}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle -\int x^2 \csc \left (i a+i b x+\frac {\pi }{2}\right )dx+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \sinh (a+b x)}{b^2}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 4668 |
\(\displaystyle \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 x^2 \arctan \left (e^{a+b x}\right )}{b}+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \sinh (a+b x)}{b^2}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle -\frac {2 i \left (\frac {\int \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )dx}{b}-\frac {x \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b}\right )}{b}+\frac {2 i \left (\frac {\int \operatorname {PolyLog}\left (2,i e^{a+b x}\right )dx}{b}-\frac {x \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b}\right )}{b}-\frac {2 x^2 \arctan \left (e^{a+b x}\right )}{b}+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \sinh (a+b x)}{b^2}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle -\frac {2 i \left (\frac {\int e^{-a-b x} \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )de^{a+b x}}{b^2}-\frac {x \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b}\right )}{b}+\frac {2 i \left (\frac {\int e^{-a-b x} \operatorname {PolyLog}\left (2,i e^{a+b x}\right )de^{a+b x}}{b^2}-\frac {x \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b}\right )}{b}-\frac {2 x^2 \arctan \left (e^{a+b x}\right )}{b}+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \sinh (a+b x)}{b^2}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle -\frac {2 x^2 \arctan \left (e^{a+b x}\right )}{b}-\frac {2 i \left (\frac {\operatorname {PolyLog}\left (3,-i e^{a+b x}\right )}{b^2}-\frac {x \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b}\right )}{b}+\frac {2 i \left (\frac {\operatorname {PolyLog}\left (3,i e^{a+b x}\right )}{b^2}-\frac {x \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b}\right )}{b}+\frac {2 i \left (\frac {i x \cosh (a+b x)}{b}-\frac {i \sinh (a+b x)}{b^2}\right )}{b}+\frac {x^2 \sinh (a+b x)}{b}\) |
(-2*x^2*ArcTan[E^(a + b*x)])/b - ((2*I)*(-((x*PolyLog[2, (-I)*E^(a + b*x)] )/b) + PolyLog[3, (-I)*E^(a + b*x)]/b^2))/b + ((2*I)*(-((x*PolyLog[2, I*E^ (a + b*x)])/b) + PolyLog[3, I*E^(a + b*x)]/b^2))/b + (x^2*Sinh[a + b*x])/b + ((2*I)*((I*x*Cosh[a + b*x])/b - (I*Sinh[a + b*x])/b^2))/b
3.4.57.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
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] + Simp[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]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
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]
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] + (-Simp[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] + Simp[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]
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]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> 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]
\[\int x^{2} \operatorname {sech}\left (b x +a \right ) \sinh \left (b x +a \right )^{2}d x\]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 477 vs. \(2 (112) = 224\).
Time = 0.27 (sec) , antiderivative size = 477, normalized size of antiderivative = 3.53 \[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=-\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 + 4 \, {\left (i \, b x \cosh \left (b x + a\right ) + 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 ) + 4 \, {\left (-i \, b x \cosh \left (b x + a\right ) - 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 ) + 2 \, {\left (i \, a^{2} \cosh \left (b x + a\right ) + 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 ) + 2 \, {\left (-i \, a^{2} \cosh \left (b x + a\right ) - 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 ) + 2 \, {\left ({\left (-i \, b^{2} x^{2} + i \, a^{2}\right )} \cosh \left (b x + a\right ) + {\left (-i \, b^{2} x^{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 ) + 2 \, {\left ({\left (i \, b^{2} x^{2} - i \, a^{2}\right )} \cosh \left (b x + a\right ) + {\left (i \, b^{2} x^{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 ) + 4 \, {\left (-i \, \cosh \left (b x + a\right ) - 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 ) + 4 \, {\left (i \, \cosh \left (b x + a\right ) + 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 )}} \]
-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) + 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) - I*b*x*sinh(b*x + a))*di log(-I*cosh(b*x + a) - I*sinh(b*x + a)) + 2*(I*a^2*cosh(b*x + a) + I*a^2*s inh(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a) + I) + 2*(-I*a^2*cosh(b*x + a) - I*a^2*sinh(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a) - I) + 2*((- I*b^2*x^2 + I*a^2)*cosh(b*x + a) + (-I*b^2*x^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 - I*a^2)*cosh(b*x + a) + (I*b^2*x^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) - I*sinh(b*x + a))*polylog(3, I*cosh(b*x + a) + I*sinh(b*x + a)) + 4*(I*cosh(b*x + a) + 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))
\[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=\int x^{2} \sinh ^{2}{\left (a + b x \right )} \operatorname {sech}{\left (a + b x \right )}\, dx \]
\[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=\int { x^{2} \operatorname {sech}\left (b x + a\right ) \sinh \left (b x + a\right )^{2} \,d x } \]
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*integrate(x^2*e^(b*x + a)/(e^(2*b*x + 2* a) + 1), x)
\[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=\int { x^{2} \operatorname {sech}\left (b x + a\right ) \sinh \left (b x + a\right )^{2} \,d x } \]
Timed out. \[ \int x^2 \sinh (a+b x) \tanh (a+b x) \, dx=\int \frac {x^2\,{\mathrm {sinh}\left (a+b\,x\right )}^2}{\mathrm {cosh}\left (a+b\,x\right )} \,d x \]