\(\int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [277]

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

Optimal result

Integrand size = 31, antiderivative size = 450 \[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {2 (e+f x)^3}{3 a d}-\frac {i f (e+f x)^2 \arctan \left (e^{c+d x}\right )}{a d^2}+\frac {i f^3 \arctan (\sinh (c+d x))}{a d^4}-\frac {2 f (e+f x)^2 \log \left (1+e^{2 (c+d x)}\right )}{a d^2}+\frac {f^3 \log (\cosh (c+d x))}{a d^4}-\frac {f^2 (e+f x) \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{a d^3}+\frac {f^2 (e+f x) \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{a d^3}-\frac {2 f^2 (e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{a d^3}+\frac {f^3 \operatorname {PolyLog}\left (3,-i e^{c+d x}\right )}{a d^4}-\frac {f^3 \operatorname {PolyLog}\left (3,i e^{c+d x}\right )}{a d^4}+\frac {f^3 \operatorname {PolyLog}\left (3,-e^{2 (c+d x)}\right )}{a d^4}-\frac {i f^2 (e+f x) \text {sech}(c+d x)}{a d^3}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 a d^2}+\frac {i (e+f x)^3 \text {sech}^3(c+d x)}{3 a d}-\frac {f^2 (e+f x) \tanh (c+d x)}{a d^3}+\frac {2 (e+f x)^3 \tanh (c+d x)}{3 a d}-\frac {i f (e+f x)^2 \text {sech}(c+d x) \tanh (c+d x)}{2 a d^2}+\frac {(e+f x)^3 \text {sech}^2(c+d x) \tanh (c+d x)}{3 a d} \] Output:

2/3*(f*x+e)^3/a/d-I*f*(f*x+e)^2*arctan(exp(d*x+c))/a/d^2-I*f^2*(f*x+e)*sec 
h(d*x+c)/a/d^3-2*f*(f*x+e)^2*ln(1+exp(2*d*x+2*c))/a/d^2+f^3*ln(cosh(d*x+c) 
)/a/d^4-f^2*(f*x+e)*polylog(2,-I*exp(d*x+c))/a/d^3+f^2*(f*x+e)*polylog(2,I 
*exp(d*x+c))/a/d^3-2*f^2*(f*x+e)*polylog(2,-exp(2*d*x+2*c))/a/d^3+f^3*poly 
log(3,-I*exp(d*x+c))/a/d^4-f^3*polylog(3,I*exp(d*x+c))/a/d^4+f^3*polylog(3 
,-exp(2*d*x+2*c))/a/d^4-1/2*I*f*(f*x+e)^2*sech(d*x+c)*tanh(d*x+c)/a/d^2+1/ 
2*f*(f*x+e)^2*sech(d*x+c)^2/a/d^2+1/3*I*(f*x+e)^3*sech(d*x+c)^3/a/d-f^2*(f 
*x+e)*tanh(d*x+c)/a/d^3+2/3*(f*x+e)^3*tanh(d*x+c)/a/d+I*f^3*arctan(sinh(d* 
x+c))/a/d^4+1/3*(f*x+e)^3*sech(d*x+c)^2*tanh(d*x+c)/a/d
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1078\) vs. \(2(450)=900\).

Time = 8.14 (sec) , antiderivative size = 1078, normalized size of antiderivative = 2.40 \[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx =\text {Too large to display} \] Input:

Integrate[((e + f*x)^3*Sech[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
 

Output:

((-1/2*I)*f*((e + f*x)^3/f + (3*(1 - I*E^c)*(e + f*x)^2*Log[1 + I*E^(-c - 
d*x)])/d + ((6*I)*(I + E^c)*f*(d*(e + f*x)*PolyLog[2, (-I)*E^(-c - d*x)] + 
 f*PolyLog[3, (-I)*E^(-c - d*x)]))/d^3))/(a*d*(I + E^c)) + ((I/6)*f*(15*d^ 
2*e^2*x - 12*f^2*x - 3*(1 + I*E^c)*(5*d^2*e^2 - 4*f^2)*x + 15*d^2*e*f*x^2 
+ 5*d^2*f^2*x^3 + 30*d*e*(1 + I*E^c)*f*x*Log[1 - I*E^(-c - d*x)] + 15*d*(1 
 + I*E^c)*f^2*x^2*Log[1 - I*E^(-c - d*x)] + (3*(1 + I*E^c)*(5*d^2*e^2 - 4* 
f^2)*Log[I - E^(c + d*x)])/d - 30*e*(1 + I*E^c)*f*PolyLog[2, I*E^(-c - d*x 
)] - 30*(1 + I*E^c)*f^2*x*PolyLog[2, I*E^(-c - d*x)] - (30*(1 + I*E^c)*f^2 
*PolyLog[3, I*E^(-c - d*x)])/d))/(a*d^3*(-I + E^c)) + (e^3*Sinh[(d*x)/2] + 
 3*e^2*f*x*Sinh[(d*x)/2] + 3*e*f^2*x^2*Sinh[(d*x)/2] + f^3*x^3*Sinh[(d*x)/ 
2])/(2*a*d*(Cosh[c/2] - I*Sinh[c/2])*(Cosh[c/2 + (d*x)/2] - I*Sinh[c/2 + ( 
d*x)/2])) + (e^3*Sinh[(d*x)/2] + 3*e^2*f*x*Sinh[(d*x)/2] + 3*e*f^2*x^2*Sin 
h[(d*x)/2] + f^3*x^3*Sinh[(d*x)/2])/(3*a*d*(Cosh[c/2] + I*Sinh[c/2])*(Cosh 
[c/2 + (d*x)/2] + I*Sinh[c/2 + (d*x)/2])^3) + (I*d*e^3*Cosh[c/2] + 3*e^2*f 
*Cosh[c/2] + (3*I)*d*e^2*f*x*Cosh[c/2] + 6*e*f^2*x*Cosh[c/2] + (3*I)*d*e*f 
^2*x^2*Cosh[c/2] + 3*f^3*x^2*Cosh[c/2] + I*d*f^3*x^3*Cosh[c/2] + d*e^3*Sin 
h[c/2] + (3*I)*e^2*f*Sinh[c/2] + 3*d*e^2*f*x*Sinh[c/2] + (6*I)*e*f^2*x*Sin 
h[c/2] + 3*d*e*f^2*x^2*Sinh[c/2] + (3*I)*f^3*x^2*Sinh[c/2] + d*f^3*x^3*Sin 
h[c/2])/(6*a*d^2*(Cosh[c/2] + I*Sinh[c/2])*(Cosh[c/2 + (d*x)/2] + I*Sinh[c 
/2 + (d*x)/2])^2) + (5*d^2*e^3*Sinh[(d*x)/2] - 12*e*f^2*Sinh[(d*x)/2] +...
 

Rubi [A] (verified)

Time = 2.98 (sec) , antiderivative size = 443, normalized size of antiderivative = 0.98, number of steps used = 23, number of rules used = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.710, Rules used = {6105, 3042, 4674, 3042, 4672, 26, 3042, 26, 3956, 4201, 2620, 3011, 2720, 5974, 3042, 4674, 3042, 4257, 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 \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

\(\Big \downarrow \) 6105

\(\displaystyle \frac {\int (e+f x)^3 \text {sech}^4(c+d x)dx}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int (e+f x)^3 \csc \left (i c+i d x+\frac {\pi }{2}\right )^4dx}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 4674

\(\displaystyle \frac {-\frac {f^2 \int (e+f x) \text {sech}^2(c+d x)dx}{d^2}+\frac {2}{3} \int (e+f x)^3 \text {sech}^2(c+d x)dx+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {f^2 \int (e+f x) \csc \left (i c+i d x+\frac {\pi }{2}\right )^2dx}{d^2}+\frac {2}{3} \int (e+f x)^3 \csc \left (i c+i d x+\frac {\pi }{2}\right )^2dx+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 4672

\(\displaystyle \frac {-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {i f \int -i \tanh (c+d x)dx}{d}\right )}{d^2}+\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}-\frac {3 i f \int -i (e+f x)^2 \tanh (c+d x)dx}{d}\right )+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \int \tanh (c+d x)dx}{d}\right )}{d^2}+\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}-\frac {3 f \int (e+f x)^2 \tanh (c+d x)dx}{d}\right )+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \int -i \tan (i c+i d x)dx}{d}\right )}{d^2}+\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}-\frac {3 f \int -i (e+f x)^2 \tan (i c+i d x)dx}{d}\right )+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}+\frac {i f \int \tan (i c+i d x)dx}{d}\right )}{d^2}+\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \int (e+f x)^2 \tan (i c+i d x)dx}{d}\right )+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \int (e+f x)^2 \tan (i c+i d x)dx}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 4201

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \int \frac {e^{2 (c+d x)} (e+f x)^2}{1+e^{2 (c+d x)}}dx-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 2620

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \int (e+f x) \log \left (1+e^{2 (c+d x)}\right )dx}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )dx}{2 d}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \int (e+f x)^3 \text {sech}^3(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 5974

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (\frac {f \int (e+f x)^2 \text {sech}^3(c+d x)dx}{d}-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}\right )}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \int (e+f x)^2 \csc \left (i c+i d x+\frac {\pi }{2}\right )^3dx}{d}\right )}{a}\)

\(\Big \downarrow \) 4674

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (\frac {f \left (-\frac {f^2 \int \text {sech}(c+d x)dx}{d^2}+\frac {1}{2} \int (e+f x)^2 \text {sech}(c+d x)dx+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}\right )}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (-\frac {f^2 \int \csc \left (i c+i d x+\frac {\pi }{2}\right )dx}{d^2}+\frac {1}{2} \int (e+f x)^2 \csc \left (i c+i d x+\frac {\pi }{2}\right )dx+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (\frac {1}{2} \int (e+f x)^2 \csc \left (i c+i d x+\frac {\pi }{2}\right )dx-\frac {f^2 \arctan (\sinh (c+d x))}{d^3}+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

\(\Big \downarrow \) 4668

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (\frac {1}{2} \left (-\frac {2 i f \int (e+f x) \log \left (1-i e^{c+d x}\right )dx}{d}+\frac {2 i f \int (e+f x) \log \left (1+i e^{c+d x}\right )dx}{d}+\frac {2 (e+f x)^2 \arctan \left (e^{c+d x}\right )}{d}\right )-\frac {f^2 \arctan (\sinh (c+d x))}{d^3}+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (\frac {1}{2} \left (\frac {2 i f \left (\frac {f \int \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )dx}{d}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{d}\right )}{d}-\frac {2 i f \left (\frac {f \int \operatorname {PolyLog}\left (2,i e^{c+d x}\right )dx}{d}-\frac {(e+f x) \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{d}\right )}{d}+\frac {2 (e+f x)^2 \arctan \left (e^{c+d x}\right )}{d}\right )-\frac {f^2 \arctan (\sinh (c+d x))}{d^3}+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \int e^{-2 (c+d x)} \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )de^{2 (c+d x)}}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (\frac {1}{2} \left (\frac {2 i f \left (\frac {f \int e^{-c-d x} \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )de^{c+d x}}{d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{d}\right )}{d}-\frac {2 i f \left (\frac {f \int e^{-c-d x} \operatorname {PolyLog}\left (2,i e^{c+d x}\right )de^{c+d x}}{d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{d}\right )}{d}+\frac {2 (e+f x)^2 \arctan \left (e^{c+d x}\right )}{d}\right )-\frac {f^2 \arctan (\sinh (c+d x))}{d^3}+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {-\frac {f^2 \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )}{d^2}+\frac {2}{3} \left (\frac {(e+f x)^3 \tanh (c+d x)}{d}+\frac {3 i f \left (2 i \left (\frac {(e+f x)^2 \log \left (e^{2 (c+d x)}+1\right )}{2 d}-\frac {f \left (\frac {f \operatorname {PolyLog}\left (3,-e^{2 (c+d x)}\right )}{4 d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-e^{2 (c+d x)}\right )}{2 d}\right )}{d}\right )-\frac {i (e+f x)^3}{3 f}\right )}{d}\right )+\frac {f (e+f x)^2 \text {sech}^2(c+d x)}{2 d^2}+\frac {(e+f x)^3 \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}}{a}-\frac {i \left (-\frac {(e+f x)^3 \text {sech}^3(c+d x)}{3 d}+\frac {f \left (-\frac {f^2 \arctan (\sinh (c+d x))}{d^3}+\frac {1}{2} \left (\frac {2 (e+f x)^2 \arctan \left (e^{c+d x}\right )}{d}+\frac {2 i f \left (\frac {f \operatorname {PolyLog}\left (3,-i e^{c+d x}\right )}{d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{d}\right )}{d}-\frac {2 i f \left (\frac {f \operatorname {PolyLog}\left (3,i e^{c+d x}\right )}{d^2}-\frac {(e+f x) \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{d}\right )}{d}\right )+\frac {f (e+f x) \text {sech}(c+d x)}{d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{d}\right )}{a}\)

Input:

Int[((e + f*x)^3*Sech[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
 

Output:

((f*(e + f*x)^2*Sech[c + d*x]^2)/(2*d^2) + ((e + f*x)^3*Sech[c + d*x]^2*Ta 
nh[c + d*x])/(3*d) - (f^2*(-((f*Log[Cosh[c + d*x]])/d^2) + ((e + f*x)*Tanh 
[c + d*x])/d))/d^2 + (2*(((3*I)*f*(((-1/3*I)*(e + f*x)^3)/f + (2*I)*(((e + 
 f*x)^2*Log[1 + E^(2*(c + d*x))])/(2*d) - (f*(-1/2*((e + f*x)*PolyLog[2, - 
E^(2*(c + d*x))])/d + (f*PolyLog[3, -E^(2*(c + d*x))])/(4*d^2)))/d)))/d + 
((e + f*x)^3*Tanh[c + d*x])/d))/3)/a - (I*(-1/3*((e + f*x)^3*Sech[c + d*x] 
^3)/d + (f*(-((f^2*ArcTan[Sinh[c + d*x]])/d^3) + ((2*(e + f*x)^2*ArcTan[E^ 
(c + d*x)])/d + ((2*I)*f*(-(((e + f*x)*PolyLog[2, (-I)*E^(c + d*x)])/d) + 
(f*PolyLog[3, (-I)*E^(c + d*x)])/d^2))/d - ((2*I)*f*(-(((e + f*x)*PolyLog[ 
2, I*E^(c + d*x)])/d) + (f*PolyLog[3, I*E^(c + d*x)])/d^2))/d)/2 + (f*(e + 
 f*x)*Sech[c + d*x])/d^2 + ((e + f*x)^2*Sech[c + d*x]*Tanh[c + d*x])/(2*d) 
))/d))/a
 

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 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

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

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

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

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

rule 4201
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (Complex[0, fz_])*(f_.)*(x_)], x 
_Symbol] :> Simp[(-I)*((c + d*x)^(m + 1)/(d*(m + 1))), x] + Simp[2*I   Int[ 
(c + d*x)^m*(E^(2*((-I)*e + f*fz*x))/(1 + E^(2*((-I)*e + f*fz*x)))), x], x] 
 /; FreeQ[{c, d, e, f, fz}, x] && IGtQ[m, 0]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, 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]
 

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

rule 4674
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbo 
l] :> Simp[(-b^2)*(c + d*x)^m*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n 
- 1))), x] + (-Simp[b^2*d*m*(c + d*x)^(m - 1)*((b*Csc[e + f*x])^(n - 2)/(f^ 
2*(n - 1)*(n - 2))), x] + Simp[b^2*d^2*m*((m - 1)/(f^2*(n - 1)*(n - 2))) 
Int[(c + d*x)^(m - 2)*(b*Csc[e + f*x])^(n - 2), x], x] + Simp[b^2*((n - 2)/ 
(n - 1))   Int[(c + d*x)^m*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c 
, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2] && GtQ[m, 1]
 

rule 5974
Int[((c_.) + (d_.)*(x_))^(m_.)*Sech[(a_.) + (b_.)*(x_)]^(n_.)*Tanh[(a_.) + 
(b_.)*(x_)]^(p_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Sech[a + b*x]^n/(b*n)) 
, x] + Simp[d*(m/(b*n))   Int[(c + d*x)^(m - 1)*Sech[a + b*x]^n, x], x] /; 
FreeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]
 

rule 6105
Int[(((e_.) + (f_.)*(x_))^(m_.)*Sech[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_ 
.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a   Int[(e + f*x)^m*Sech[ 
c + d*x]^(n + 2), x], x] + Simp[1/b   Int[(e + f*x)^m*Sech[c + d*x]^(n + 1) 
*Tanh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && 
EqQ[a^2 + b^2, 0]
 

rule 7143
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]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1020 vs. \(2 (424 ) = 848\).

Time = 142.72 (sec) , antiderivative size = 1021, normalized size of antiderivative = 2.27

method result size
risch \(\frac {4 f^{3} x^{3}}{3 a d}+\frac {4 f^{2} e \,x^{2}}{a d}+\frac {4 f^{2} e \,c^{2}}{a \,d^{3}}-\frac {4 f^{3} c^{2} x}{a \,d^{3}}-\frac {2 f^{3} c^{2} \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a \,d^{4}}-\frac {3 f^{2} e \operatorname {polylog}\left (2, i {\mathrm e}^{d x +c}\right )}{a \,d^{3}}-\frac {8 f^{3} c^{3}}{3 a \,d^{4}}+\frac {f^{3} \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a \,d^{4}}-\frac {2 f^{3} \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{4}}+\frac {5 f^{3} \ln \left (1+i {\mathrm e}^{d x +c}\right ) c^{2}}{2 a \,d^{4}}+\frac {5 f^{3} \operatorname {polylog}\left (3, -i {\mathrm e}^{d x +c}\right )}{a \,d^{4}}+\frac {4 f^{2} e c \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a \,d^{3}}-\frac {8 f^{2} e c \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{3}}+\frac {8 f^{2} e c x}{a \,d^{2}}+\frac {4 f^{3} c^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{4}}-\frac {2 f \,e^{2} \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a \,d^{2}}+\frac {4 f \,e^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}-\frac {3 f^{2} e \ln \left (1-i {\mathrm e}^{d x +c}\right ) c}{a \,d^{3}}-\frac {5 f^{2} e \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{a \,d^{2}}-\frac {i f^{3} c^{2} \arctan \left ({\mathrm e}^{d x +c}\right )}{a \,d^{4}}-\frac {i f \,e^{2} \arctan \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}-\frac {5 f^{2} e \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{a \,d^{3}}+\frac {2 i f^{2} c e \arctan \left ({\mathrm e}^{d x +c}\right )}{a \,d^{3}}+\frac {3 f^{3} \operatorname {polylog}\left (3, i {\mathrm e}^{d x +c}\right )}{a \,d^{4}}+\frac {i \left (6 i f^{2} e +8 d^{2} f^{3} x^{3} {\mathrm e}^{d x +c}-3 d \,f^{3} x^{2} {\mathrm e}^{3 d x +3 c}+6 i e \,f^{2} {\mathrm e}^{2 d x +2 c}+24 d^{2} e \,f^{2} x^{2} {\mathrm e}^{d x +c}-6 d e \,f^{2} x \,{\mathrm e}^{3 d x +3 c}-12 i d^{2} e \,f^{2} x^{2}-12 i d^{2} e^{2} f x +24 d^{2} e^{2} f x \,{\mathrm e}^{d x +c}-3 d \,e^{2} f \,{\mathrm e}^{3 d x +3 c}-3 d \,f^{3} x^{2} {\mathrm e}^{d x +c}-6 f^{3} x \,{\mathrm e}^{3 d x +3 c}-4 i d^{2} x^{3} f^{3}+6 i f^{3} x +8 d^{2} e^{3} {\mathrm e}^{d x +c}-6 d e \,f^{2} x \,{\mathrm e}^{d x +c}-6 e \,f^{2} {\mathrm e}^{3 d x +3 c}-4 i d^{2} e^{3}-3 d \,e^{2} f \,{\mathrm e}^{d x +c}-6 f^{3} x \,{\mathrm e}^{d x +c}+6 i f^{3} x \,{\mathrm e}^{2 d x +2 c}-6 e \,f^{2} {\mathrm e}^{d x +c}\right )}{3 \left ({\mathrm e}^{d x +c}+i\right ) \left ({\mathrm e}^{d x +c}-i\right )^{3} d^{3} a}-\frac {3 f^{2} e \ln \left (1-i {\mathrm e}^{d x +c}\right ) x}{a \,d^{2}}-\frac {5 f^{2} e \operatorname {polylog}\left (2, -i {\mathrm e}^{d x +c}\right )}{a \,d^{3}}-\frac {3 f^{3} \ln \left (1-i {\mathrm e}^{d x +c}\right ) x^{2}}{2 a \,d^{2}}-\frac {3 f^{3} \operatorname {polylog}\left (2, i {\mathrm e}^{d x +c}\right ) x}{a \,d^{3}}-\frac {5 f^{3} \ln \left (1+i {\mathrm e}^{d x +c}\right ) x^{2}}{2 a \,d^{2}}-\frac {5 f^{3} \operatorname {polylog}\left (2, -i {\mathrm e}^{d x +c}\right ) x}{a \,d^{3}}+\frac {3 f^{3} c^{2} \ln \left (1-i {\mathrm e}^{d x +c}\right )}{2 a \,d^{4}}+\frac {2 i f^{3} \arctan \left ({\mathrm e}^{d x +c}\right )}{a \,d^{4}}\) \(1021\)

Input:

int((f*x+e)^3*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

3*f^3*polylog(3,I*exp(d*x+c))/a/d^4+4/3/a/d*f^3*x^3-3/a/d^3*f^2*e*polylog( 
2,I*exp(d*x+c))-5/a/d^3*f^2*e*polylog(2,-I*exp(d*x+c))+4/a/d*f^2*e*x^2+4/a 
/d^3*f^2*e*c^2-4/a/d^3*f^3*c^2*x-3/2/a/d^2*f^3*ln(1-I*exp(d*x+c))*x^2-3/a/ 
d^3*f^3*polylog(2,I*exp(d*x+c))*x-5/2/a/d^2*f^3*ln(1+I*exp(d*x+c))*x^2-5/a 
/d^3*f^3*polylog(2,-I*exp(d*x+c))*x+3/2/a/d^4*f^3*c^2*ln(1-I*exp(d*x+c))+5 
/2/a/d^4*f^3*c^2*ln(1+I*exp(d*x+c))-2/a/d^4*f^3*c^2*ln(1+exp(2*d*x+2*c))-8 
/3/a/d^4*f^3*c^3+1/a/d^4*f^3*ln(1+exp(2*d*x+2*c))-2/a/d^4*f^3*ln(exp(d*x+c 
))+1/3*I*(6*I*f^2*e+8*d^2*f^3*x^3*exp(d*x+c)-3*d*f^3*x^2*exp(3*d*x+3*c)+6* 
I*e*f^2*exp(2*d*x+2*c)+24*d^2*e*f^2*x^2*exp(d*x+c)-6*d*e*f^2*x*exp(3*d*x+3 
*c)-12*I*d^2*e*f^2*x^2-12*I*d^2*e^2*f*x+24*d^2*e^2*f*x*exp(d*x+c)-3*d*e^2* 
f*exp(3*d*x+3*c)-3*d*f^3*x^2*exp(d*x+c)-6*f^3*x*exp(3*d*x+3*c)-4*I*d^2*x^3 
*f^3+6*I*f^3*x+8*d^2*e^3*exp(d*x+c)-6*d*e*f^2*x*exp(d*x+c)-6*e*f^2*exp(3*d 
*x+3*c)-4*I*d^2*e^3-3*d*e^2*f*exp(d*x+c)-6*f^3*x*exp(d*x+c)+6*I*f^3*x*exp( 
2*d*x+2*c)-6*e*f^2*exp(d*x+c))/(exp(d*x+c)+I)/(exp(d*x+c)-I)^3/d^3/a+4/a/d 
^3*f^2*e*c*ln(1+exp(2*d*x+2*c))-8/a/d^3*f^2*e*c*ln(exp(d*x+c))+8/a/d^2*f^2 
*e*c*x-3/a/d^2*f^2*e*ln(1-I*exp(d*x+c))*x-3/a/d^3*f^2*e*ln(1-I*exp(d*x+c)) 
*c-5/a/d^2*f^2*e*ln(1+I*exp(d*x+c))*x-I/a/d^4*f^3*c^2*arctan(exp(d*x+c))-I 
/a/d^2*f*e^2*arctan(exp(d*x+c))+2*I/a/d^3*f^2*c*e*arctan(exp(d*x+c))+4/a/d 
^4*f^3*c^2*ln(exp(d*x+c))-2/a/d^2*f*e^2*ln(1+exp(2*d*x+2*c))+4/a/d^2*f*e^2 
*ln(exp(d*x+c))+2*I/a/d^4*f^3*arctan(exp(d*x+c))+5*f^3*polylog(3,-I*exp...
 

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. 1405 vs. \(2 (412) = 824\).

Time = 0.11 (sec) , antiderivative size = 1405, normalized size of antiderivative = 3.12 \[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\text {Too large to display} \] Input:

integrate((f*x+e)^3*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas 
")
 

Output:

1/6*(8*d^3*e^3 - 24*c*d^2*e^2*f + 12*(2*c^2 - 1)*d*e*f^2 - 4*(2*c^3 - 3*c) 
*f^3 + 18*(d*f^3*x + d*e*f^2 - (d*f^3*x + d*e*f^2)*e^(4*d*x + 4*c) - 2*(-I 
*d*f^3*x - I*d*e*f^2)*e^(3*d*x + 3*c) - 2*(-I*d*f^3*x - I*d*e*f^2)*e^(d*x 
+ c))*dilog(I*e^(d*x + c)) + 30*(d*f^3*x + d*e*f^2 - (d*f^3*x + d*e*f^2)*e 
^(4*d*x + 4*c) - 2*(-I*d*f^3*x - I*d*e*f^2)*e^(3*d*x + 3*c) - 2*(-I*d*f^3* 
x - I*d*e*f^2)*e^(d*x + c))*dilog(-I*e^(d*x + c)) + 4*(2*d^3*f^3*x^3 + 6*d 
^3*e*f^2*x^2 + 6*c*d^2*e^2*f - 6*c^2*d*e*f^2 + (2*c^3 - 3*c)*f^3 + 3*(2*d^ 
3*e^2*f - d*f^3)*x)*e^(4*d*x + 4*c) - 2*(8*I*d^3*f^3*x^3 + 3*(8*I*c + I)*d 
^2*e^2*f + 6*(-4*I*c^2 + I)*d*e*f^2 + 4*(2*I*c^3 - 3*I*c)*f^3 + 3*(8*I*d^3 
*e*f^2 + I*d^2*f^3)*x^2 + 6*(4*I*d^3*e^2*f + I*d^2*e*f^2 - I*d*f^3)*x)*e^( 
3*d*x + 3*c) - 12*(d*f^3*x + d*e*f^2)*e^(2*d*x + 2*c) - 2*(3*I*d^2*f^3*x^2 
 - 8*I*d^3*e^3 + 3*(8*I*c + I)*d^2*e^2*f + 6*(-4*I*c^2 + I)*d*e*f^2 + 4*(2 
*I*c^3 - 3*I*c)*f^3 + 6*(I*d^2*e*f^2 - I*d*f^3)*x)*e^(d*x + c) + 9*(d^2*e^ 
2*f - 2*c*d*e*f^2 + c^2*f^3 - (d^2*e^2*f - 2*c*d*e*f^2 + c^2*f^3)*e^(4*d*x 
 + 4*c) - 2*(-I*d^2*e^2*f + 2*I*c*d*e*f^2 - I*c^2*f^3)*e^(3*d*x + 3*c) - 2 
*(-I*d^2*e^2*f + 2*I*c*d*e*f^2 - I*c^2*f^3)*e^(d*x + c))*log(e^(d*x + c) + 
 I) + 3*(5*d^2*e^2*f - 10*c*d*e*f^2 + (5*c^2 - 4)*f^3 - (5*d^2*e^2*f - 10* 
c*d*e*f^2 + (5*c^2 - 4)*f^3)*e^(4*d*x + 4*c) - 2*(-5*I*d^2*e^2*f + 10*I*c* 
d*e*f^2 + (-5*I*c^2 + 4*I)*f^3)*e^(3*d*x + 3*c) - 2*(-5*I*d^2*e^2*f + 10*I 
*c*d*e*f^2 + (-5*I*c^2 + 4*I)*f^3)*e^(d*x + c))*log(e^(d*x + c) - I) + ...
 

Sympy [F]

\[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=- \frac {i \left (\int \frac {e^{3} \operatorname {sech}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f^{3} x^{3} \operatorname {sech}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {3 e f^{2} x^{2} \operatorname {sech}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {3 e^{2} f x \operatorname {sech}^{2}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \] Input:

integrate((f*x+e)**3*sech(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)
 

Output:

-I*(Integral(e**3*sech(c + d*x)**2/(sinh(c + d*x) - I), x) + Integral(f**3 
*x**3*sech(c + d*x)**2/(sinh(c + d*x) - I), x) + Integral(3*e*f**2*x**2*se 
ch(c + d*x)**2/(sinh(c + d*x) - I), x) + Integral(3*e**2*f*x*sech(c + d*x) 
**2/(sinh(c + d*x) - I), x))/a
 

Maxima [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 730, normalized size of antiderivative = 1.62 \[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx =\text {Too large to display} \] Input:

integrate((f*x+e)^3*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima 
")
 

Output:

1/2*e^2*f*(24*(4*I*d*x*e^(4*d*x + 4*c) + (8*d*x*e^(3*c) + e^(3*c))*e^(3*d* 
x) + e^(d*x + c))/(12*I*a*d^2*e^(4*d*x + 4*c) + 24*a*d^2*e^(3*d*x + 3*c) + 
 24*a*d^2*e^(d*x + c) - 12*I*a*d^2) - 3*log((e^(d*x + c) + I)*e^(-c))/(a*d 
^2) - 5*log(-I*(I*e^(d*x + c) + 1)*e^(-c))/(a*d^2)) + 4/3*e^3*(2*e^(-d*x - 
 c)/((2*a*e^(-d*x - c) + 2*a*e^(-3*d*x - 3*c) - I*a*e^(-4*d*x - 4*c) + I*a 
)*d) + I/((2*a*e^(-d*x - c) + 2*a*e^(-3*d*x - 3*c) - I*a*e^(-4*d*x - 4*c) 
+ I*a)*d)) + (4*I*d^2*f^3*x^3 + 12*I*d^2*e*f^2*x^2 - 6*I*f^3*x - 6*I*e*f^2 
 + 3*(d*f^3*x^2*e^(3*c) + 2*e*f^2*e^(3*c) + 2*(d*e*f^2 + f^3)*x*e^(3*c))*e 
^(3*d*x) - 6*(I*f^3*x*e^(2*c) + I*e*f^2*e^(2*c))*e^(2*d*x) - (8*d^2*f^3*x^ 
3*e^c - 6*e*f^2*e^c + 3*(8*d^2*e*f^2 - d*f^3)*x^2*e^c - 6*(d*e*f^2 + f^3)* 
x*e^c)*e^(d*x))/(3*I*a*d^3*e^(4*d*x + 4*c) + 6*a*d^3*e^(3*d*x + 3*c) + 6*a 
*d^3*e^(d*x + c) - 3*I*a*d^3) - 5*(d*x*log(I*e^(d*x + c) + 1) + dilog(-I*e 
^(d*x + c)))*e*f^2/(a*d^3) - 3*(d*x*log(-I*e^(d*x + c) + 1) + dilog(I*e^(d 
*x + c)))*e*f^2/(a*d^3) - 2*f^3*x/(a*d^3) - 5/2*(d^2*x^2*log(I*e^(d*x + c) 
 + 1) + 2*d*x*dilog(-I*e^(d*x + c)) - 2*polylog(3, -I*e^(d*x + c)))*f^3/(a 
*d^4) - 3/2*(d^2*x^2*log(-I*e^(d*x + c) + 1) + 2*d*x*dilog(I*e^(d*x + c)) 
- 2*polylog(3, I*e^(d*x + c)))*f^3/(a*d^4) + 2*f^3*log(e^(d*x + c) - I)/(a 
*d^4) + 4/3*(d^3*f^3*x^3 + 3*d^3*e*f^2*x^2)/(a*d^4)
 

Giac [F]

\[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )}^{3} \operatorname {sech}\left (d x + c\right )^{2}}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \] Input:

integrate((f*x+e)^3*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")
 

Output:

integrate((f*x + e)^3*sech(d*x + c)^2/(I*a*sinh(d*x + c) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int \frac {{\left (e+f\,x\right )}^3}{{\mathrm {cosh}\left (c+d\,x\right )}^2\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \] Input:

int((e + f*x)^3/(cosh(c + d*x)^2*(a + a*sinh(c + d*x)*1i)),x)
 

Output:

int((e + f*x)^3/(cosh(c + d*x)^2*(a + a*sinh(c + d*x)*1i)), x)
                                                                                    
                                                                                    
 

Reduce [F]

\[ \int \frac {(e+f x)^3 \text {sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\int \frac {\mathrm {sech}\left (d x +c \right )^{2}}{\sinh \left (d x +c \right ) i +1}d x \right ) e^{3}+\left (\int \frac {\mathrm {sech}\left (d x +c \right )^{2} x^{3}}{\sinh \left (d x +c \right ) i +1}d x \right ) f^{3}+3 \left (\int \frac {\mathrm {sech}\left (d x +c \right )^{2} x^{2}}{\sinh \left (d x +c \right ) i +1}d x \right ) e \,f^{2}+3 \left (\int \frac {\mathrm {sech}\left (d x +c \right )^{2} x}{\sinh \left (d x +c \right ) i +1}d x \right ) e^{2} f}{a} \] Input:

int((f*x+e)^3*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x)
 

Output:

(int(sech(c + d*x)**2/(sinh(c + d*x)*i + 1),x)*e**3 + int((sech(c + d*x)** 
2*x**3)/(sinh(c + d*x)*i + 1),x)*f**3 + 3*int((sech(c + d*x)**2*x**2)/(sin 
h(c + d*x)*i + 1),x)*e*f**2 + 3*int((sech(c + d*x)**2*x)/(sinh(c + d*x)*i 
+ 1),x)*e**2*f)/a