3.358 \(\int x \sinh (a+b x) \tanh (a+b x) \, dx\)

Optimal. Leaf size=77 \[ \frac {i \text {Li}_2\left (-i e^{a+b x}\right )}{b^2}-\frac {i \text {Li}_2\left (i e^{a+b x}\right )}{b^2}-\frac {\cosh (a+b x)}{b^2}-\frac {2 x \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac {x \sinh (a+b x)}{b} \]

[Out]

-2*x*arctan(exp(b*x+a))/b-cosh(b*x+a)/b^2+I*polylog(2,-I*exp(b*x+a))/b^2-I*polylog(2,I*exp(b*x+a))/b^2+x*sinh(
b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5449, 3296, 2638, 4180, 2279, 2391} \[ \frac {i \text {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}-\frac {i \text {PolyLog}\left (2,i e^{a+b x}\right )}{b^2}-\frac {\cosh (a+b x)}{b^2}-\frac {2 x \tan ^{-1}\left (e^{a+b x}\right )}{b}+\frac {x \sinh (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2638

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

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 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 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.12, size = 213, normalized size = 2.77 \[ -\frac {-i \left (\text {Li}_2\left (-e^{i \left (-i a-i b x+\frac {\pi }{2}\right )}\right )-\text {Li}_2\left (e^{i \left (-i a-i b x+\frac {\pi }{2}\right )}\right )\right )-\left (\left (-i a-i b x+\frac {\pi }{2}\right ) \left (\log \left (1-e^{i \left (-i a-i b x+\frac {\pi }{2}\right )}\right )-\log \left (1+e^{i \left (-i a-i b x+\frac {\pi }{2}\right )}\right )\right )\right )+\left (\frac {\pi }{2}-i a\right ) \log \left (\tan \left (\frac {1}{2} \left (-i a-i b x+\frac {\pi }{2}\right )\right )\right )}{b^2}+\frac {\cosh (b x) (b x \sinh (a)-\cosh (a))}{b^2}+\frac {\sinh (b x) (b x \cosh (a)-\sinh (a))}{b^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.68, size = 322, normalized size = 4.18 \[ \frac {{\left (b x - 1\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b x - 1\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b x - 1\right )} \sinh \left (b x + a\right )^{2} - b x + {\left (-2 i \, \cosh \left (b x + a\right ) - 2 i \, \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 \, \cosh \left (b x + a\right ) + 2 i \, \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 \cosh \left (b x + a\right ) + 2 i \, a \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 \cosh \left (b x + a\right ) - 2 i \, a \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 x + 2 i \, a\right )} \cosh \left (b x + a\right ) + {\left (2 i \, b x + 2 i \, a\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 x - 2 i \, a\right )} \cosh \left (b x + a\right ) + {\left (-2 i \, b x - 2 i \, a\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 ) - 1}{2 \, {\left (b^{2} \cosh \left (b x + a\right ) + b^{2} \sinh \left (b x + a\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((b*x - 1)*cosh(b*x + a)^2 + 2*(b*x - 1)*cosh(b*x + a)*sinh(b*x + a) + (b*x - 1)*sinh(b*x + a)^2 - b*x + (
-2*I*cosh(b*x + a) - 2*I*sinh(b*x + a))*dilog(I*cosh(b*x + a) + I*sinh(b*x + a)) + (2*I*cosh(b*x + a) + 2*I*si
nh(b*x + a))*dilog(-I*cosh(b*x + a) - I*sinh(b*x + a)) + (2*I*a*cosh(b*x + a) + 2*I*a*sinh(b*x + a))*log(cosh(
b*x + a) + sinh(b*x + a) + I) + (-2*I*a*cosh(b*x + a) - 2*I*a*sinh(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a)
 - I) + ((2*I*b*x + 2*I*a)*cosh(b*x + a) + (2*I*b*x + 2*I*a)*sinh(b*x + a))*log(I*cosh(b*x + a) + I*sinh(b*x +
 a) + 1) + ((-2*I*b*x - 2*I*a)*cosh(b*x + a) + (-2*I*b*x - 2*I*a)*sinh(b*x + a))*log(-I*cosh(b*x + a) - I*sinh
(b*x + a) + 1) - 1)/(b^2*cosh(b*x + a) + b^2*sinh(b*x + a))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {sech}\left (b x + a\right ) \sinh \left (b x + a\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.39, size = 162, normalized size = 2.10 \[ \frac {\left (b x -1\right ) {\mathrm e}^{b x +a}}{2 b^{2}}-\frac {\left (b x +1\right ) {\mathrm e}^{-b x -a}}{2 b^{2}}+\frac {i \ln \left (1+i {\mathrm e}^{b x +a}\right ) x}{b}+\frac {i \ln \left (1+i {\mathrm e}^{b x +a}\right ) a}{b^{2}}-\frac {i \ln \left (1-i {\mathrm e}^{b x +a}\right ) x}{b}-\frac {i \ln \left (1-i {\mathrm e}^{b x +a}\right ) a}{b^{2}}+\frac {i \dilog \left (1+i {\mathrm e}^{b x +a}\right )}{b^{2}}-\frac {i \dilog \left (1-i {\mathrm e}^{b x +a}\right )}{b^{2}}+\frac {2 a \arctan \left ({\mathrm e}^{b x +a}\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(b*x-1)/b^2*exp(b*x+a)-1/2*(b*x+1)/b^2*exp(-b*x-a)+I/b*ln(1+I*exp(b*x+a))*x+I/b^2*ln(1+I*exp(b*x+a))*a-I/b
*ln(1-I*exp(b*x+a))*x-I/b^2*ln(1-I*exp(b*x+a))*a+I/b^2*dilog(1+I*exp(b*x+a))-I/b^2*dilog(1-I*exp(b*x+a))+2/b^2
*a*arctan(exp(b*x+a))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {{\left ({\left (b x e^{\left (2 \, a\right )} - e^{\left (2 \, a\right )}\right )} e^{\left (b x\right )} - {\left (b x + 1\right )} e^{\left (-b x\right )}\right )} e^{\left (-a\right )}}{2 \, b^{2}} - 2 \, \int \frac {x e^{\left (b x + a\right )}}{e^{\left (2 \, b x + 2 \, a\right )} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x\,{\mathrm {sinh}\left (a+b\,x\right )}^2}{\mathrm {cosh}\left (a+b\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \sinh ^{2}{\left (a + b x \right )} \operatorname {sech}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________