\(\int e^x \text {sech}^2(2 x) \, dx\) [277]

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

Optimal result

Integrand size = 10, antiderivative size = 86 \[ \int e^x \text {sech}^2(2 x) \, dx=-\frac {e^x}{1+e^{4 x}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{2 \sqrt {2}}+\frac {\arctan \left (1+\sqrt {2} e^x\right )}{2 \sqrt {2}}+\frac {\text {arctanh}\left (\frac {\sqrt {2} e^x}{1+e^{2 x}}\right )}{2 \sqrt {2}} \] Output:

-exp(x)/(1+exp(4*x))+1/4*arctan(-1+2^(1/2)*exp(x))*2^(1/2)+1/4*arctan(1+2^ 
(1/2)*exp(x))*2^(1/2)+1/4*arctanh(2^(1/2)*exp(x)/(1+exp(2*x)))*2^(1/2)
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.23 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {1}{8} \left (-\frac {8 e^x}{1+e^{4 x}}-2 \sqrt {2} \arctan \left (1-\sqrt {2} e^x\right )+2 \sqrt {2} \arctan \left (1+\sqrt {2} e^x\right )-\sqrt {2} \log \left (1-\sqrt {2} e^x+e^{2 x}\right )+\sqrt {2} \log \left (1+\sqrt {2} e^x+e^{2 x}\right )\right ) \] Input:

Integrate[E^x*Sech[2*x]^2,x]
 

Output:

((-8*E^x)/(1 + E^(4*x)) - 2*Sqrt[2]*ArcTan[1 - Sqrt[2]*E^x] + 2*Sqrt[2]*Ar 
cTan[1 + Sqrt[2]*E^x] - Sqrt[2]*Log[1 - Sqrt[2]*E^x + E^(2*x)] + Sqrt[2]*L 
og[1 + Sqrt[2]*E^x + E^(2*x)])/8
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.45, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.100, Rules used = {2720, 27, 817, 755, 1476, 1082, 217, 1479, 25, 27, 1103}

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 \text {sech}^2(2 x) \, dx\)

\(\Big \downarrow \) 2720

\(\displaystyle \int \frac {4 e^{4 x}}{\left (e^{4 x}+1\right )^2}de^x\)

\(\Big \downarrow \) 27

\(\displaystyle 4 \int \frac {e^{4 x}}{\left (1+e^{4 x}\right )^2}de^x\)

\(\Big \downarrow \) 817

\(\displaystyle 4 \left (\frac {1}{4} \int \frac {1}{1+e^{4 x}}de^x-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 755

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \int \frac {1-e^{2 x}}{1+e^{4 x}}de^x+\frac {1}{2} \int \frac {1+e^{2 x}}{1+e^{4 x}}de^x\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 1476

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (\frac {1}{2} \int \frac {1}{1-\sqrt {2} e^x+e^{2 x}}de^x+\frac {1}{2} \int \frac {1}{1+\sqrt {2} e^x+e^{2 x}}de^x\right )+\frac {1}{2} \int \frac {1-e^{2 x}}{1+e^{4 x}}de^x\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 1082

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (\frac {\int \frac {1}{-1-e^{2 x}}d\left (1-\sqrt {2} e^x\right )}{\sqrt {2}}-\frac {\int \frac {1}{-1-e^{2 x}}d\left (1+\sqrt {2} e^x\right )}{\sqrt {2}}\right )+\frac {1}{2} \int \frac {1-e^{2 x}}{1+e^{4 x}}de^x\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 217

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \int \frac {1-e^{2 x}}{1+e^{4 x}}de^x+\frac {1}{2} \left (\frac {\arctan \left (\sqrt {2} e^x+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{\sqrt {2}}\right )\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 1479

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (-\frac {\int -\frac {\sqrt {2}-2 e^x}{1-\sqrt {2} e^x+e^{2 x}}de^x}{2 \sqrt {2}}-\frac {\int -\frac {\sqrt {2} \left (1+\sqrt {2} e^x\right )}{1+\sqrt {2} e^x+e^{2 x}}de^x}{2 \sqrt {2}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\sqrt {2} e^x+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{\sqrt {2}}\right )\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (\frac {\int \frac {\sqrt {2}-2 e^x}{1-\sqrt {2} e^x+e^{2 x}}de^x}{2 \sqrt {2}}+\frac {\int \frac {\sqrt {2} \left (1+\sqrt {2} e^x\right )}{1+\sqrt {2} e^x+e^{2 x}}de^x}{2 \sqrt {2}}\right )+\frac {1}{2} \left (\frac {\arctan \left (\sqrt {2} e^x+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{\sqrt {2}}\right )\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 27

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (\frac {\int \frac {\sqrt {2}-2 e^x}{1-\sqrt {2} e^x+e^{2 x}}de^x}{2 \sqrt {2}}+\frac {1}{2} \int \frac {1+\sqrt {2} e^x}{1+\sqrt {2} e^x+e^{2 x}}de^x\right )+\frac {1}{2} \left (\frac {\arctan \left (\sqrt {2} e^x+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{\sqrt {2}}\right )\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

\(\Big \downarrow \) 1103

\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{2} \left (\frac {\arctan \left (\sqrt {2} e^x+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} e^x\right )}{\sqrt {2}}\right )+\frac {1}{2} \left (\frac {\log \left (\sqrt {2} e^x+e^{2 x}+1\right )}{2 \sqrt {2}}-\frac {\log \left (-\sqrt {2} e^x+e^{2 x}+1\right )}{2 \sqrt {2}}\right )\right )-\frac {e^x}{4 \left (e^{4 x}+1\right )}\right )\)

Input:

Int[E^x*Sech[2*x]^2,x]
 

Output:

4*(-1/4*E^x/(1 + E^(4*x)) + ((-(ArcTan[1 - Sqrt[2]*E^x]/Sqrt[2]) + ArcTan[ 
1 + Sqrt[2]*E^x]/Sqrt[2])/2 + (-1/2*Log[1 - Sqrt[2]*E^x + E^(2*x)]/Sqrt[2] 
 + Log[1 + Sqrt[2]*E^x + E^(2*x)]/(2*Sqrt[2]))/2)/4)
 

Defintions of rubi rules used

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

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

rule 755
Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[a/b, 2] 
], s = Denominator[Rt[a/b, 2]]}, Simp[1/(2*r)   Int[(r - s*x^2)/(a + b*x^4) 
, x], x] + Simp[1/(2*r)   Int[(r + s*x^2)/(a + b*x^4), x], x]] /; FreeQ[{a, 
 b}, x] && (GtQ[a/b, 0] || (PosQ[a/b] && AtomQ[SplitProduct[SumBaseQ, a]] & 
& AtomQ[SplitProduct[SumBaseQ, b]]))
 

rule 817
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^( 
n - 1)*(c*x)^(m - n + 1)*((a + b*x^n)^(p + 1)/(b*n*(p + 1))), x] - Simp[c^n 
*((m - n + 1)/(b*n*(p + 1)))   Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x], x 
] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  ! 
ILtQ[(m + n*(p + 1) + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]
 

rule 1082
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*S 
implify[a*(c/b^2)]}, Simp[-2/b   Subst[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b 
)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /; Fre 
eQ[{a, b, c}, x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[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 1476
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 
2*(d/e), 2]}, Simp[e/(2*c)   Int[1/Simp[d/e + q*x + x^2, x], x], x] + Simp[ 
e/(2*c)   Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e}, x] 
 && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]
 

rule 1479
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 
-2*(d/e), 2]}, Simp[e/(2*c*q)   Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], 
 x] + Simp[e/(2*c*q)   Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /; F 
reeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 1.35 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.42

method result size
risch \(-\frac {{\mathrm e}^{x}}{1+{\mathrm e}^{4 x}}+4 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (65536 \textit {\_Z}^{4}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{x}+16 \textit {\_R} \right )\right )\) \(36\)
default \(\frac {-\tanh \left (\frac {x}{2}\right )^{3}-3 \tanh \left (\frac {x}{2}\right )^{2}+\tanh \left (\frac {x}{2}\right )-1}{\tanh \left (\frac {x}{2}\right )^{4}+6 \tanh \left (\frac {x}{2}\right )^{2}+1}+\frac {\sqrt {2}\, \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+3+2 \sqrt {2}\right )}{8}+\frac {\left (2+\sqrt {2}\right ) \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{2+2 \sqrt {2}}\right )}{4+4 \sqrt {2}}-\frac {\sqrt {2}\, \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+3-2 \sqrt {2}\right )}{8}-\frac {\left (\sqrt {2}-2\right ) \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{2 \sqrt {2}-2}\right )}{2 \left (2 \sqrt {2}-2\right )}\) \(148\)

Input:

int(exp(x)*sech(2*x)^2,x,method=_RETURNVERBOSE)
 

Output:

-exp(x)/(1+exp(4*x))+4*sum(_R*ln(exp(x)+16*_R),_R=RootOf(65536*_Z^4+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 345 vs. \(2 (61) = 122\).

Time = 0.10 (sec) , antiderivative size = 345, normalized size of antiderivative = 4.01 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {2 \, {\left (\sqrt {2} \cosh \left (x\right )^{4} + 4 \, \sqrt {2} \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \sqrt {2} \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sqrt {2} \sinh \left (x\right )^{4} + \sqrt {2}\right )} \arctan \left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right ) + 1\right ) + 2 \, {\left (\sqrt {2} \cosh \left (x\right )^{4} + 4 \, \sqrt {2} \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \sqrt {2} \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sqrt {2} \sinh \left (x\right )^{4} + \sqrt {2}\right )} \arctan \left (\sqrt {2} \cosh \left (x\right ) + \sqrt {2} \sinh \left (x\right ) - 1\right ) + {\left (\sqrt {2} \cosh \left (x\right )^{4} + 4 \, \sqrt {2} \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \sqrt {2} \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sqrt {2} \sinh \left (x\right )^{4} + \sqrt {2}\right )} \log \left (\frac {\sqrt {2} + 2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - {\left (\sqrt {2} \cosh \left (x\right )^{4} + 4 \, \sqrt {2} \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \sqrt {2} \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \sqrt {2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sqrt {2} \sinh \left (x\right )^{4} + \sqrt {2}\right )} \log \left (-\frac {\sqrt {2} - 2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - 8 \, \cosh \left (x\right ) - 8 \, \sinh \left (x\right )}{8 \, {\left (\cosh \left (x\right )^{4} + 4 \, \cosh \left (x\right )^{3} \sinh \left (x\right ) + 6 \, \cosh \left (x\right )^{2} \sinh \left (x\right )^{2} + 4 \, \cosh \left (x\right ) \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} + 1\right )}} \] Input:

integrate(exp(x)*sech(2*x)^2,x, algorithm="fricas")
 

Output:

1/8*(2*(sqrt(2)*cosh(x)^4 + 4*sqrt(2)*cosh(x)^3*sinh(x) + 6*sqrt(2)*cosh(x 
)^2*sinh(x)^2 + 4*sqrt(2)*cosh(x)*sinh(x)^3 + sqrt(2)*sinh(x)^4 + sqrt(2)) 
*arctan(sqrt(2)*cosh(x) + sqrt(2)*sinh(x) + 1) + 2*(sqrt(2)*cosh(x)^4 + 4* 
sqrt(2)*cosh(x)^3*sinh(x) + 6*sqrt(2)*cosh(x)^2*sinh(x)^2 + 4*sqrt(2)*cosh 
(x)*sinh(x)^3 + sqrt(2)*sinh(x)^4 + sqrt(2))*arctan(sqrt(2)*cosh(x) + sqrt 
(2)*sinh(x) - 1) + (sqrt(2)*cosh(x)^4 + 4*sqrt(2)*cosh(x)^3*sinh(x) + 6*sq 
rt(2)*cosh(x)^2*sinh(x)^2 + 4*sqrt(2)*cosh(x)*sinh(x)^3 + sqrt(2)*sinh(x)^ 
4 + sqrt(2))*log((sqrt(2) + 2*cosh(x))/(cosh(x) - sinh(x))) - (sqrt(2)*cos 
h(x)^4 + 4*sqrt(2)*cosh(x)^3*sinh(x) + 6*sqrt(2)*cosh(x)^2*sinh(x)^2 + 4*s 
qrt(2)*cosh(x)*sinh(x)^3 + sqrt(2)*sinh(x)^4 + sqrt(2))*log(-(sqrt(2) - 2* 
cosh(x))/(cosh(x) - sinh(x))) - 8*cosh(x) - 8*sinh(x))/(cosh(x)^4 + 4*cosh 
(x)^3*sinh(x) + 6*cosh(x)^2*sinh(x)^2 + 4*cosh(x)*sinh(x)^3 + sinh(x)^4 + 
1)
 

Sympy [F]

\[ \int e^x \text {sech}^2(2 x) \, dx=\int e^{x} \operatorname {sech}^{2}{\left (2 x \right )}\, dx \] Input:

integrate(exp(x)*sech(2*x)**2,x)
 

Output:

Integral(exp(x)*sech(2*x)**2, x)
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.02 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {1}{4} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, e^{x}\right )}\right ) + \frac {1}{4} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, e^{x}\right )}\right ) + \frac {1}{8} \, \sqrt {2} \log \left (\sqrt {2} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {1}{8} \, \sqrt {2} \log \left (-\sqrt {2} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {e^{x}}{e^{\left (4 \, x\right )} + 1} \] Input:

integrate(exp(x)*sech(2*x)^2,x, algorithm="maxima")
 

Output:

1/4*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2*e^x)) + 1/4*sqrt(2)*arctan(-1/ 
2*sqrt(2)*(sqrt(2) - 2*e^x)) + 1/8*sqrt(2)*log(sqrt(2)*e^x + e^(2*x) + 1) 
- 1/8*sqrt(2)*log(-sqrt(2)*e^x + e^(2*x) + 1) - e^x/(e^(4*x) + 1)
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.02 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {1}{4} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, e^{x}\right )}\right ) + \frac {1}{4} \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, e^{x}\right )}\right ) + \frac {1}{8} \, \sqrt {2} \log \left (\sqrt {2} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {1}{8} \, \sqrt {2} \log \left (-\sqrt {2} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {e^{x}}{e^{\left (4 \, x\right )} + 1} \] Input:

integrate(exp(x)*sech(2*x)^2,x, algorithm="giac")
 

Output:

1/4*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2) + 2*e^x)) + 1/4*sqrt(2)*arctan(-1/ 
2*sqrt(2)*(sqrt(2) - 2*e^x)) + 1/8*sqrt(2)*log(sqrt(2)*e^x + e^(2*x) + 1) 
- 1/8*sqrt(2)*log(-sqrt(2)*e^x + e^(2*x) + 1) - e^x/(e^(4*x) + 1)
 

Mupad [B] (verification not implemented)

Time = 2.28 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.99 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,\left ({\mathrm {e}}^x-\frac {\sqrt {2}}{2}\right )\right )}{4}-\frac {{\mathrm {e}}^x}{{\mathrm {e}}^{4\,x}+1}+\frac {\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,\left ({\mathrm {e}}^x+\frac {\sqrt {2}}{2}\right )\right )}{4}-\frac {\sqrt {2}\,\ln \left ({\left ({\mathrm {e}}^x-\frac {\sqrt {2}}{2}\right )}^2+\frac {1}{2}\right )}{8}+\frac {\sqrt {2}\,\ln \left ({\left ({\mathrm {e}}^x+\frac {\sqrt {2}}{2}\right )}^2+\frac {1}{2}\right )}{8} \] Input:

int(exp(x)/cosh(2*x)^2,x)
 

Output:

(2^(1/2)*atan(2^(1/2)*(exp(x) - 2^(1/2)/2)))/4 - exp(x)/(exp(4*x) + 1) + ( 
2^(1/2)*atan(2^(1/2)*(exp(x) + 2^(1/2)/2)))/4 - (2^(1/2)*log((exp(x) - 2^( 
1/2)/2)^2 + 1/2))/8 + (2^(1/2)*log((exp(x) + 2^(1/2)/2)^2 + 1/2))/8
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 186, normalized size of antiderivative = 2.16 \[ \int e^x \text {sech}^2(2 x) \, dx=\frac {2 e^{4 x} \sqrt {2}\, \mathit {atan} \left (\frac {2 e^{x}-\sqrt {2}}{\sqrt {2}}\right )+2 \sqrt {2}\, \mathit {atan} \left (\frac {2 e^{x}-\sqrt {2}}{\sqrt {2}}\right )+2 e^{4 x} \sqrt {2}\, \mathit {atan} \left (\frac {2 e^{x}+\sqrt {2}}{\sqrt {2}}\right )+2 \sqrt {2}\, \mathit {atan} \left (\frac {2 e^{x}+\sqrt {2}}{\sqrt {2}}\right )-e^{4 x} \sqrt {2}\, \mathrm {log}\left (e^{2 x}-e^{x} \sqrt {2}+1\right )+e^{4 x} \sqrt {2}\, \mathrm {log}\left (e^{2 x}+e^{x} \sqrt {2}+1\right )-8 e^{x}-\sqrt {2}\, \mathrm {log}\left (e^{2 x}-e^{x} \sqrt {2}+1\right )+\sqrt {2}\, \mathrm {log}\left (e^{2 x}+e^{x} \sqrt {2}+1\right )}{8 e^{4 x}+8} \] Input:

int(exp(x)*sech(2*x)^2,x)
 

Output:

(2*e**(4*x)*sqrt(2)*atan((2*e**x - sqrt(2))/sqrt(2)) + 2*sqrt(2)*atan((2*e 
**x - sqrt(2))/sqrt(2)) + 2*e**(4*x)*sqrt(2)*atan((2*e**x + sqrt(2))/sqrt( 
2)) + 2*sqrt(2)*atan((2*e**x + sqrt(2))/sqrt(2)) - e**(4*x)*sqrt(2)*log(e* 
*(2*x) - e**x*sqrt(2) + 1) + e**(4*x)*sqrt(2)*log(e**(2*x) + e**x*sqrt(2) 
+ 1) - 8*e**x - sqrt(2)*log(e**(2*x) - e**x*sqrt(2) + 1) + sqrt(2)*log(e** 
(2*x) + e**x*sqrt(2) + 1))/(8*(e**(4*x) + 1))