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

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

Optimal result

Integrand size = 29, antiderivative size = 163 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {(e+f x) \coth (c+d x)}{a d}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {f \log (\sinh (c+d x))}{a d^2}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \] Output:

2*I*(f*x+e)*arctanh(exp(d*x+c))/a/d-(f*x+e)*coth(d*x+c)/a/d+2*f*ln(cosh(1/ 
2*c+1/4*I*Pi+1/2*d*x))/a/d^2+f*ln(sinh(d*x+c))/a/d^2+I*f*polylog(2,-exp(d* 
x+c))/a/d^2-I*f*polylog(2,exp(d*x+c))/a/d^2-(f*x+e)*tanh(1/2*c+1/4*I*Pi+1/ 
2*d*x)/a/d
 

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(366\) vs. \(2(163)=326\).

Time = 3.10 (sec) , antiderivative size = 366, normalized size of antiderivative = 2.25 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left (-d (e+f x) \cosh \left (\frac {1}{2} (c+d x)\right ) \left (i+\coth \left (\frac {1}{2} (c+d x)\right )\right )+4 i f \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+2 f \log (\cosh (c+d x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+2 \left (f (c+d x)+(f-i d (e+f x)) \log \left (1-e^{-c-d x}\right )+(f+i d (e+f x)) \log \left (1+e^{-c-d x}\right )-i f \operatorname {PolyLog}\left (2,-e^{-c-d x}\right )+i f \operatorname {PolyLog}\left (2,e^{-c-d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-4 d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right )+2 f (c+d x) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )-i d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right ) \left (-i+\tanh \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d^2 (a+i a \sinh (c+d x))} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 1.23 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.07, number of steps used = 24, number of rules used = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.793, Rules used = {6109, 3042, 25, 4672, 26, 3042, 26, 3956, 6109, 3042, 26, 3799, 25, 25, 3042, 4670, 2715, 2838, 4672, 26, 3042, 26, 3956}

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) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

\(\Big \downarrow \) 6109

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\int (e+f x) \csc (i c+i d x)^2dx}{a}-i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx\)

\(\Big \downarrow \) 4672

\(\displaystyle -\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {i f \int -i \coth (c+d x)dx}{d}}{a}-i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx\)

\(\Big \downarrow \) 26

\(\displaystyle -\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \int \coth (c+d x)dx}{d}}{a}-i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \int -i \tan \left (i c+i d x+\frac {\pi }{2}\right )dx}{d}}{a}-i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx\)

\(\Big \downarrow \) 26

\(\displaystyle -\frac {\frac {(e+f x) \coth (c+d x)}{d}+\frac {i f \int \tan \left (\frac {1}{2} (2 i c+\pi )+i d x\right )dx}{d}}{a}-i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx\)

\(\Big \downarrow \) 3956

\(\displaystyle -i \int \frac {(e+f x) \text {csch}(c+d x)}{i \sinh (c+d x) a+a}dx-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 6109

\(\displaystyle -i \left (\frac {\int (e+f x) \text {csch}(c+d x)dx}{a}-i \int \frac {e+f x}{i \sinh (c+d x) a+a}dx\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle -i \left (\frac {\int i (e+f x) \csc (i c+i d x)dx}{a}-i \int \frac {e+f x}{\sin (i c+i d x) a+a}dx\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (\frac {i \int (e+f x) \csc (i c+i d x)dx}{a}-i \int \frac {e+f x}{\sin (i c+i d x) a+a}dx\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 3799

\(\displaystyle -i \left (\frac {i \int (e+f x) \csc (i c+i d x)dx}{a}-\frac {i \int -\left ((e+f x) \text {csch}^2\left (\frac {c}{2}+\frac {d x}{2}-\frac {i \pi }{4}\right )\right )dx}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

\(\displaystyle -i \left (\frac {i \int (e+f x) \csc (i c+i d x)dx}{a}-\frac {i \int (e+f x) \csc \left (\frac {i c}{2}+\frac {i d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 4670

\(\displaystyle -i \left (\frac {i \left (\frac {i f \int \log \left (1-e^{c+d x}\right )dx}{d}-\frac {i f \int \log \left (1+e^{c+d x}\right )dx}{d}+\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}\right )}{a}-\frac {i \int (e+f x) \csc \left (\frac {i c}{2}+\frac {i d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 2715

\(\displaystyle -i \left (\frac {i \left (\frac {i f \int e^{-c-d x} \log \left (1-e^{c+d x}\right )de^{c+d x}}{d^2}-\frac {i f \int e^{-c-d x} \log \left (1+e^{c+d x}\right )de^{c+d x}}{d^2}+\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}\right )}{a}-\frac {i \int (e+f x) \csc \left (\frac {i c}{2}+\frac {i d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 2838

\(\displaystyle -i \left (\frac {i \left (\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{d^2}\right )}{a}-\frac {i \int (e+f x) \csc \left (\frac {i c}{2}+\frac {i d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 4672

\(\displaystyle -i \left (\frac {i \left (\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{d^2}\right )}{a}-\frac {i \left (\frac {2 (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{d}-\frac {2 i f \int -i \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )dx}{d}\right )}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (\frac {i \left (\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{d^2}\right )}{a}-\frac {i \left (\frac {2 (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{d}-\frac {2 f \int \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )dx}{d}\right )}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle -i \left (\frac {i \left (\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{d^2}\right )}{a}-\frac {i \left (\frac {2 (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{d}-\frac {2 f \int -i \tan \left (\frac {i c}{2}+\frac {i d x}{2}-\frac {\pi }{4}\right )dx}{d}\right )}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle -i \left (\frac {i \left (\frac {2 i (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{d^2}\right )}{a}-\frac {i \left (\frac {2 i f \int \tan \left (\frac {i c}{2}+\frac {i d x}{2}-\frac {\pi }{4}\right )dx}{d}+\frac {2 (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{d}\right )}{2 a}\right )-\frac {\frac {(e+f x) \coth (c+d x)}{d}-\frac {f \log (-i \sinh (c+d x))}{d^2}}{a}\)

\(\Big \downarrow \) 3956

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

Input:

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

Output:

-((((e + f*x)*Coth[c + d*x])/d - (f*Log[(-I)*Sinh[c + d*x]])/d^2)/a) - I*( 
(I*(((2*I)*(e + f*x)*ArcTanh[E^(c + d*x)])/d + (I*f*PolyLog[2, -E^(c + d*x 
)])/d^2 - (I*f*PolyLog[2, E^(c + d*x)])/d^2))/a - ((I/2)*((-4*f*Log[Cosh[c 
/2 + (I/4)*Pi + (d*x)/2]])/d^2 + (2*(e + f*x)*Tanh[c/2 + (I/4)*Pi + (d*x)/ 
2])/d))/a)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 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 3799
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Simp[(2*a)^n   Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) 
+ f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 
2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
 

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

rule 4670
Int[csc[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x 
_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^((-I)*e + f*fz*x)]/(f*fz*I)), x] 
 + (-Simp[d*(m/(f*fz*I))   Int[(c + d*x)^(m - 1)*Log[1 - E^((-I)*e + f*fz*x 
)], x], x] + Simp[d*(m/(f*fz*I))   Int[(c + d*x)^(m - 1)*Log[1 + E^((-I)*e 
+ f*fz*x)], x], x]) /; FreeQ[{c, d, e, f, fz}, x] && 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 6109
Int[(Csch[(c_.) + (d_.)*(x_)]^(n_.)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_ 
.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a   Int[(e + f*x)^m*Csch[ 
c + d*x]^n, x], x] - Simp[b/a   Int[(e + f*x)^m*(Csch[c + d*x]^(n - 1)/(a + 
 b*Sinh[c + d*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && 
 IGtQ[n, 0]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (143 ) = 286\).

Time = 0.72 (sec) , antiderivative size = 334, normalized size of antiderivative = 2.05

method result size
risch \(-\frac {2 i \left (f x \,{\mathrm e}^{2 d x +2 c}+e \,{\mathrm e}^{2 d x +2 c}-2 f x -i {\mathrm e}^{d x +c} f x -2 e -i {\mathrm e}^{d x +c} e \right )}{\left ({\mathrm e}^{2 d x +2 c}-1\right ) \left ({\mathrm e}^{d x +c}-i\right ) d a}+\frac {i f \ln \left ({\mathrm e}^{d x +c}+1\right ) x}{a d}-\frac {i f \ln \left (1-{\mathrm e}^{d x +c}\right ) x}{a d}+\frac {i e \ln \left ({\mathrm e}^{d x +c}+1\right )}{a d}-\frac {i e \ln \left ({\mathrm e}^{d x +c}-1\right )}{a d}-\frac {i f \ln \left (1-{\mathrm e}^{d x +c}\right ) c}{a \,d^{2}}+\frac {i c f \ln \left ({\mathrm e}^{d x +c}-1\right )}{a \,d^{2}}+\frac {f \ln \left (1+{\mathrm e}^{2 d x +2 c}\right )}{a \,d^{2}}+\frac {f \ln \left ({\mathrm e}^{d x +c}+1\right )}{a \,d^{2}}+\frac {f \ln \left ({\mathrm e}^{d x +c}-1\right )}{a \,d^{2}}-\frac {4 f \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {2 i f \arctan \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {i f \operatorname {polylog}\left (2, -{\mathrm e}^{d x +c}\right )}{a \,d^{2}}-\frac {i f \operatorname {polylog}\left (2, {\mathrm e}^{d x +c}\right )}{a \,d^{2}}\) \(334\)

Input:

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

Output:

-2*I*(f*x*exp(2*d*x+2*c)+e*exp(2*d*x+2*c)-2*f*x-I*exp(d*x+c)*f*x-2*e-I*exp 
(d*x+c)*e)/(exp(2*d*x+2*c)-1)/(exp(d*x+c)-I)/d/a+I/a/d*f*ln(exp(d*x+c)+1)* 
x-I/a/d*f*ln(1-exp(d*x+c))*x+I/a/d*e*ln(exp(d*x+c)+1)-I/a/d*e*ln(exp(d*x+c 
)-1)-I/a/d^2*f*ln(1-exp(d*x+c))*c+I/a/d^2*c*f*ln(exp(d*x+c)-1)+1/a/d^2*f*l 
n(1+exp(2*d*x+2*c))+1/a/d^2*f*ln(exp(d*x+c)+1)+1/a/d^2*f*ln(exp(d*x+c)-1)- 
4/a/d^2*f*ln(exp(d*x+c))+2*I/a/d^2*f*arctan(exp(d*x+c))+I*f*polylog(2,-exp 
(d*x+c))/a/d^2-I*f*polylog(2,exp(d*x+c))/a/d^2
 

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. 506 vs. \(2 (139) = 278\).

Time = 0.13 (sec) , antiderivative size = 506, normalized size of antiderivative = 3.10 \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {4 i \, d e - 2 i \, c f + {\left (i \, f e^{\left (3 \, d x + 3 \, c\right )} + f e^{\left (2 \, d x + 2 \, c\right )} - i \, f e^{\left (d x + c\right )} - f\right )} {\rm Li}_2\left (-e^{\left (d x + c\right )}\right ) + {\left (-i \, f e^{\left (3 \, d x + 3 \, c\right )} - f e^{\left (2 \, d x + 2 \, c\right )} + i \, f e^{\left (d x + c\right )} + f\right )} {\rm Li}_2\left (e^{\left (d x + c\right )}\right ) - 2 \, {\left (2 \, d f x + c f\right )} e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left (-i \, d f x + i \, d e - i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d f x - d e + c f\right )} e^{\left (d x + c\right )} - {\left (d f x + d e - {\left (i \, d f x + i \, d e + f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d f x + d e - i \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} - {\left (-i \, d f x - i \, d e - f\right )} e^{\left (d x + c\right )} - i \, f\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) + 2 \, {\left (f e^{\left (3 \, d x + 3 \, c\right )} - i \, f e^{\left (2 \, d x + 2 \, c\right )} - f e^{\left (d x + c\right )} + i \, f\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + {\left (d e - {\left (c - i\right )} f + {\left (-i \, d e + {\left (i \, c + 1\right )} f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d e - {\left (c - i\right )} f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (i \, d e + {\left (-i \, c - 1\right )} f\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - 1\right ) + {\left (d f x + c f + {\left (-i \, d f x - i \, c f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d f x + c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (i \, d f x + i \, c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-e^{\left (d x + c\right )} + 1\right )}{a d^{2} e^{\left (3 \, d x + 3 \, c\right )} - i \, a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - a d^{2} e^{\left (d x + c\right )} + i \, a d^{2}} \] Input:

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

Output:

(4*I*d*e - 2*I*c*f + (I*f*e^(3*d*x + 3*c) + f*e^(2*d*x + 2*c) - I*f*e^(d*x 
 + c) - f)*dilog(-e^(d*x + c)) + (-I*f*e^(3*d*x + 3*c) - f*e^(2*d*x + 2*c) 
 + I*f*e^(d*x + c) + f)*dilog(e^(d*x + c)) - 2*(2*d*f*x + c*f)*e^(3*d*x + 
3*c) - 2*(-I*d*f*x + I*d*e - I*c*f)*e^(2*d*x + 2*c) + 2*(d*f*x - d*e + c*f 
)*e^(d*x + c) - (d*f*x + d*e - (I*d*f*x + I*d*e + f)*e^(3*d*x + 3*c) - (d* 
f*x + d*e - I*f)*e^(2*d*x + 2*c) - (-I*d*f*x - I*d*e - f)*e^(d*x + c) - I* 
f)*log(e^(d*x + c) + 1) + 2*(f*e^(3*d*x + 3*c) - I*f*e^(2*d*x + 2*c) - f*e 
^(d*x + c) + I*f)*log(e^(d*x + c) - I) + (d*e - (c - I)*f + (-I*d*e + (I*c 
 + 1)*f)*e^(3*d*x + 3*c) - (d*e - (c - I)*f)*e^(2*d*x + 2*c) + (I*d*e + (- 
I*c - 1)*f)*e^(d*x + c))*log(e^(d*x + c) - 1) + (d*f*x + c*f + (-I*d*f*x - 
 I*c*f)*e^(3*d*x + 3*c) - (d*f*x + c*f)*e^(2*d*x + 2*c) + (I*d*f*x + I*c*f 
)*e^(d*x + c))*log(-e^(d*x + c) + 1))/(a*d^2*e^(3*d*x + 3*c) - I*a*d^2*e^( 
2*d*x + 2*c) - a*d^2*e^(d*x + c) + I*a*d^2)
 

Sympy [F]

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

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

Output:

-I*(Integral(e*csch(c + d*x)**2/(sinh(c + d*x) - I), x) + Integral(f*x*csc 
h(c + d*x)**2/(sinh(c + d*x) - I), x))/a
 

Maxima [F]

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

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

Output:

-(4*I*d*integrate(1/4*x/(a*d*e^(d*x + c) + a*d), x) + 4*I*d*integrate(1/4* 
x/(a*d*e^(d*x + c) - a*d), x) + 2*(x*e^(3*d*x + 3*c) - I*x)/(a*d*e^(3*d*x 
+ 3*c) - I*a*d*e^(2*d*x + 2*c) - a*d*e^(d*x + c) + I*a*d) + 2*(d*x + c)/(a 
*d^2) - 2*log((e^(d*x + c) - I)*e^(-c))/(a*d^2) - log(e^(d*x + c) + 1)/(a* 
d^2) - log(e^(d*x + c) - 1)/(a*d^2))*f - e*(2*(e^(-d*x - c) - I*e^(-2*d*x 
- 2*c) + 2*I)/((a*e^(-d*x - c) - I*a*e^(-2*d*x - 2*c) - a*e^(-3*d*x - 3*c) 
 + I*a)*d) - I*log(e^(-d*x - c) + 1)/(a*d) + I*log(e^(-d*x - c) - 1)/(a*d) 
)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {(e+f x) \text {csch}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int \frac {e+f\,x}{{\mathrm {sinh}\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)/(sinh(c + d*x)^2*(a + a*sinh(c + d*x)*1i)),x)
 

Output:

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

Reduce [F]

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

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

Output:

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