3.785 \(\int \frac {\text {sech}^2(x)}{a+c \text {sech}(x)+b \tanh (x)} \, dx\)

Optimal. Leaf size=146 \[ -\frac {2 a c \tan ^{-1}\left (\frac {(a-c) \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2-c^2}}\right )}{\left (b^2+c^2\right ) \sqrt {a^2-b^2-c^2}}+\frac {b \log \left ((a-c) \tanh ^2\left (\frac {x}{2}\right )+a+2 b \tanh \left (\frac {x}{2}\right )+c\right )}{b^2+c^2}-\frac {b \log \left (\tanh ^2\left (\frac {x}{2}\right )+1\right )}{b^2+c^2}+\frac {2 c \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2} \]

[Out]

2*c*arctan(tanh(1/2*x))/(b^2+c^2)-b*ln(1+tanh(1/2*x)^2)/(b^2+c^2)+b*ln(a+c+2*b*tanh(1/2*x)+(a-c)*tanh(1/2*x)^2
)/(b^2+c^2)-2*a*c*arctan((b+(a-c)*tanh(1/2*x))/(a^2-b^2-c^2)^(1/2))/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.48, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {4397, 1075, 634, 618, 204, 628, 635, 203, 260} \[ -\frac {2 a c \tan ^{-1}\left (\frac {(a-c) \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2-c^2}}\right )}{\left (b^2+c^2\right ) \sqrt {a^2-b^2-c^2}}+\frac {b \log \left ((a-c) \tanh ^2\left (\frac {x}{2}\right )+a+2 b \tanh \left (\frac {x}{2}\right )+c\right )}{b^2+c^2}-\frac {b \log \left (\tanh ^2\left (\frac {x}{2}\right )+1\right )}{b^2+c^2}+\frac {2 c \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*c*ArcTan[Tanh[x/2]])/(b^2 + c^2) - (2*a*c*ArcTan[(b + (a - c)*Tanh[x/2])/Sqrt[a^2 - b^2 - c^2]])/(Sqrt[a^2
- b^2 - c^2]*(b^2 + c^2)) - (b*Log[1 + Tanh[x/2]^2])/(b^2 + c^2) + (b*Log[a + c + 2*b*Tanh[x/2] + (a - c)*Tanh
[x/2]^2])/(b^2 + c^2)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 1075

Int[((A_.) + (C_.)*(x_)^2)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_) + (f_.)*(x_)^2)), x_Symbol] :> With[{q =
c^2*d^2 + b^2*d*f - 2*a*c*d*f + a^2*f^2}, Dist[1/q, Int[(A*c^2*d - a*c*C*d + A*b^2*f - a*A*c*f + a^2*C*f + c*(
-(b*C*d) + A*b*f)*x)/(a + b*x + c*x^2), x], x] + Dist[1/q, Int[(c*C*d^2 - A*c*d*f - a*C*d*f + a*A*f^2 - f*(-(b
*C*d) + A*b*f)*x)/(d + f*x^2), x], x] /; NeQ[q, 0]] /; FreeQ[{a, b, c, d, f, A, C}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \frac {\text {sech}^2(x)}{a+c \text {sech}(x)+b \tanh (x)} \, dx &=\int \frac {\text {sech}(x)}{c+a \cosh (x)+b \sinh (x)} \, dx\\ &=2 \operatorname {Subst}\left (\int \frac {1-x^2}{\left (1+x^2\right ) \left (a+c+2 b x+(a-c) x^2\right )} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )\\ &=\frac {\operatorname {Subst}\left (\int \frac {4 c-4 b x}{1+x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{2 \left (b^2+c^2\right )}+\frac {\operatorname {Subst}\left (\int \frac {4 b^2+(a-c)^2-(a+c)^2+4 b (a-c) x}{a+c+2 b x+(a-c) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{2 \left (b^2+c^2\right )}\\ &=\frac {b \operatorname {Subst}\left (\int \frac {2 b+2 (a-c) x}{a+c+2 b x+(a-c) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}-\frac {(2 b) \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}+\frac {(2 c) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}-\frac {(2 a c) \operatorname {Subst}\left (\int \frac {1}{a+c+2 b x+(a-c) x^2} \, dx,x,\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}\\ &=\frac {2 c \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}-\frac {b \log \left (1+\tanh ^2\left (\frac {x}{2}\right )\right )}{b^2+c^2}+\frac {b \log \left (a+c+2 b \tanh \left (\frac {x}{2}\right )+(a-c) \tanh ^2\left (\frac {x}{2}\right )\right )}{b^2+c^2}+\frac {(4 a c) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2-c^2\right )-x^2} \, dx,x,2 b+2 (a-c) \tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}\\ &=\frac {2 c \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2}-\frac {2 a c \tan ^{-1}\left (\frac {b+(a-c) \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\sqrt {a^2-b^2-c^2} \left (b^2+c^2\right )}-\frac {b \log \left (1+\tanh ^2\left (\frac {x}{2}\right )\right )}{b^2+c^2}+\frac {b \log \left (a+c+2 b \tanh \left (\frac {x}{2}\right )+(a-c) \tanh ^2\left (\frac {x}{2}\right )\right )}{b^2+c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.27, size = 96, normalized size = 0.66 \[ \frac {-\frac {2 a c \tan ^{-1}\left (\frac {(a-c) \tanh \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2-c^2}}\right )}{\sqrt {a^2-b^2-c^2}}+b (\log (a \cosh (x)+b \sinh (x)+c)-\log (\cosh (x)))+2 c \tan ^{-1}\left (\tanh \left (\frac {x}{2}\right )\right )}{b^2+c^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*c*ArcTan[Tanh[x/2]] - (2*a*c*ArcTan[(b + (a - c)*Tanh[x/2])/Sqrt[a^2 - b^2 - c^2]])/Sqrt[a^2 - b^2 - c^2] +
 b*(-Log[Cosh[x]] + Log[c + a*Cosh[x] + b*Sinh[x]]))/(b^2 + c^2)

________________________________________________________________________________________

fricas [A]  time = 1.54, size = 486, normalized size = 3.33 \[ \left [-\frac {\sqrt {-a^{2} + b^{2} + c^{2}} a c \log \left (\frac {2 \, {\left (a + b\right )} c \cosh \relax (x) + {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \relax (x)^{2} + {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \relax (x)^{2} - a^{2} + b^{2} + 2 \, c^{2} + 2 \, {\left ({\left (a + b\right )} c + {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x) + 2 \, \sqrt {-a^{2} + b^{2} + c^{2}} {\left ({\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x) + c\right )}}{{\left (a + b\right )} \cosh \relax (x)^{2} + {\left (a + b\right )} \sinh \relax (x)^{2} + 2 \, c \cosh \relax (x) + 2 \, {\left ({\left (a + b\right )} \cosh \relax (x) + c\right )} \sinh \relax (x) + a - b}\right ) + 2 \, {\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) - {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b \sinh \relax (x) + c\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) + {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}}, \frac {2 \, \sqrt {a^{2} - b^{2} - c^{2}} a c \arctan \left (-\frac {{\left (a + b\right )} \cosh \relax (x) + {\left (a + b\right )} \sinh \relax (x) + c}{\sqrt {a^{2} - b^{2} - c^{2}}}\right ) - 2 \, {\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \arctan \left (\cosh \relax (x) + \sinh \relax (x)\right ) + {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \relax (x) + b \sinh \relax (x) + c\right )}}{\cosh \relax (x) - \sinh \relax (x)}\right ) - {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right )}{a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-(sqrt(-a^2 + b^2 + c^2)*a*c*log((2*(a + b)*c*cosh(x) + (a^2 + 2*a*b + b^2)*cosh(x)^2 + (a^2 + 2*a*b + b^2)*s
inh(x)^2 - a^2 + b^2 + 2*c^2 + 2*((a + b)*c + (a^2 + 2*a*b + b^2)*cosh(x))*sinh(x) + 2*sqrt(-a^2 + b^2 + c^2)*
((a + b)*cosh(x) + (a + b)*sinh(x) + c))/((a + b)*cosh(x)^2 + (a + b)*sinh(x)^2 + 2*c*cosh(x) + 2*((a + b)*cos
h(x) + c)*sinh(x) + a - b)) + 2*(c^3 - (a^2 - b^2)*c)*arctan(cosh(x) + sinh(x)) - (a^2*b - b^3 - b*c^2)*log(2*
(a*cosh(x) + b*sinh(x) + c)/(cosh(x) - sinh(x))) + (a^2*b - b^3 - b*c^2)*log(2*cosh(x)/(cosh(x) - sinh(x))))/(
a^2*b^2 - b^4 - c^4 + (a^2 - 2*b^2)*c^2), (2*sqrt(a^2 - b^2 - c^2)*a*c*arctan(-((a + b)*cosh(x) + (a + b)*sinh
(x) + c)/sqrt(a^2 - b^2 - c^2)) - 2*(c^3 - (a^2 - b^2)*c)*arctan(cosh(x) + sinh(x)) + (a^2*b - b^3 - b*c^2)*lo
g(2*(a*cosh(x) + b*sinh(x) + c)/(cosh(x) - sinh(x))) - (a^2*b - b^3 - b*c^2)*log(2*cosh(x)/(cosh(x) - sinh(x))
))/(a^2*b^2 - b^4 - c^4 + (a^2 - 2*b^2)*c^2)]

________________________________________________________________________________________

giac [A]  time = 0.14, size = 126, normalized size = 0.86 \[ -\frac {2 \, a c \arctan \left (\frac {a e^{x} + b e^{x} + c}{\sqrt {a^{2} - b^{2} - c^{2}}}\right )}{\sqrt {a^{2} - b^{2} - c^{2}} {\left (b^{2} + c^{2}\right )}} + \frac {2 \, c \arctan \left (e^{x}\right )}{b^{2} + c^{2}} + \frac {b \log \left (a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + 2 \, c e^{x} + a - b\right )}{b^{2} + c^{2}} - \frac {b \log \left (e^{\left (2 \, x\right )} + 1\right )}{b^{2} + c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*a*c*arctan((a*e^x + b*e^x + c)/sqrt(a^2 - b^2 - c^2))/(sqrt(a^2 - b^2 - c^2)*(b^2 + c^2)) + 2*c*arctan(e^x)
/(b^2 + c^2) + b*log(a*e^(2*x) + b*e^(2*x) + 2*c*e^x + a - b)/(b^2 + c^2) - b*log(e^(2*x) + 1)/(b^2 + c^2)

________________________________________________________________________________________

maple [B]  time = 0.22, size = 406, normalized size = 2.78 \[ \frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) c +2 \tanh \left (\frac {x}{2}\right ) b +a +c \right ) a b}{\left (b^{2}+c^{2}\right ) \left (a -c \right )}-\frac {\ln \left (a \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-\left (\tanh ^{2}\left (\frac {x}{2}\right )\right ) c +2 \tanh \left (\frac {x}{2}\right ) b +a +c \right ) c b}{\left (b^{2}+c^{2}\right ) \left (a -c \right )}-\frac {2 \arctan \left (\frac {2 \left (a -c \right ) \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right ) a c}{\left (b^{2}+c^{2}\right ) \sqrt {a^{2}-b^{2}-c^{2}}}+\frac {2 \arctan \left (\frac {2 \left (a -c \right ) \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right ) b^{2}}{\left (b^{2}+c^{2}\right ) \sqrt {a^{2}-b^{2}-c^{2}}}-\frac {2 \arctan \left (\frac {2 \left (a -c \right ) \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right ) b^{2} a}{\left (b^{2}+c^{2}\right ) \sqrt {a^{2}-b^{2}-c^{2}}\, \left (a -c \right )}+\frac {2 \arctan \left (\frac {2 \left (a -c \right ) \tanh \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right ) b^{2} c}{\left (b^{2}+c^{2}\right ) \sqrt {a^{2}-b^{2}-c^{2}}\, \left (a -c \right )}-\frac {b \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )}{b^{2}+c^{2}}+\frac {2 c \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{b^{2}+c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(b^2+c^2)/(a-c)*ln(a*tanh(1/2*x)^2-tanh(1/2*x)^2*c+2*tanh(1/2*x)*b+a+c)*a*b-1/(b^2+c^2)/(a-c)*ln(a*tanh(1/2*
x)^2-tanh(1/2*x)^2*c+2*tanh(1/2*x)*b+a+c)*c*b-2/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)*arctan(1/2*(2*(a-c)*tanh(1/2*x)+
2*b)/(a^2-b^2-c^2)^(1/2))*a*c+2/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)*arctan(1/2*(2*(a-c)*tanh(1/2*x)+2*b)/(a^2-b^2-c^
2)^(1/2))*b^2-2/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)*arctan(1/2*(2*(a-c)*tanh(1/2*x)+2*b)/(a^2-b^2-c^2)^(1/2))*b^2/(a
-c)*a+2/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)*arctan(1/2*(2*(a-c)*tanh(1/2*x)+2*b)/(a^2-b^2-c^2)^(1/2))*b^2/(a-c)*c-b*
ln(tanh(1/2*x)^2+1)/(b^2+c^2)+2*c*arctan(tanh(1/2*x))/(b^2+c^2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c^2+b^2-a^2>0)', see `assume?`
 for more details)Is c^2+b^2-a^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 28.99, size = 1069, normalized size = 7.32 \[ \frac {\ln \left (\frac {64\,\left (a-b+2\,c\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^4}+\frac {\left (\frac {32\,\left (2\,a^3+3\,{\mathrm {e}}^x\,a^2\,c-2\,a\,b^2+6\,{\mathrm {e}}^x\,a\,b\,c-2\,a\,c^2+3\,{\mathrm {e}}^x\,b^2\,c+2\,b\,c^2-4\,{\mathrm {e}}^x\,c^3\right )}{{\left (a+b\right )}^5}+\frac {\left (\frac {32\,\left (a-b\right )\,\left (-2\,b^3+6\,{\mathrm {e}}^x\,b^2\,c-2\,a\,b^2+b\,c^2+6\,a\,{\mathrm {e}}^x\,b\,c+3\,{\mathrm {e}}^x\,c^3+2\,a\,c^2\right )}{{\left (a+b\right )}^5}-\frac {32\,\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (2\,a^3\,b^2-4\,{\mathrm {e}}^x\,a^3\,b\,c-2\,a^3\,c^2+{\mathrm {e}}^x\,a^2\,b^2\,c+4\,a^2\,b\,c^2-3\,{\mathrm {e}}^x\,a^2\,c^3-2\,a\,b^4+6\,{\mathrm {e}}^x\,a\,b^3\,c+a\,b^2\,c^2+6\,{\mathrm {e}}^x\,a\,b\,c^3+3\,a\,c^4+{\mathrm {e}}^x\,b^4\,c-3\,b^3\,c^2+5\,{\mathrm {e}}^x\,b^2\,c^3-3\,b\,c^4+4\,{\mathrm {e}}^x\,c^5\right )}{{\left (a+b\right )}^5\,\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{-a^2\,b^2-a^2\,c^2+b^4+2\,b^2\,c^2+c^4}-\frac {\ln \left (\frac {64\,\left (a-b+2\,c\,{\mathrm {e}}^x\right )}{{\left (a+b\right )}^4}-\frac {\left (\frac {32\,\left (2\,a^3+3\,{\mathrm {e}}^x\,a^2\,c-2\,a\,b^2+6\,{\mathrm {e}}^x\,a\,b\,c-2\,a\,c^2+3\,{\mathrm {e}}^x\,b^2\,c+2\,b\,c^2-4\,{\mathrm {e}}^x\,c^3\right )}{{\left (a+b\right )}^5}-\frac {\left (\frac {32\,\left (a-b\right )\,\left (-2\,b^3+6\,{\mathrm {e}}^x\,b^2\,c-2\,a\,b^2+b\,c^2+6\,a\,{\mathrm {e}}^x\,b\,c+3\,{\mathrm {e}}^x\,c^3+2\,a\,c^2\right )}{{\left (a+b\right )}^5}+\frac {32\,\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (2\,a^3\,b^2-4\,{\mathrm {e}}^x\,a^3\,b\,c-2\,a^3\,c^2+{\mathrm {e}}^x\,a^2\,b^2\,c+4\,a^2\,b\,c^2-3\,{\mathrm {e}}^x\,a^2\,c^3-2\,a\,b^4+6\,{\mathrm {e}}^x\,a\,b^3\,c+a\,b^2\,c^2+6\,{\mathrm {e}}^x\,a\,b\,c^3+3\,a\,c^4+{\mathrm {e}}^x\,b^4\,c-3\,b^3\,c^2+5\,{\mathrm {e}}^x\,b^2\,c^3-3\,b\,c^4+4\,{\mathrm {e}}^x\,c^5\right )}{{\left (a+b\right )}^5\,\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{-a^2\,b^2-a^2\,c^2+b^4+2\,b^2\,c^2+c^4}-\frac {\ln \left (1+{\mathrm {e}}^x\,1{}\mathrm {i}\right )}{b-c\,1{}\mathrm {i}}-\frac {\ln \left ({\mathrm {e}}^x+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{-c+b\,1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log((64*(a - b + 2*c*exp(x)))/(a + b)^4 + (((32*(2*b*c^2 - 2*a*c^2 - 2*a*b^2 + 2*a^3 - 4*c^3*exp(x) + 3*a^2*c
*exp(x) + 3*b^2*c*exp(x) + 6*a*b*c*exp(x)))/(a + b)^5 + (((32*(a - b)*(2*a*c^2 - 2*a*b^2 + b*c^2 - 2*b^3 + 3*c
^3*exp(x) + 6*b^2*c*exp(x) + 6*a*b*c*exp(x)))/(a + b)^5 - (32*(b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(1/
2))*(3*a*c^4 - 2*a*b^4 - 3*b*c^4 + 2*a^3*b^2 - 2*a^3*c^2 - 3*b^3*c^2 + 4*c^5*exp(x) + a*b^2*c^2 + 4*a^2*b*c^2
+ b^4*c*exp(x) - 3*a^2*c^3*exp(x) + 5*b^2*c^3*exp(x) + a^2*b^2*c*exp(x) + 6*a*b*c^3*exp(x) + 6*a*b^3*c*exp(x)
- 4*a^3*b*c*exp(x)))/((a + b)^5*(b^2 + c^2)*(b^2 - a^2 + c^2)))*(b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(
1/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2)))*(b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b^2
 - a^2 + c^2)))*(b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(1/2)))/(b^4 + c^4 - a^2*b^2 - a^2*c^2 + 2*b^2*c^
2) - (log(exp(x) + 1i)*1i)/(b*1i - c) - (log((64*(a - b + 2*c*exp(x)))/(a + b)^4 - (((32*(2*b*c^2 - 2*a*c^2 -
2*a*b^2 + 2*a^3 - 4*c^3*exp(x) + 3*a^2*c*exp(x) + 3*b^2*c*exp(x) + 6*a*b*c*exp(x)))/(a + b)^5 - (((32*(a - b)*
(2*a*c^2 - 2*a*b^2 + b*c^2 - 2*b^3 + 3*c^3*exp(x) + 6*b^2*c*exp(x) + 6*a*b*c*exp(x)))/(a + b)^5 + (32*(a^2*b -
 b*c^2 - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2))*(3*a*c^4 - 2*a*b^4 - 3*b*c^4 + 2*a^3*b^2 - 2*a^3*c^2 - 3*b^3*c^2 +
 4*c^5*exp(x) + a*b^2*c^2 + 4*a^2*b*c^2 + b^4*c*exp(x) - 3*a^2*c^3*exp(x) + 5*b^2*c^3*exp(x) + a^2*b^2*c*exp(x
) + 6*a*b*c^3*exp(x) + 6*a*b^3*c*exp(x) - 4*a^3*b*c*exp(x)))/((a + b)^5*(b^2 + c^2)*(b^2 - a^2 + c^2)))*(a^2*b
 - b*c^2 - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2)))*(a^2*b - b*c^2 - b^3 + a*c*(b^
2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2)))*(a^2*b - b*c^2 - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2)))/(
b^4 + c^4 - a^2*b^2 - a^2*c^2 + 2*b^2*c^2) - log(exp(x)*1i + 1)/(b - c*1i)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{2}{\relax (x )}}{a + b \tanh {\relax (x )} + c \operatorname {sech}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________