Integrand size = 12, antiderivative size = 109 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\frac {x}{a^2}-\frac {2 b \left (2 a^2-b^2\right ) \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 (a-b)^{3/2} (a+b)^{3/2} d}+\frac {b^2 \tanh (c+d x)}{a \left (a^2-b^2\right ) d (a+b \text {sech}(c+d x))} \] Output:
x/a^2-2*b*(2*a^2-b^2)*arctan((a-b)^(1/2)*tanh(1/2*d*x+1/2*c)/(a+b)^(1/2))/ a^2/(a-b)^(3/2)/(a+b)^(3/2)/d+b^2*tanh(d*x+c)/a/(a^2-b^2)/d/(a+b*sech(d*x+ c))
Time = 0.35 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.86 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\frac {a \left (\left (a^2-b^2\right )^{3/2} (c+d x)+\left (4 a^2 b-2 b^3\right ) \arctan \left (\frac {(-a+b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )\right ) \cosh (c+d x)+b \left (\left (a^2-b^2\right )^{3/2} (c+d x)+\left (4 a^2 b-2 b^3\right ) \arctan \left (\frac {(-a+b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )+a b \sqrt {a^2-b^2} \sinh (c+d x)\right )}{a^2 (a-b) (a+b) \sqrt {a^2-b^2} d (b+a \cosh (c+d x))} \] Input:
Integrate[(a + b*Sech[c + d*x])^(-2),x]
Output:
(a*((a^2 - b^2)^(3/2)*(c + d*x) + (4*a^2*b - 2*b^3)*ArcTan[((-a + b)*Tanh[ (c + d*x)/2])/Sqrt[a^2 - b^2]])*Cosh[c + d*x] + b*((a^2 - b^2)^(3/2)*(c + d*x) + (4*a^2*b - 2*b^3)*ArcTan[((-a + b)*Tanh[(c + d*x)/2])/Sqrt[a^2 - b^ 2]] + a*b*Sqrt[a^2 - b^2]*Sinh[c + d*x]))/(a^2*(a - b)*(a + b)*Sqrt[a^2 - b^2]*d*(b + a*Cosh[c + d*x]))
Time = 0.68 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.23, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {3042, 4272, 25, 3042, 4407, 3042, 4318, 3042, 3138, 221}
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 {1}{(a+b \text {sech}(c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a+b \csc \left (i c+i d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4272 |
\(\displaystyle \frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}-\frac {\int -\frac {a^2-b \text {sech}(c+d x) a-b^2}{a+b \text {sech}(c+d x)}dx}{a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a^2-b \text {sech}(c+d x) a-b^2}{a+b \text {sech}(c+d x)}dx}{a \left (a^2-b^2\right )}+\frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}+\frac {\int \frac {a^2-b \csc \left (i c+i d x+\frac {\pi }{2}\right ) a-b^2}{a+b \csc \left (i c+i d x+\frac {\pi }{2}\right )}dx}{a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4407 |
\(\displaystyle \frac {\frac {x \left (a^2-b^2\right )}{a}-\frac {b \left (2 a^2-b^2\right ) \int \frac {\text {sech}(c+d x)}{a+b \text {sech}(c+d x)}dx}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}+\frac {\frac {x \left (a^2-b^2\right )}{a}-\frac {b \left (2 a^2-b^2\right ) \int \frac {\csc \left (i c+i d x+\frac {\pi }{2}\right )}{a+b \csc \left (i c+i d x+\frac {\pi }{2}\right )}dx}{a}}{a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\frac {x \left (a^2-b^2\right )}{a}-\frac {\left (2 a^2-b^2\right ) \int \frac {1}{\frac {a \cosh (c+d x)}{b}+1}dx}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}+\frac {\frac {x \left (a^2-b^2\right )}{a}-\frac {\left (2 a^2-b^2\right ) \int \frac {1}{\frac {a \sin \left (i c+i d x+\frac {\pi }{2}\right )}{b}+1}dx}{a}}{a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}+\frac {\frac {x \left (a^2-b^2\right )}{a}+\frac {2 i \left (2 a^2-b^2\right ) \int \frac {1}{\frac {a+b}{b}-\left (1-\frac {a}{b}\right ) \tanh ^2\left (\frac {1}{2} (c+d x)\right )}d\left (i \tanh \left (\frac {1}{2} (c+d x)\right )\right )}{a d}}{a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {x \left (a^2-b^2\right )}{a}-\frac {2 b \left (2 a^2-b^2\right ) \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}}{a \left (a^2-b^2\right )}+\frac {b^2 \tanh (c+d x)}{a d \left (a^2-b^2\right ) (a+b \text {sech}(c+d x))}\) |
Input:
Int[(a + b*Sech[c + d*x])^(-2),x]
Output:
(((a^2 - b^2)*x)/a - (2*b*(2*a^2 - b^2)*ArcTan[(Sqrt[a - b]*Tanh[(c + d*x) /2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d))/(a*(a^2 - b^2)) + (b^2*T anh[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sech[c + d*x]))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[b^2*Cot[ c + d*x]*((a + b*Csc[c + d*x])^(n + 1)/(a*d*(n + 1)*(a^2 - b^2))), x] + Sim p[1/(a*(n + 1)*(a^2 - b^2)) Int[(a + b*Csc[c + d*x])^(n + 1)*Simp[(a^2 - b^2)*(n + 1) - a*b*(n + 1)*Csc[c + d*x] + b^2*(n + 2)*Csc[c + d*x]^2, x], x ], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && Integ erQ[2*n]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a Int[Csc[e + f* x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Time = 0.26 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.50
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {2 b \left (-\frac {a b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )}+\frac {\left (2 a^{2}-b^{2}\right ) \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(164\) |
default | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2}}-\frac {2 b \left (-\frac {a b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )}+\frac {\left (2 a^{2}-b^{2}\right ) \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2}}}{d}\) | \(164\) |
risch | \(\frac {x}{a^{2}}-\frac {2 b^{2} \left (b \,{\mathrm e}^{d x +c}+a \right )}{d \,a^{2} \left (a^{2}-b^{2}\right ) \left (a \,{\mathrm e}^{2 d x +2 c}+2 b \,{\mathrm e}^{d x +c}+a \right )}-\frac {2 b \ln \left ({\mathrm e}^{d x +c}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}+\frac {b^{3} \ln \left ({\mathrm e}^{d x +c}+\frac {b \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{2}}+\frac {2 b \ln \left ({\mathrm e}^{d x +c}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}-\frac {b^{3} \ln \left ({\mathrm e}^{d x +c}+\frac {b \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, a}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,a^{2}}\) | \(368\) |
Input:
int(1/(a+b*sech(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(1/a^2*ln(tanh(1/2*d*x+1/2*c)+1)-2*b/a^2*(-a*b/(a^2-b^2)*tanh(1/2*d*x+ 1/2*c)/(tanh(1/2*d*x+1/2*c)^2*a-tanh(1/2*d*x+1/2*c)^2*b+a+b)+(2*a^2-b^2)/( a-b)/(a+b)/((a-b)*(a+b))^(1/2)*arctan((a-b)*tanh(1/2*d*x+1/2*c)/((a-b)*(a+ b))^(1/2)))-1/a^2*ln(tanh(1/2*d*x+1/2*c)-1))
Leaf count of result is larger than twice the leaf count of optimal. 544 vs. \(2 (100) = 200\).
Time = 0.11 (sec) , antiderivative size = 1207, normalized size of antiderivative = 11.07 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\text {Too large to display} \] Input:
integrate(1/(a+b*sech(d*x+c))^2,x, algorithm="fricas")
Output:
[-(2*a^3*b^2 - 2*a*b^4 - (a^5 - 2*a^3*b^2 + a*b^4)*d*x*cosh(d*x + c)^2 - ( a^5 - 2*a^3*b^2 + a*b^4)*d*x*sinh(d*x + c)^2 - (a^5 - 2*a^3*b^2 + a*b^4)*d *x + (2*a^3*b - a*b^3 + (2*a^3*b - a*b^3)*cosh(d*x + c)^2 + (2*a^3*b - a*b ^3)*sinh(d*x + c)^2 + 2*(2*a^2*b^2 - b^4)*cosh(d*x + c) + 2*(2*a^2*b^2 - b ^4 + (2*a^3*b - a*b^3)*cosh(d*x + c))*sinh(d*x + c))*sqrt(-a^2 + b^2)*log( (a^2*cosh(d*x + c)^2 + a^2*sinh(d*x + c)^2 + 2*a*b*cosh(d*x + c) - a^2 + 2 *b^2 + 2*(a^2*cosh(d*x + c) + a*b)*sinh(d*x + c) + 2*sqrt(-a^2 + b^2)*(a*c osh(d*x + c) + a*sinh(d*x + c) + b))/(a*cosh(d*x + c)^2 + a*sinh(d*x + c)^ 2 + 2*b*cosh(d*x + c) + 2*(a*cosh(d*x + c) + b)*sinh(d*x + c) + a)) + 2*(a ^2*b^3 - b^5 - (a^4*b - 2*a^2*b^3 + b^5)*d*x)*cosh(d*x + c) + 2*(a^2*b^3 - b^5 - (a^5 - 2*a^3*b^2 + a*b^4)*d*x*cosh(d*x + c) - (a^4*b - 2*a^2*b^3 + b^5)*d*x)*sinh(d*x + c))/((a^7 - 2*a^5*b^2 + a^3*b^4)*d*cosh(d*x + c)^2 + (a^7 - 2*a^5*b^2 + a^3*b^4)*d*sinh(d*x + c)^2 + 2*(a^6*b - 2*a^4*b^3 + a^2 *b^5)*d*cosh(d*x + c) + (a^7 - 2*a^5*b^2 + a^3*b^4)*d + 2*((a^7 - 2*a^5*b^ 2 + a^3*b^4)*d*cosh(d*x + c) + (a^6*b - 2*a^4*b^3 + a^2*b^5)*d)*sinh(d*x + c)), -(2*a^3*b^2 - 2*a*b^4 - (a^5 - 2*a^3*b^2 + a*b^4)*d*x*cosh(d*x + c)^ 2 - (a^5 - 2*a^3*b^2 + a*b^4)*d*x*sinh(d*x + c)^2 - (a^5 - 2*a^3*b^2 + a*b ^4)*d*x - 2*(2*a^3*b - a*b^3 + (2*a^3*b - a*b^3)*cosh(d*x + c)^2 + (2*a^3* b - a*b^3)*sinh(d*x + c)^2 + 2*(2*a^2*b^2 - b^4)*cosh(d*x + c) + 2*(2*a^2* b^2 - b^4 + (2*a^3*b - a*b^3)*cosh(d*x + c))*sinh(d*x + c))*sqrt(a^2 - ...
\[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\int \frac {1}{\left (a + b \operatorname {sech}{\left (c + d x \right )}\right )^{2}}\, dx \] Input:
integrate(1/(a+b*sech(d*x+c))**2,x)
Output:
Integral((a + b*sech(c + d*x))**(-2), x)
Exception generated. \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(1/(a+b*sech(d*x+c))^2,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.11 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.23 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=-\frac {\frac {2 \, {\left (2 \, a^{2} b - b^{3}\right )} \arctan \left (\frac {a e^{\left (d x + c\right )} + b}{\sqrt {a^{2} - b^{2}}}\right )}{{\left (a^{4} - a^{2} b^{2}\right )} \sqrt {a^{2} - b^{2}}} + \frac {2 \, {\left (b^{3} e^{\left (d x + c\right )} + a b^{2}\right )}}{{\left (a^{4} - a^{2} b^{2}\right )} {\left (a e^{\left (2 \, d x + 2 \, c\right )} + 2 \, b e^{\left (d x + c\right )} + a\right )}} - \frac {d x + c}{a^{2}}}{d} \] Input:
integrate(1/(a+b*sech(d*x+c))^2,x, algorithm="giac")
Output:
-(2*(2*a^2*b - b^3)*arctan((a*e^(d*x + c) + b)/sqrt(a^2 - b^2))/((a^4 - a^ 2*b^2)*sqrt(a^2 - b^2)) + 2*(b^3*e^(d*x + c) + a*b^2)/((a^4 - a^2*b^2)*(a* e^(2*d*x + 2*c) + 2*b*e^(d*x + c) + a)) - (d*x + c)/a^2)/d
Time = 2.70 (sec) , antiderivative size = 296, normalized size of antiderivative = 2.72 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\frac {\frac {2\,b^2}{d\,\left (a\,b^2-a^3\right )}+\frac {2\,b^3\,{\mathrm {e}}^{c+d\,x}}{a\,d\,\left (a\,b^2-a^3\right )}}{a+2\,b\,{\mathrm {e}}^{c+d\,x}+a\,{\mathrm {e}}^{2\,c+2\,d\,x}}+\frac {x}{a^2}+\frac {b\,\ln \left (\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (2\,a^2\,b-b^3\right )}{a^3\,\left (a^2-b^2\right )}-\frac {2\,b\,\left (2\,a^2-b^2\right )\,\left (a+b\,{\mathrm {e}}^{c+d\,x}\right )}{a^3\,{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}\right )\,\left (2\,a^2-b^2\right )}{a^2\,d\,{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}-\frac {b\,\ln \left (\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (2\,a^2\,b-b^3\right )}{a^3\,\left (a^2-b^2\right )}+\frac {2\,b\,\left (2\,a^2-b^2\right )\,\left (a+b\,{\mathrm {e}}^{c+d\,x}\right )}{a^3\,{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}}\right )\,\left (2\,a^2-b^2\right )}{a^2\,d\,{\left (a+b\right )}^{3/2}\,{\left (b-a\right )}^{3/2}} \] Input:
int(1/(a + b/cosh(c + d*x))^2,x)
Output:
((2*b^2)/(d*(a*b^2 - a^3)) + (2*b^3*exp(c + d*x))/(a*d*(a*b^2 - a^3)))/(a + 2*b*exp(c + d*x) + a*exp(2*c + 2*d*x)) + x/a^2 + (b*log((2*exp(c + d*x)* (2*a^2*b - b^3))/(a^3*(a^2 - b^2)) - (2*b*(2*a^2 - b^2)*(a + b*exp(c + d*x )))/(a^3*(a + b)^(3/2)*(b - a)^(3/2)))*(2*a^2 - b^2))/(a^2*d*(a + b)^(3/2) *(b - a)^(3/2)) - (b*log((2*exp(c + d*x)*(2*a^2*b - b^3))/(a^3*(a^2 - b^2) ) + (2*b*(2*a^2 - b^2)*(a + b*exp(c + d*x)))/(a^3*(a + b)^(3/2)*(b - a)^(3 /2)))*(2*a^2 - b^2))/(a^2*d*(a + b)^(3/2)*(b - a)^(3/2))
Time = 0.21 (sec) , antiderivative size = 563, normalized size of antiderivative = 5.17 \[ \int \frac {1}{(a+b \text {sech}(c+d x))^2} \, dx=\frac {-4 e^{2 d x +2 c} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{3} b +2 e^{2 d x +2 c} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) a \,b^{3}-8 e^{d x +c} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{2} b^{2}+4 e^{d x +c} \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) b^{4}-4 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) a^{3} b +2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} a +b}{\sqrt {a^{2}-b^{2}}}\right ) a \,b^{3}+e^{2 d x +2 c} a^{5} d x -2 e^{2 d x +2 c} a^{3} b^{2} d x +e^{2 d x +2 c} a^{3} b^{2}+e^{2 d x +2 c} a \,b^{4} d x -e^{2 d x +2 c} a \,b^{4}+2 e^{d x +c} a^{4} b d x -4 e^{d x +c} a^{2} b^{3} d x +2 e^{d x +c} b^{5} d x +a^{5} d x -2 a^{3} b^{2} d x -a^{3} b^{2}+a \,b^{4} d x +a \,b^{4}}{a^{2} d \left (e^{2 d x +2 c} a^{5}-2 e^{2 d x +2 c} a^{3} b^{2}+e^{2 d x +2 c} a \,b^{4}+2 e^{d x +c} a^{4} b -4 e^{d x +c} a^{2} b^{3}+2 e^{d x +c} b^{5}+a^{5}-2 a^{3} b^{2}+a \,b^{4}\right )} \] Input:
int(1/(a+b*sech(d*x+c))^2,x)
Output:
( - 4*e**(2*c + 2*d*x)*sqrt(a**2 - b**2)*atan((e**(c + d*x)*a + b)/sqrt(a* *2 - b**2))*a**3*b + 2*e**(2*c + 2*d*x)*sqrt(a**2 - b**2)*atan((e**(c + d* x)*a + b)/sqrt(a**2 - b**2))*a*b**3 - 8*e**(c + d*x)*sqrt(a**2 - b**2)*ata n((e**(c + d*x)*a + b)/sqrt(a**2 - b**2))*a**2*b**2 + 4*e**(c + d*x)*sqrt( a**2 - b**2)*atan((e**(c + d*x)*a + b)/sqrt(a**2 - b**2))*b**4 - 4*sqrt(a* *2 - b**2)*atan((e**(c + d*x)*a + b)/sqrt(a**2 - b**2))*a**3*b + 2*sqrt(a* *2 - b**2)*atan((e**(c + d*x)*a + b)/sqrt(a**2 - b**2))*a*b**3 + e**(2*c + 2*d*x)*a**5*d*x - 2*e**(2*c + 2*d*x)*a**3*b**2*d*x + e**(2*c + 2*d*x)*a** 3*b**2 + e**(2*c + 2*d*x)*a*b**4*d*x - e**(2*c + 2*d*x)*a*b**4 + 2*e**(c + d*x)*a**4*b*d*x - 4*e**(c + d*x)*a**2*b**3*d*x + 2*e**(c + d*x)*b**5*d*x + a**5*d*x - 2*a**3*b**2*d*x - a**3*b**2 + a*b**4*d*x + a*b**4)/(a**2*d*(e **(2*c + 2*d*x)*a**5 - 2*e**(2*c + 2*d*x)*a**3*b**2 + e**(2*c + 2*d*x)*a*b **4 + 2*e**(c + d*x)*a**4*b - 4*e**(c + d*x)*a**2*b**3 + 2*e**(c + d*x)*b* *5 + a**5 - 2*a**3*b**2 + a*b**4))