\(\int (e x)^{-1+2 n} (a+b \text {csch}(c+d x^n))^2 \, dx\) [83]

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

Optimal result

Integrand size = 24, antiderivative size = 198 \[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\frac {a^2 (e x)^{2 n}}{2 e n}-\frac {4 a b x^{-n} (e x)^{2 n} \text {arctanh}\left (e^{c+d x^n}\right )}{d e n}-\frac {b^2 x^{-n} (e x)^{2 n} \coth \left (c+d x^n\right )}{d e n}+\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\sinh \left (c+d x^n\right )\right )}{d^2 e n}-\frac {2 a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-e^{c+d x^n}\right )}{d^2 e n}+\frac {2 a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,e^{c+d x^n}\right )}{d^2 e n} \] Output:

1/2*a^2*(e*x)^(2*n)/e/n-4*a*b*(e*x)^(2*n)*arctanh(exp(c+d*x^n))/d/e/n/(x^n 
)-b^2*(e*x)^(2*n)*coth(c+d*x^n)/d/e/n/(x^n)+b^2*(e*x)^(2*n)*ln(sinh(c+d*x^ 
n))/d^2/e/n/(x^(2*n))-2*a*b*(e*x)^(2*n)*polylog(2,-exp(c+d*x^n))/d^2/e/n/( 
x^(2*n))+2*a*b*(e*x)^(2*n)*polylog(2,exp(c+d*x^n))/d^2/e/n/(x^(2*n))
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(488\) vs. \(2(198)=396\).

Time = 2.52 (sec) , antiderivative size = 488, normalized size of antiderivative = 2.46 \[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\frac {x^{-2 n} (e x)^{2 n} \left (-4 b^2 d x^n-a^2 d^2 x^{2 n}+a^2 d^2 e^{2 c} x^{2 n}-2 b^2 \log \left (1-e^{-c-d x^n}\right )+2 b^2 e^{2 c} \log \left (1-e^{-c-d x^n}\right )-4 a b d x^n \log \left (1-e^{-c-d x^n}\right )+4 a b d e^{2 c} x^n \log \left (1-e^{-c-d x^n}\right )-2 b^2 \log \left (1+e^{-c-d x^n}\right )+2 b^2 e^{2 c} \log \left (1+e^{-c-d x^n}\right )+4 a b d x^n \log \left (1+e^{-c-d x^n}\right )-4 a b d e^{2 c} x^n \log \left (1+e^{-c-d x^n}\right )+4 a b \left (-1+e^{2 c}\right ) \operatorname {PolyLog}\left (2,-e^{-c-d x^n}\right )-4 a b \left (-1+e^{2 c}\right ) \operatorname {PolyLog}\left (2,e^{-c-d x^n}\right )-b^2 d x^n \text {csch}\left (\frac {c}{2}\right ) \text {csch}\left (\frac {1}{2} \left (c+d x^n\right )\right ) \sinh \left (\frac {d x^n}{2}\right )+b^2 d e^{2 c} x^n \text {csch}\left (\frac {c}{2}\right ) \text {csch}\left (\frac {1}{2} \left (c+d x^n\right )\right ) \sinh \left (\frac {d x^n}{2}\right )+b^2 d x^n \text {sech}\left (\frac {c}{2}\right ) \text {sech}\left (\frac {1}{2} \left (c+d x^n\right )\right ) \sinh \left (\frac {d x^n}{2}\right )-4 b^2 d e^{2 c} x^n \text {csch}(c) \text {csch}\left (c+d x^n\right ) \sinh \left (\frac {c}{2}\right ) \sinh \left (\frac {d x^n}{2}\right ) \sinh \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{2 d^2 e \left (-1+e^{2 c}\right ) n} \] Input:

Integrate[(e*x)^(-1 + 2*n)*(a + b*Csch[c + d*x^n])^2,x]
 

Output:

((e*x)^(2*n)*(-4*b^2*d*x^n - a^2*d^2*x^(2*n) + a^2*d^2*E^(2*c)*x^(2*n) - 2 
*b^2*Log[1 - E^(-c - d*x^n)] + 2*b^2*E^(2*c)*Log[1 - E^(-c - d*x^n)] - 4*a 
*b*d*x^n*Log[1 - E^(-c - d*x^n)] + 4*a*b*d*E^(2*c)*x^n*Log[1 - E^(-c - d*x 
^n)] - 2*b^2*Log[1 + E^(-c - d*x^n)] + 2*b^2*E^(2*c)*Log[1 + E^(-c - d*x^n 
)] + 4*a*b*d*x^n*Log[1 + E^(-c - d*x^n)] - 4*a*b*d*E^(2*c)*x^n*Log[1 + E^( 
-c - d*x^n)] + 4*a*b*(-1 + E^(2*c))*PolyLog[2, -E^(-c - d*x^n)] - 4*a*b*(- 
1 + E^(2*c))*PolyLog[2, E^(-c - d*x^n)] - b^2*d*x^n*Csch[c/2]*Csch[(c + d* 
x^n)/2]*Sinh[(d*x^n)/2] + b^2*d*E^(2*c)*x^n*Csch[c/2]*Csch[(c + d*x^n)/2]* 
Sinh[(d*x^n)/2] + b^2*d*x^n*Sech[c/2]*Sech[(c + d*x^n)/2]*Sinh[(d*x^n)/2] 
- 4*b^2*d*E^(2*c)*x^n*Csch[c]*Csch[c + d*x^n]*Sinh[c/2]*Sinh[(d*x^n)/2]*Si 
nh[(c + d*x^n)/2]))/(2*d^2*e*(-1 + E^(2*c))*n*x^(2*n))
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.63, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {5964, 5960, 3042, 4678, 2009}

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 (e x)^{2 n-1} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 5964

\(\displaystyle \frac {x^{-2 n} (e x)^{2 n} \int x^{2 n-1} \left (a+b \text {csch}\left (d x^n+c\right )\right )^2dx}{e}\)

\(\Big \downarrow \) 5960

\(\displaystyle \frac {x^{-2 n} (e x)^{2 n} \int x^n \left (a+b \text {csch}\left (d x^n+c\right )\right )^2dx^n}{e n}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4678

\(\displaystyle \frac {x^{-2 n} (e x)^{2 n} \int \left (a^2 x^n+b^2 \text {csch}^2\left (d x^n+c\right ) x^n+2 a b \text {csch}\left (d x^n+c\right ) x^n\right )dx^n}{e n}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {x^{-2 n} (e x)^{2 n} \left (\frac {1}{2} a^2 x^{2 n}-\frac {4 a b x^n \text {arctanh}\left (e^{c+d x^n}\right )}{d}-\frac {2 a b \operatorname {PolyLog}\left (2,-e^{d x^n+c}\right )}{d^2}+\frac {2 a b \operatorname {PolyLog}\left (2,e^{d x^n+c}\right )}{d^2}+\frac {b^2 \log \left (\sinh \left (c+d x^n\right )\right )}{d^2}-\frac {b^2 x^n \coth \left (c+d x^n\right )}{d}\right )}{e n}\)

Input:

Int[(e*x)^(-1 + 2*n)*(a + b*Csch[c + d*x^n])^2,x]
 

Output:

((e*x)^(2*n)*((a^2*x^(2*n))/2 - (4*a*b*x^n*ArcTanh[E^(c + d*x^n)])/d - (b^ 
2*x^n*Coth[c + d*x^n])/d + (b^2*Log[Sinh[c + d*x^n]])/d^2 - (2*a*b*PolyLog 
[2, -E^(c + d*x^n)])/d^2 + (2*a*b*PolyLog[2, E^(c + d*x^n)])/d^2))/(e*n*x^ 
(2*n))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4678
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 

rule 5960
Int[((a_.) + Csch[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbo 
l] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Csch[c + d*x] 
)^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m 
 + 1)/n], 0] && IntegerQ[p]
 

rule 5964
Int[((a_.) + Csch[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), 
x_Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m])   Int[x^m* 
(a + b*Csch[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
 
Maple [F]

\[\int \left (e x \right )^{-1+2 n} {\left (a +b \,\operatorname {csch}\left (c +d \,x^{n}\right )\right )}^{2}d x\]

Input:

int((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x)
 

Output:

int((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2678 vs. \(2 (197) = 394\).

Time = 0.15 (sec) , antiderivative size = 2678, normalized size of antiderivative = 13.53 \[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\text {Too large to display} \] Input:

integrate((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x, algorithm="fricas")
 

Output:

-1/2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 - 4*b^2*c*cosh((2*n 
- 1)*log(e)) - (a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 - 4*b^2*d* 
cosh((2*n - 1)*log(e))*cosh(n*log(x)) - 4*b^2*c*cosh((2*n - 1)*log(e)) + ( 
a^2*d^2*cosh((2*n - 1)*log(e)) + a^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*lo 
g(x))^2 + (a^2*d^2*cosh(n*log(x))^2 - 4*b^2*d*cosh(n*log(x)) - 4*b^2*c)*si 
nh((2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) - 
2*b^2*d*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh(n*log(x)) - 2*b^2*d)*sinh(( 
2*n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) 
 + c)^2 - 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 - 4*b^2*d*cos 
h((2*n - 1)*log(e))*cosh(n*log(x)) - 4*b^2*c*cosh((2*n - 1)*log(e)) + (a^2 
*d^2*cosh((2*n - 1)*log(e)) + a^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x 
))^2 + (a^2*d^2*cosh(n*log(x))^2 - 4*b^2*d*cosh(n*log(x)) - 4*b^2*c)*sinh( 
(2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) - 2*b 
^2*d*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh(n*log(x)) - 2*b^2*d)*sinh((2*n 
 - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + 
c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - (a^2*d^2*cosh((2*n - 1) 
*log(e))*cosh(n*log(x))^2 - 4*b^2*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) 
- 4*b^2*c*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh((2*n - 1)*log(e)) + a^2*d 
^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 + (a^2*d^2*cosh(n*log(x))^2 - 
4*b^2*d*cosh(n*log(x)) - 4*b^2*c)*sinh((2*n - 1)*log(e)) + 2*(a^2*d^2*c...
 

Sympy [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\int \left (e x\right )^{2 n - 1} \left (a + b \operatorname {csch}{\left (c + d x^{n} \right )}\right )^{2}\, dx \] Input:

integrate((e*x)**(-1+2*n)*(a+b*csch(c+d*x**n))**2,x)
 

Output:

Integral((e*x)**(2*n - 1)*(a + b*csch(c + d*x**n))**2, x)
 

Maxima [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {csch}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{2 \, n - 1} \,d x } \] Input:

integrate((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x, algorithm="maxima")
 

Output:

4*(e^(2*n)*integrate(1/2*x^(2*n)/(e*x*e^(d*x^n + c) + e*x), x) + e^(2*n)*i 
ntegrate(1/2*x^(2*n)/(e*x*e^(d*x^n + c) - e*x), x))*a*b - b^2*(2*e^(2*n)*e 
^(2*d*x^n + n*log(x) + 2*c)/(d*e*n*e^(2*d*x^n + 2*c) - d*e*n) - e^(2*n - 1 
)*log((e^(d*x^n + c) + 1)*e^(-c))/(d^2*n) - e^(2*n - 1)*log((e^(d*x^n + c) 
 - 1)*e^(-c))/(d^2*n)) + 1/2*(e*x)^(2*n)*a^2/(e*n)
 

Giac [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {csch}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{2 \, n - 1} \,d x } \] Input:

integrate((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x, algorithm="giac")
                                                                                    
                                                                                    
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\int {\left (a+\frac {b}{\mathrm {sinh}\left (c+d\,x^n\right )}\right )}^2\,{\left (e\,x\right )}^{2\,n-1} \,d x \] Input:

int((a + b/sinh(c + d*x^n))^2*(e*x)^(2*n - 1),x)
 

Output:

int((a + b/sinh(c + d*x^n))^2*(e*x)^(2*n - 1), x)
 

Reduce [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {csch}\left (c+d x^n\right )\right )^2 \, dx=\frac {e^{2 n} \left (-16 e^{2 x^{n} d +3 c} \left (\int \frac {x^{2 n} e^{x^{n} d}}{e^{4 x^{n} d +4 c} x -2 e^{2 x^{n} d +2 c} x +x}d x \right ) a b \,d^{2} n +x^{2 n} e^{2 x^{n} d +2 c} a^{2} d^{2}-4 x^{n} e^{2 x^{n} d +2 c} b^{2} d +4 e^{2 x^{n} d +2 c} \mathrm {log}\left (e^{x^{n} d +c}-1\right ) a b +2 e^{2 x^{n} d +2 c} \mathrm {log}\left (e^{x^{n} d +c}-1\right ) b^{2}-4 e^{2 x^{n} d +2 c} \mathrm {log}\left (e^{x^{n} d +c}+1\right ) a b +2 e^{2 x^{n} d +2 c} \mathrm {log}\left (e^{x^{n} d +c}+1\right ) b^{2}-8 x^{n} e^{x^{n} d +c} a b d +16 e^{c} \left (\int \frac {x^{2 n} e^{x^{n} d}}{e^{4 x^{n} d +4 c} x -2 e^{2 x^{n} d +2 c} x +x}d x \right ) a b \,d^{2} n -x^{2 n} a^{2} d^{2}-4 \,\mathrm {log}\left (e^{x^{n} d +c}-1\right ) a b -2 \,\mathrm {log}\left (e^{x^{n} d +c}-1\right ) b^{2}+4 \,\mathrm {log}\left (e^{x^{n} d +c}+1\right ) a b -2 \,\mathrm {log}\left (e^{x^{n} d +c}+1\right ) b^{2}\right )}{2 d^{2} e n \left (e^{2 x^{n} d +2 c}-1\right )} \] Input:

int((e*x)^(-1+2*n)*(a+b*csch(c+d*x^n))^2,x)
 

Output:

(e**(2*n)*( - 16*e**(2*x**n*d + 3*c)*int((x**(2*n)*e**(x**n*d))/(e**(4*x** 
n*d + 4*c)*x - 2*e**(2*x**n*d + 2*c)*x + x),x)*a*b*d**2*n + x**(2*n)*e**(2 
*x**n*d + 2*c)*a**2*d**2 - 4*x**n*e**(2*x**n*d + 2*c)*b**2*d + 4*e**(2*x** 
n*d + 2*c)*log(e**(x**n*d + c) - 1)*a*b + 2*e**(2*x**n*d + 2*c)*log(e**(x* 
*n*d + c) - 1)*b**2 - 4*e**(2*x**n*d + 2*c)*log(e**(x**n*d + c) + 1)*a*b + 
 2*e**(2*x**n*d + 2*c)*log(e**(x**n*d + c) + 1)*b**2 - 8*x**n*e**(x**n*d + 
 c)*a*b*d + 16*e**c*int((x**(2*n)*e**(x**n*d))/(e**(4*x**n*d + 4*c)*x - 2* 
e**(2*x**n*d + 2*c)*x + x),x)*a*b*d**2*n - x**(2*n)*a**2*d**2 - 4*log(e**( 
x**n*d + c) - 1)*a*b - 2*log(e**(x**n*d + c) - 1)*b**2 + 4*log(e**(x**n*d 
+ c) + 1)*a*b - 2*log(e**(x**n*d + c) + 1)*b**2))/(2*d**2*e*n*(e**(2*x**n* 
d + 2*c) - 1))