\(\int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx\) [145]

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

Optimal result

Integrand size = 26, antiderivative size = 351 \[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^3}+\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^3} \]

[Out]

1/2*x^2*ln(1+(a+b)*exp(2*d*x+2*c)/(a-b-2*(-a)^(1/2)*b^(1/2)))/d/(-a)^(1/2)/b^(1/2)-1/2*x^2*ln(1+(a+b)*exp(2*d*
x+2*c)/(a-b+2*(-a)^(1/2)*b^(1/2)))/d/(-a)^(1/2)/b^(1/2)+1/2*x*polylog(2,-(a+b)*exp(2*d*x+2*c)/(a-b-2*(-a)^(1/2
)*b^(1/2)))/d^2/(-a)^(1/2)/b^(1/2)-1/2*x*polylog(2,-(a+b)*exp(2*d*x+2*c)/(a-b+2*(-a)^(1/2)*b^(1/2)))/d^2/(-a)^
(1/2)/b^(1/2)-1/4*polylog(3,-(a+b)*exp(2*d*x+2*c)/(a-b-2*(-a)^(1/2)*b^(1/2)))/d^3/(-a)^(1/2)/b^(1/2)+1/4*polyl
og(3,-(a+b)*exp(2*d*x+2*c)/(a-b+2*(-a)^(1/2)*b^(1/2)))/d^3/(-a)^(1/2)/b^(1/2)

Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {5751, 3401, 2296, 2221, 2611, 2320, 6724} \[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=-\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a-b-2 \sqrt {-a} \sqrt {b}}\right )}{4 \sqrt {-a} \sqrt {b} d^3}+\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a-b+2 \sqrt {-a} \sqrt {b}}\right )}{4 \sqrt {-a} \sqrt {b} d^3}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-b-2 \sqrt {-a} \sqrt {b}}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-b+2 \sqrt {-a} \sqrt {b}}\right )}{2 \sqrt {-a} \sqrt {b} d^2}+\frac {x^2 \log \left (\frac {(a+b) e^{2 c+2 d x}}{-2 \sqrt {-a} \sqrt {b}+a-b}+1\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (\frac {(a+b) e^{2 c+2 d x}}{2 \sqrt {-a} \sqrt {b}+a-b}+1\right )}{2 \sqrt {-a} \sqrt {b} d} \]

[In]

Int[(x^2*Sech[c + d*x]^2)/(a + b*Tanh[c + d*x]^2),x]

[Out]

(x^2*Log[1 + ((a + b)*E^(2*c + 2*d*x))/(a - 2*Sqrt[-a]*Sqrt[b] - b)])/(2*Sqrt[-a]*Sqrt[b]*d) - (x^2*Log[1 + ((
a + b)*E^(2*c + 2*d*x))/(a + 2*Sqrt[-a]*Sqrt[b] - b)])/(2*Sqrt[-a]*Sqrt[b]*d) + (x*PolyLog[2, -(((a + b)*E^(2*
c + 2*d*x))/(a - 2*Sqrt[-a]*Sqrt[b] - b))])/(2*Sqrt[-a]*Sqrt[b]*d^2) - (x*PolyLog[2, -(((a + b)*E^(2*c + 2*d*x
))/(a + 2*Sqrt[-a]*Sqrt[b] - b))])/(2*Sqrt[-a]*Sqrt[b]*d^2) - PolyLog[3, -(((a + b)*E^(2*c + 2*d*x))/(a - 2*Sq
rt[-a]*Sqrt[b] - b))]/(4*Sqrt[-a]*Sqrt[b]*d^3) + PolyLog[3, -(((a + b)*E^(2*c + 2*d*x))/(a + 2*Sqrt[-a]*Sqrt[b
] - b))]/(4*Sqrt[-a]*Sqrt[b]*d^3)

Rule 2221

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]
 - Dist[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 2296

Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.)*(F_)^(v_)), x_Symbol] :> With[{q =
 Rt[b^2 - 4*a*c, 2]}, Dist[2*(c/q), Int[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Dist[2*(c/q), Int[(f + g
*x)^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[v, 2*u] && LinearQ[u, x] && NeQ[
b^2 - 4*a*c, 0] && IGtQ[m, 0]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{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 2611

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] + Dist[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 3401

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]), x_Symbol]
:> Dist[2, Int[((c + d*x)^m*(E^((-I)*e + f*fz*x)/(b + (2*a*E^((-I)*e + f*fz*x))/E^(I*Pi*(k - 1/2)) - (b*E^(2*(
(-I)*e + f*fz*x)))/E^(2*I*k*Pi))))/E^(I*Pi*(k - 1/2)), x], x] /; FreeQ[{a, b, c, d, e, f, fz}, x] && IntegerQ[
2*k] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 5751

Int[(((f_.) + (g_.)*(x_))^(m_.)*Sech[(d_.) + (e_.)*(x_)]^2)/((b_) + (c_.)*Tanh[(d_.) + (e_.)*(x_)]^2), x_Symbo
l] :> Dist[2, Int[(f + g*x)^m/(b - c + (b + c)*Cosh[2*d + 2*e*x]), x], x] /; FreeQ[{b, c, d, e, f, g}, x] && I
GtQ[m, 0]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> 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]

Rubi steps \begin{align*} \text {integral}& = 2 \int \frac {x^2}{a-b+(a+b) \cosh (2 c+2 d x)} \, dx \\ & = 4 \int \frac {e^{2 c+2 d x} x^2}{a+b+2 (a-b) e^{2 c+2 d x}+(a+b) e^{2 (2 c+2 d x)}} \, dx \\ & = \frac {(2 (a+b)) \int \frac {e^{2 c+2 d x} x^2}{2 (a-b)-4 \sqrt {-a} \sqrt {b}+2 (a+b) e^{2 c+2 d x}} \, dx}{\sqrt {-a} \sqrt {b}}-\frac {(2 (a+b)) \int \frac {e^{2 c+2 d x} x^2}{2 (a-b)+4 \sqrt {-a} \sqrt {b}+2 (a+b) e^{2 c+2 d x}} \, dx}{\sqrt {-a} \sqrt {b}} \\ & = \frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {\int x \log \left (1+\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)-4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{\sqrt {-a} \sqrt {b} d}+\frac {\int x \log \left (1+\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)+4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{\sqrt {-a} \sqrt {b} d} \\ & = \frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {\int \operatorname {PolyLog}\left (2,-\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)-4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{2 \sqrt {-a} \sqrt {b} d^2}+\frac {\int \operatorname {PolyLog}\left (2,-\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)+4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{2 \sqrt {-a} \sqrt {b} d^2} \\ & = \frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {\text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) x}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{x} \, dx,x,e^{2 c+2 d x}\right )}{4 \sqrt {-a} \sqrt {b} d^3}+\frac {\text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) x}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{x} \, dx,x,e^{2 c+2 d x}\right )}{4 \sqrt {-a} \sqrt {b} d^3} \\ & = \frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x^2 \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d^2}-\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^3}+\frac {\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.74 (sec) , antiderivative size = 268, normalized size of antiderivative = 0.76 \[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {2 d^2 x^2 \log \left (1+\frac {(a+b) e^{2 (c+d x)}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )-2 d^2 x^2 \log \left (1+\frac {(a+b) e^{2 (c+d x)}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )+2 d x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 (c+d x)}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )-2 d x \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 (c+d x)}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )-\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 (c+d x)}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )+\operatorname {PolyLog}\left (3,-\frac {(a+b) e^{2 (c+d x)}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^3} \]

[In]

Integrate[(x^2*Sech[c + d*x]^2)/(a + b*Tanh[c + d*x]^2),x]

[Out]

(2*d^2*x^2*Log[1 + ((a + b)*E^(2*(c + d*x)))/(a - 2*Sqrt[-a]*Sqrt[b] - b)] - 2*d^2*x^2*Log[1 + ((a + b)*E^(2*(
c + d*x)))/(a + 2*Sqrt[-a]*Sqrt[b] - b)] + 2*d*x*PolyLog[2, -(((a + b)*E^(2*(c + d*x)))/(a - 2*Sqrt[-a]*Sqrt[b
] - b))] - 2*d*x*PolyLog[2, -(((a + b)*E^(2*(c + d*x)))/(a + 2*Sqrt[-a]*Sqrt[b] - b))] - PolyLog[3, -(((a + b)
*E^(2*(c + d*x)))/(a - 2*Sqrt[-a]*Sqrt[b] - b))] + PolyLog[3, -(((a + b)*E^(2*(c + d*x)))/(a + 2*Sqrt[-a]*Sqrt
[b] - b))])/(4*Sqrt[-a]*Sqrt[b]*d^3)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1185\) vs. \(2(285)=570\).

Time = 3.21 (sec) , antiderivative size = 1186, normalized size of antiderivative = 3.38

method result size
risch \(\text {Expression too large to display}\) \(1186\)

[In]

int(x^2*sech(d*x+c)^2/(a+b*tanh(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d^3*c^2/(a*b)^(1/2)*arctan(1/4*(2*(a+b)*exp(2*d*x+2*c)+2*a-2*b)/(a*b)^(1/2))-1/2/d^3/(-a*b)^(1/2)*ln(1-(a+b)
*exp(2*d*x+2*c)/(2*(-a*b)^(1/2)-a+b))*c^2+1/d^2/(-a*b)^(1/2)*c^2*x+1/2/d/(-a*b)^(1/2)*ln(1-(a+b)*exp(2*d*x+2*c
)/(2*(-a*b)^(1/2)-a+b))*x^2+1/2/d^2/(-a*b)^(1/2)*polylog(2,(a+b)*exp(2*d*x+2*c)/(2*(-a*b)^(1/2)-a+b))*x-1/d^3/
(-2*(-a*b)^(1/2)-a+b)*ln(1-(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*c^2+1/d^2/(-2*(-a*b)^(1/2)-a+b)*polylog
(2,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x+2/d^2/(-2*(-a*b)^(1/2)-a+b)*c^2*x+4/3/d^3/(-2*(-a*b)^(1/2)-a+
b)*c^3-1/2/d^3/(-2*(-a*b)^(1/2)-a+b)*polylog(3,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))+2/3/d^3/(-a*b)^(1/2
)*c^3-1/4/d^3/(-a*b)^(1/2)*polylog(3,(a+b)*exp(2*d*x+2*c)/(2*(-a*b)^(1/2)-a+b))+1/2/d^2/(-a*b)^(1/2)/(-2*(-a*b
)^(1/2)-a+b)*a*polylog(2,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x-1/2/d/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b
)*b*ln(1-(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x^2-1/2/d^2/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*b*polylog(
2,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x+1/d^2/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*a*c^2*x-1/2/d^3/(-a*b
)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*a*ln(1-(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*c^2+1/2/d^3/(-a*b)^(1/2)/(-2*
(-a*b)^(1/2)-a+b)*b*ln(1-(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*c^2+1/d/(-2*(-a*b)^(1/2)-a+b)*ln(1-(a+b)*
exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x^2+1/3/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*b*x^3-1/3/(-a*b)^(1/2)/(-2*(-
a*b)^(1/2)-a+b)*a*x^3+2/3/d^3/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*a*c^3-2/3/d^3/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a
+b)*b*c^3-1/4/d^3/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*a*polylog(3,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))+1
/4/d^3/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*b*polylog(3,(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))-1/3/(-a*b)^(
1/2)*x^3-2/3/(-2*(-a*b)^(1/2)-a+b)*x^3-1/d^2/(-a*b)^(1/2)/(-2*(-a*b)^(1/2)-a+b)*b*c^2*x+1/2/d/(-a*b)^(1/2)/(-2
*(-a*b)^(1/2)-a+b)*a*ln(1-(a+b)*exp(2*d*x+2*c)/(-2*(-a*b)^(1/2)-a+b))*x^2

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2110 vs. \(2 (283) = 566\).

Time = 0.33 (sec) , antiderivative size = 2110, normalized size of antiderivative = 6.01 \[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\text {Too large to display} \]

[In]

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

[Out]

1/2*(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*d*x*dilog(-(((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) - 2*(
(a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt(-(2*(a + b)*sqrt(-a*b/(a^2
 + 2*a*b + b^2)) + a - b)/(a + b)) + a + b)/(a + b) + 1) + 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*d*x*dilog(
(((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) - 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/
(a^2 + 2*a*b + b^2)))*sqrt(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b)) - a - b)/(a + b) + 1)
- 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*d*x*dilog(-(((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a
+ b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2
*a*b + b^2)) - a + b)/(a + b)) + a + b)/(a + b) + 1) - 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*d*x*dilog((((a
 - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2
 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) - a + b)/(a + b)) - a - b)/(a + b) + 1) + (a
+ b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*c^2*log(2*sqrt(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b)
) + 2*cosh(d*x + c) + 2*sinh(d*x + c)) + (a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*c^2*log(-2*sqrt(-(2*(a + b)*sq
rt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b)) + 2*cosh(d*x + c) + 2*sinh(d*x + c)) - (a + b)*sqrt(-a*b/(a^2 +
 2*a*b + b^2))*c^2*log(2*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) - a + b)/(a + b)) + 2*cosh(d*x + c) +
2*sinh(d*x + c)) - (a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*c^2*log(-2*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b +
b^2)) - a + b)/(a + b)) + 2*cosh(d*x + c) + 2*sinh(d*x + c)) + ((a + b)*d^2*x^2 - (a + b)*c^2)*sqrt(-a*b/(a^2
+ 2*a*b + b^2))*log((((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) - 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(
d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b)) +
a + b)/(a + b)) + ((a + b)*d^2*x^2 - (a + b)*c^2)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*log(-(((a - b)*cosh(d*x + c)
+ (a - b)*sinh(d*x + c) - 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sq
rt(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b)) - a - b)/(a + b)) - ((a + b)*d^2*x^2 - (a + b)
*c^2)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*log((((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a + b)*cosh(d*x
 + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))
- a + b)/(a + b)) + a + b)/(a + b)) - ((a + b)*d^2*x^2 - (a + b)*c^2)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*log(-(((a
 - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2
 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) - a + b)/(a + b)) - a - b)/(a + b)) - 2*(a +
b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*polylog(3, ((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) - 2*((a + b)*cosh(
d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^
2)) + a - b)/(a + b))/(a + b)) - 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*polylog(3, -((a - b)*cosh(d*x + c) +
 (a - b)*sinh(d*x + c) - 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqr
t(-(2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) + a - b)/(a + b))/(a + b)) + 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b
^2))*polylog(3, ((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a + b)*cosh(d*x + c) + (a + b)*sinh(d*x +
 c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2)) - a + b)/(a + b))/(a + b))
 + 2*(a + b)*sqrt(-a*b/(a^2 + 2*a*b + b^2))*polylog(3, -((a - b)*cosh(d*x + c) + (a - b)*sinh(d*x + c) + 2*((a
 + b)*cosh(d*x + c) + (a + b)*sinh(d*x + c))*sqrt(-a*b/(a^2 + 2*a*b + b^2)))*sqrt((2*(a + b)*sqrt(-a*b/(a^2 +
2*a*b + b^2)) - a + b)/(a + b))/(a + b)))/(a*b*d^3)

Sympy [F]

\[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {x^{2} \operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \]

[In]

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

[Out]

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

Maxima [F]

\[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {x^{2} \operatorname {sech}\left (d x + c\right )^{2}}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]

[In]

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

[Out]

integrate(x^2*sech(d*x + c)^2/(b*tanh(d*x + c)^2 + a), x)

Giac [F]

\[ \int \frac {x^2 \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {x^{2} \operatorname {sech}\left (d x + c\right )^{2}}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]

[In]

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

[Out]

sage0*x

Mupad [F(-1)]

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

[In]

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

[Out]

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