\(\int (c+d x) \text {sech}(a+b x) \, dx\) [28]

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

Optimal result

Integrand size = 12, antiderivative size = 61 \[ \int (c+d x) \text {sech}(a+b x) \, dx=\frac {2 (c+d x) \arctan \left (e^{a+b x}\right )}{b}-\frac {i d \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}+\frac {i d \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b^2} \] Output:

2*(d*x+c)*arctan(exp(b*x+a))/b-I*d*polylog(2,-I*exp(b*x+a))/b^2+I*d*polylo 
g(2,I*exp(b*x+a))/b^2
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.39 \[ \int (c+d x) \text {sech}(a+b x) \, dx=-\frac {c \cot ^{-1}(\sinh (a+b x))}{b}+\frac {i d \left (b x \left (\log \left (1-i e^{a+b x}\right )-\log \left (1+i e^{a+b x}\right )\right )-\operatorname {PolyLog}\left (2,-i e^{a+b x}\right )+\operatorname {PolyLog}\left (2,i e^{a+b x}\right )\right )}{b^2} \] Input:

Integrate[(c + d*x)*Sech[a + b*x],x]
 

Output:

-((c*ArcCot[Sinh[a + b*x]])/b) + (I*d*(b*x*(Log[1 - I*E^(a + b*x)] - Log[1 
 + I*E^(a + b*x)]) - PolyLog[2, (-I)*E^(a + b*x)] + PolyLog[2, I*E^(a + b* 
x)]))/b^2
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4668, 2715, 2838}

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 (c+d x) \text {sech}(a+b x) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x) \csc \left (i a+i b x+\frac {\pi }{2}\right )dx\)

\(\Big \downarrow \) 4668

\(\displaystyle -\frac {i d \int \log \left (1-i e^{a+b x}\right )dx}{b}+\frac {i d \int \log \left (1+i e^{a+b x}\right )dx}{b}+\frac {2 (c+d x) \arctan \left (e^{a+b x}\right )}{b}\)

\(\Big \downarrow \) 2715

\(\displaystyle -\frac {i d \int e^{-a-b x} \log \left (1-i e^{a+b x}\right )de^{a+b x}}{b^2}+\frac {i d \int e^{-a-b x} \log \left (1+i e^{a+b x}\right )de^{a+b x}}{b^2}+\frac {2 (c+d x) \arctan \left (e^{a+b x}\right )}{b}\)

\(\Big \downarrow \) 2838

\(\displaystyle \frac {2 (c+d x) \arctan \left (e^{a+b x}\right )}{b}-\frac {i d \operatorname {PolyLog}\left (2,-i e^{a+b x}\right )}{b^2}+\frac {i d \operatorname {PolyLog}\left (2,i e^{a+b x}\right )}{b^2}\)

Input:

Int[(c + d*x)*Sech[a + b*x],x]
 

Output:

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

Defintions of rubi rules used

rule 2715
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] 
:> Simp[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 2838
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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4668
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]
 
Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.66

method result size
derivativedivides \(\frac {\frac {d \left (i \left (b x +a \right ) \left (\ln \left (1-i {\mathrm e}^{b x +a}\right )-\ln \left (1+i {\mathrm e}^{b x +a}\right )\right )-i \operatorname {dilog}\left (1+i {\mathrm e}^{b x +a}\right )+i \operatorname {dilog}\left (1-i {\mathrm e}^{b x +a}\right )\right )}{b}-\frac {2 d a \arctan \left ({\mathrm e}^{b x +a}\right )}{b}+2 c \arctan \left ({\mathrm e}^{b x +a}\right )}{b}\) \(101\)
default \(\frac {\frac {d \left (i \left (b x +a \right ) \left (\ln \left (1-i {\mathrm e}^{b x +a}\right )-\ln \left (1+i {\mathrm e}^{b x +a}\right )\right )-i \operatorname {dilog}\left (1+i {\mathrm e}^{b x +a}\right )+i \operatorname {dilog}\left (1-i {\mathrm e}^{b x +a}\right )\right )}{b}-\frac {2 d a \arctan \left ({\mathrm e}^{b x +a}\right )}{b}+2 c \arctan \left ({\mathrm e}^{b x +a}\right )}{b}\) \(101\)
parts \(\frac {\arctan \left (\sinh \left (b x +a \right )\right ) d x}{b}+\frac {\arctan \left (\sinh \left (b x +a \right )\right ) c}{b}-\frac {d \left (x \arctan \left (\sinh \left (b x +a \right )\right )-\frac {i \left (b x +a \right ) \left (\ln \left (1-i {\mathrm e}^{b x +a}\right )-\ln \left (1+i {\mathrm e}^{b x +a}\right )\right )-i \operatorname {dilog}\left (1+i {\mathrm e}^{b x +a}\right )+i \operatorname {dilog}\left (1-i {\mathrm e}^{b x +a}\right )-2 a \arctan \left ({\mathrm e}^{b x +a}\right )}{b}\right )}{b}\) \(124\)
risch \(\frac {2 c \arctan \left ({\mathrm e}^{b x +a}\right )}{b}-\frac {i d \ln \left (1+i {\mathrm e}^{b x +a}\right ) x}{b}-\frac {i d \ln \left (1+i {\mathrm e}^{b x +a}\right ) a}{b^{2}}+\frac {i d \ln \left (1-i {\mathrm e}^{b x +a}\right ) x}{b}+\frac {i d \ln \left (1-i {\mathrm e}^{b x +a}\right ) a}{b^{2}}-\frac {i d \operatorname {dilog}\left (1+i {\mathrm e}^{b x +a}\right )}{b^{2}}+\frac {i d \operatorname {dilog}\left (1-i {\mathrm e}^{b x +a}\right )}{b^{2}}-\frac {2 d a \arctan \left ({\mathrm e}^{b x +a}\right )}{b^{2}}\) \(147\)

Input:

int((d*x+c)*sech(b*x+a),x,method=_RETURNVERBOSE)
 

Output:

1/b*(d/b*(I*(b*x+a)*(ln(1-I*exp(b*x+a))-ln(1+I*exp(b*x+a)))-I*dilog(1+I*ex 
p(b*x+a))+I*dilog(1-I*exp(b*x+a)))-2*d/b*a*arctan(exp(b*x+a))+2*c*arctan(e 
xp(b*x+a)))
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 157 vs. \(2 (48) = 96\).

Time = 0.09 (sec) , antiderivative size = 157, normalized size of antiderivative = 2.57 \[ \int (c+d x) \text {sech}(a+b x) \, dx=\frac {i \, d {\rm Li}_2\left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) + {\left (i \, b c - i \, a d\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + i\right ) + {\left (-i \, b c + i \, a d\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - i\right ) + {\left (-i \, b d x - i \, a d\right )} \log \left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right ) + 1\right ) + {\left (i \, b d x + i \, a d\right )} \log \left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right ) + 1\right )}{b^{2}} \] Input:

integrate((d*x+c)*sech(b*x+a),x, algorithm="fricas")
 

Output:

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

Sympy [F]

\[ \int (c+d x) \text {sech}(a+b x) \, dx=\int \left (c + d x\right ) \operatorname {sech}{\left (a + b x \right )}\, dx \] Input:

integrate((d*x+c)*sech(b*x+a),x)
 

Output:

Integral((c + d*x)*sech(a + b*x), x)
 

Maxima [F]

\[ \int (c+d x) \text {sech}(a+b x) \, dx=\int { {\left (d x + c\right )} \operatorname {sech}\left (b x + a\right ) \,d x } \] Input:

integrate((d*x+c)*sech(b*x+a),x, algorithm="maxima")
 

Output:

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

Giac [F]

\[ \int (c+d x) \text {sech}(a+b x) \, dx=\int { {\left (d x + c\right )} \operatorname {sech}\left (b x + a\right ) \,d x } \] Input:

integrate((d*x+c)*sech(b*x+a),x, algorithm="giac")
 

Output:

integrate((d*x + c)*sech(b*x + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int (c+d x) \text {sech}(a+b x) \, dx=\int \frac {c+d\,x}{\mathrm {cosh}\left (a+b\,x\right )} \,d x \] Input:

int((c + d*x)/cosh(a + b*x),x)
 

Output:

int((c + d*x)/cosh(a + b*x), x)
 

Reduce [F]

\[ \int (c+d x) \text {sech}(a+b x) \, dx=\frac {2 \mathit {atan} \left (e^{b x +a}\right ) c +\left (\int \mathrm {sech}\left (b x +a \right ) x d x \right ) b d}{b} \] Input:

int((d*x+c)*sech(b*x+a),x)
 

Output:

(2*atan(e**(a + b*x))*c + int(sech(a + b*x)*x,x)*b*d)/b