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

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

Optimal result

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

3/4*(f*x+e)^2*arctan(exp(d*x+c))/a/d-5/6*f^2*arctan(sinh(d*x+c))/a/d^3+3/4 
*I*f^2*polylog(3,-I*exp(d*x+c))/a/d^3+1/4*I*(f*x+e)^2*sech(d*x+c)^4/a/d-3/ 
4*I*f^2*polylog(3,I*exp(d*x+c))/a/d^3-3/4*I*f*(f*x+e)*polylog(2,-I*exp(d*x 
+c))/a/d^2-1/3*I*f*(f*x+e)*tanh(d*x+c)/a/d^2+3/4*f*(f*x+e)*sech(d*x+c)/a/d 
^2-1/6*I*f*(f*x+e)*sech(d*x+c)^2*tanh(d*x+c)/a/d^2+1/6*f*(f*x+e)*sech(d*x+ 
c)^3/a/d^2-1/12*I*f^2*sech(d*x+c)^2/a/d^3+1/3*I*f^2*ln(cosh(d*x+c))/a/d^3- 
1/12*f^2*sech(d*x+c)*tanh(d*x+c)/a/d^3+3/8*(f*x+e)^2*sech(d*x+c)*tanh(d*x+ 
c)/a/d+3/4*I*f*(f*x+e)*polylog(2,I*exp(d*x+c))/a/d^2+1/4*(f*x+e)^2*sech(d* 
x+c)^3*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. \(1363\) vs. \(2(423)=846\).

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

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

Output:

-1/8*(E^c*((3*d^2*e^2*x)/E^c - (4*f^2*x)/E^c - ((1 - I*E^c)*(3*d^2*e^2 - 4 
*f^2)*x)/E^c + (3*d^2*e*f*x^2)/E^c + (d^2*f^2*x^3)/E^c + (6*d*e*(1 - I*E^c 
)*f*x*Log[1 + I*E^(-c - d*x)])/E^c + (3*d*(1 - I*E^c)*f^2*x^2*Log[1 + I*E^ 
(-c - d*x)])/E^c + ((1 - I*E^c)*(3*d^2*e^2 - 4*f^2)*Log[I + E^(c + d*x)])/ 
(d*E^c) - (6*e*(1 - I*E^c)*f*PolyLog[2, (-I)*E^(-c - d*x)])/E^c - (6*(1 - 
I*E^c)*f^2*x*PolyLog[2, (-I)*E^(-c - d*x)])/E^c - (6*(1 - I*E^c)*f^2*PolyL 
og[3, (-I)*E^(-c - d*x)])/(d*E^c)))/(a*d^2*(I + E^c)) - (9*d^2*e^2*x - 28* 
f^2*x - (1 + I*E^c)*(9*d^2*e^2 - 28*f^2)*x + 9*d^2*e*f*x^2 + 3*d^2*f^2*x^3 
 + 18*d*e*(1 + I*E^c)*f*x*Log[1 - I*E^(-c - d*x)] + 9*d*(1 + I*E^c)*f^2*x^ 
2*Log[1 - I*E^(-c - d*x)] + ((1 + I*E^c)*(9*d^2*e^2 - 28*f^2)*Log[I - E^(c 
 + d*x)])/d - 18*e*(1 + I*E^c)*f*PolyLog[2, I*E^(-c - d*x)] - 18*(1 + I*E^ 
c)*f^2*x*PolyLog[2, I*E^(-c - d*x)] - (18*(1 + I*E^c)*f^2*PolyLog[3, I*E^( 
-c - d*x)])/d)/(24*a*d^2*(-I + E^c)) + ((3*e^2*x*Cosh[c])/(4*a) + (3*e^2*x 
*Sinh[c])/(4*a))/(1 + Cosh[2*c] + Sinh[2*c]) + ((3*e*f*x^2*Cosh[c])/(4*a) 
+ (3*e*f*x^2*Sinh[c])/(4*a))/(1 + Cosh[2*c] + Sinh[2*c]) + ((f^2*x^3*Cosh[ 
c])/(4*a) + (f^2*x^3*Sinh[c])/(4*a))/(1 + Cosh[2*c] + Sinh[2*c]) - ((I/8)* 
(e^2 + 2*e*f*x + f^2*x^2))/(a*d*(Cosh[c/2 + (d*x)/2] - I*Sinh[c/2 + (d*x)/ 
2])^2) + ((I/2)*(e*f*Sinh[(d*x)/2] + f^2*x*Sinh[(d*x)/2]))/(a*d^2*(Cosh[c/ 
2] - I*Sinh[c/2])*(Cosh[c/2 + (d*x)/2] - I*Sinh[c/2 + (d*x)/2])) + ((I/8)* 
(e^2 + 2*e*f*x + f^2*x^2))/(a*d*(Cosh[c/2 + (d*x)/2] + I*Sinh[c/2 + (d*...
 

Rubi [A] (verified)

Time = 3.03 (sec) , antiderivative size = 400, normalized size of antiderivative = 0.95, number of steps used = 24, number of rules used = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.742, Rules used = {6105, 3042, 4674, 3042, 4255, 3042, 4257, 4674, 3042, 4257, 4668, 3011, 2720, 5974, 3042, 4673, 3042, 4672, 26, 3042, 26, 3956, 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)^2 \text {sech}^3(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

\(\Big \downarrow \) 6105

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4674

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4255

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4257

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

\(\Big \downarrow \) 4674

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 4668

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \int (e+f x)^2 \text {sech}^4(c+d x) \tanh (c+d x)dx}{a}\)

\(\Big \downarrow \) 5974

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (\frac {f \int (e+f x) \text {sech}^4(c+d x)dx}{2 d}-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}\right )}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}+\frac {f \int (e+f x) \csc \left (i c+i d x+\frac {\pi }{2}\right )^4dx}{2 d}\right )}{a}\)

\(\Big \downarrow \) 4673

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (\frac {f \left (\frac {2}{3} \int (e+f x) \text {sech}^2(c+d x)dx+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}\right )}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}+\frac {f \left (\frac {2}{3} \int (e+f x) \csc \left (i c+i d x+\frac {\pi }{2}\right )^2dx+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}\right )}{a}\)

\(\Big \downarrow \) 4672

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}+\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {i f \int -i \tanh (c+d x)dx}{d}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}\right )}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \int \tanh (c+d x)dx}{d}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}\right )}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}+\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \int -i \tan (i c+i d x)dx}{d}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}\right )}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}+\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}+\frac {i f \int \tan (i c+i d x)dx}{d}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}\right )}{a}\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\frac {3}{4} \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 )-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}\right )}{a}\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {-\frac {f^2 \left (\frac {\arctan (\sinh (c+d x))}{2 d}+\frac {\tanh (c+d x) \text {sech}(c+d x)}{2 d}\right )}{6 d^2}+\frac {3}{4} \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 )+\frac {f (e+f x) \text {sech}^3(c+d x)}{6 d^2}+\frac {(e+f x)^2 \tanh (c+d x) \text {sech}^3(c+d x)}{4 d}}{a}-\frac {i \left (\frac {f \left (\frac {2}{3} \left (\frac {(e+f x) \tanh (c+d x)}{d}-\frac {f \log (\cosh (c+d x))}{d^2}\right )+\frac {f \text {sech}^2(c+d x)}{6 d^2}+\frac {(e+f x) \tanh (c+d x) \text {sech}^2(c+d x)}{3 d}\right )}{2 d}-\frac {(e+f x)^2 \text {sech}^4(c+d x)}{4 d}\right )}{a}\)

Input:

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

Output:

((f*(e + f*x)*Sech[c + d*x]^3)/(6*d^2) + ((e + f*x)^2*Sech[c + d*x]^3*Tanh 
[c + d*x])/(4*d) - (f^2*(ArcTan[Sinh[c + d*x]]/(2*d) + (Sech[c + d*x]*Tanh 
[c + d*x])/(2*d)))/(6*d^2) + (3*(-((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)))/4)/a - (I*(-1/4*((e + f*x)^2*Sech[c + d*x]^4)/d + 
(f*((f*Sech[c + d*x]^2)/(6*d^2) + ((e + f*x)*Sech[c + d*x]^2*Tanh[c + d*x] 
)/(3*d) + (2*(-((f*Log[Cosh[c + d*x]])/d^2) + ((e + f*x)*Tanh[c + d*x])/d) 
)/3))/(2*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 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 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

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 4673
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> 
 Simp[(-b^2)*(c + d*x)*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), 
 x] + (-Simp[b^2*d*((b*Csc[e + f*x])^(n - 2)/(f^2*(n - 1)*(n - 2))), x] + S 
imp[b^2*((n - 2)/(n - 1))   Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2), x], x]) 
 /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2]
 

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. 960 vs. \(2 (373 ) = 746\).

Time = 140.19 (sec) , antiderivative size = 961, normalized size of antiderivative = 2.27

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

Input:

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

Output:

1/12*(18*d^2*e*f*x*exp(d*x+c)-2*f^2*exp(d*x+c)+9*d^2*f^2*x^2*exp(5*d*x+5*c 
)-36*I*d^2*e*f*x*exp(4*d*x+4*c)+36*I*d^2*e*f*x*exp(2*d*x+2*c)+16*d*f^2*x*e 
xp(3*d*x+3*c)+16*d*e*f*exp(3*d*x+3*c)-36*I*d*f^2*x*exp(4*d*x+4*c)-36*I*d*e 
*f*exp(4*d*x+4*c)+18*d^2*e*f*x*exp(5*d*x+5*c)-18*I*d^2*f^2*x^2*exp(4*d*x+4 
*c)+12*d^2*e*f*x*exp(3*d*x+3*c)-44*I*d*f^2*x*exp(2*d*x+2*c)-44*I*d*e*f*exp 
(2*d*x+2*c)+18*I*d^2*f^2*x^2*exp(2*d*x+2*c)-4*f^2*exp(3*d*x+3*c)-8*I*d*e*f 
-8*I*d*f^2*x+9*d^2*x^2*f^2*exp(d*x+c)+18*d*e*f*exp(5*d*x+5*c)+18*d*f^2*x*e 
xp(5*d*x+5*c)+6*d^2*f^2*x^2*exp(3*d*x+3*c)-18*I*d^2*e^2*exp(4*d*x+4*c)+18* 
I*d^2*e^2*exp(2*d*x+2*c)-2*exp(d*x+c)*d*f^2*x-2*exp(d*x+c)*d*e*f+9*d^2*e^2 
*exp(d*x+c)+6*d^2*e^2*exp(3*d*x+3*c)-2*f^2*exp(5*d*x+5*c)+9*d^2*e^2*exp(5* 
d*x+5*c))/(exp(d*x+c)+I)^2/(exp(d*x+c)-I)^4/d^3/a-5/3/a/d^3*f^2*arctan(exp 
(d*x+c))-3/8*I/a/d*ln(1+I*exp(d*x+c))*f^2*x^2+3/8*I/a/d^3*ln(1+I*exp(d*x+c 
))*c^2*f^2-3/8*I/a/d^3*ln(1-I*exp(d*x+c))*c^2*f^2+3/4*I*f^2*polylog(3,-I*e 
xp(d*x+c))/a/d^3+1/3*I/a/d^3*f^2*ln(1+exp(2*d*x+2*c))-3/4*I*f^2*polylog(3, 
I*exp(d*x+c))/a/d^3-3/4*I/a/d^2*e*f*polylog(2,-I*exp(d*x+c))+3/4*I/a/d*ln( 
1-I*exp(d*x+c))*e*f*x-2/3*I/a/d^3*f^2*ln(exp(d*x+c))-3/2/a/d^2*c*e*f*arcta 
n(exp(d*x+c))+3/4*I/a/d^2*polylog(2,I*exp(d*x+c))*f^2*x-3/4*I/a/d*ln(1+I*e 
xp(d*x+c))*e*f*x+3/4*I/a/d^2*e*f*polylog(2,I*exp(d*x+c))+3/4/a/d*e^2*arcta 
n(exp(d*x+c))+3/4/a/d^3*c^2*f^2*arctan(exp(d*x+c))+3/8*I/a/d*ln(1-I*exp(d* 
x+c))*f^2*x^2-3/4*I/a/d^2*ln(1+I*exp(d*x+c))*c*e*f+3/4*I/a/d^2*ln(1-I*e...
 

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. 2066 vs. \(2 (358) = 716\).

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

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

Output:

1/24*(-16*I*d*e*f + 16*I*c*f^2 - 18*(I*d*f^2*x + I*d*e*f + (-I*d*f^2*x - I 
*d*e*f)*e^(6*d*x + 6*c) - 2*(d*f^2*x + d*e*f)*e^(5*d*x + 5*c) + (-I*d*f^2* 
x - I*d*e*f)*e^(4*d*x + 4*c) - 4*(d*f^2*x + d*e*f)*e^(3*d*x + 3*c) + (I*d* 
f^2*x + I*d*e*f)*e^(2*d*x + 2*c) - 2*(d*f^2*x + d*e*f)*e^(d*x + c))*dilog( 
I*e^(d*x + c)) - 18*(-I*d*f^2*x - I*d*e*f + (I*d*f^2*x + I*d*e*f)*e^(6*d*x 
 + 6*c) + 2*(d*f^2*x + d*e*f)*e^(5*d*x + 5*c) + (I*d*f^2*x + I*d*e*f)*e^(4 
*d*x + 4*c) + 4*(d*f^2*x + d*e*f)*e^(3*d*x + 3*c) + (-I*d*f^2*x - I*d*e*f) 
*e^(2*d*x + 2*c) + 2*(d*f^2*x + d*e*f)*e^(d*x + c))*dilog(-I*e^(d*x + c)) 
- 16*(I*d*f^2*x + I*c*f^2)*e^(6*d*x + 6*c) + 2*(9*d^2*f^2*x^2 + 9*d^2*e^2 
+ 18*d*e*f - 2*(8*c + 1)*f^2 + 2*(9*d^2*e*f + d*f^2)*x)*e^(5*d*x + 5*c) - 
4*(9*I*d^2*f^2*x^2 + 9*I*d^2*e^2 + 18*I*d*e*f + 4*I*c*f^2 + 2*(9*I*d^2*e*f 
 + 11*I*d*f^2)*x)*e^(4*d*x + 4*c) + 4*(3*d^2*f^2*x^2 + 3*d^2*e^2 + 8*d*e*f 
 - 2*(8*c + 1)*f^2 + 2*(3*d^2*e*f - 4*d*f^2)*x)*e^(3*d*x + 3*c) - 4*(-9*I* 
d^2*f^2*x^2 - 9*I*d^2*e^2 + 22*I*d*e*f - 4*I*c*f^2 + 18*(-I*d^2*e*f + I*d* 
f^2)*x)*e^(2*d*x + 2*c) + 2*(9*d^2*f^2*x^2 + 9*d^2*e^2 - 2*d*e*f - 2*(8*c 
+ 1)*f^2 + 18*(d^2*e*f - d*f^2)*x)*e^(d*x + c) - 3*(3*I*d^2*e^2 - 6*I*c*d* 
e*f + (3*I*c^2 - 4*I)*f^2 + (-3*I*d^2*e^2 + 6*I*c*d*e*f + (-3*I*c^2 + 4*I) 
*f^2)*e^(6*d*x + 6*c) - 2*(3*d^2*e^2 - 6*c*d*e*f + (3*c^2 - 4)*f^2)*e^(5*d 
*x + 5*c) + (-3*I*d^2*e^2 + 6*I*c*d*e*f + (-3*I*c^2 + 4*I)*f^2)*e^(4*d*x + 
 4*c) - 4*(3*d^2*e^2 - 6*c*d*e*f + (3*c^2 - 4)*f^2)*e^(3*d*x + 3*c) + (...
 

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {(e+f x)^2 \text {sech}^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\text {Exception raised: RuntimeError} \] Input:

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

Output:

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un 
defined.
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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