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

Optimal result
Mathematica [C] (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 = 85 \[ \int e^x \text {sech}^2(3 x) \, dx=-\frac {2 e^x}{3 \left (1+e^{6 x}\right )}+\frac {2 \arctan \left (e^x\right )}{9}-\frac {1}{9} \arctan \left (\sqrt {3}-2 e^x\right )+\frac {1}{9} \arctan \left (\sqrt {3}+2 e^x\right )+\frac {\text {arctanh}\left (\frac {\sqrt {3} e^x}{1+e^{2 x}}\right )}{3 \sqrt {3}} \] Output:

-2*exp(x)/(3+3*exp(6*x))+2/9*arctan(exp(x))+1/9*arctan(-3^(1/2)+2*exp(x))+ 
1/9*arctan(3^(1/2)+2*exp(x))+1/9*arctanh(3^(1/2)*exp(x)/(1+exp(2*x)))*3^(1 
/2)
 

Mathematica [C] (verified)

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

Time = 0.02 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.40 \[ \int e^x \text {sech}^2(3 x) \, dx=\frac {2}{3} e^x \left (-\frac {1}{1+e^{6 x}}+\operatorname {Hypergeometric2F1}\left (\frac {1}{6},1,\frac {7}{6},-e^{6 x}\right )\right ) \] Input:

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

Output:

(2*E^x*(-(1 + E^(6*x))^(-1) + Hypergeometric2F1[1/6, 1, 7/6, -E^(6*x)]))/3
 

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.42, 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, 753, 27, 216, 1142, 25, 1083, 217, 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(3 x) \, dx\)

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 817

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

\(\Big \downarrow \) 753

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 216

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

\(\Big \downarrow \) 1142

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

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

\(\Big \downarrow \) 1103

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

Input:

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

Output:

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

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 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

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 753
Int[((a_) + (b_.)*(x_)^(n_))^(-1), x_Symbol] :> Module[{r = Numerator[Rt[a/ 
b, n]], s = Denominator[Rt[a/b, n]], k, u, v}, Simp[u = Int[(r - s*Cos[(2*k 
 - 1)*(Pi/n)]*x)/(r^2 - 2*r*s*Cos[(2*k - 1)*(Pi/n)]*x + s^2*x^2), x] + Int[ 
(r + s*Cos[(2*k - 1)*(Pi/n)]*x)/(r^2 + 2*r*s*Cos[(2*k - 1)*(Pi/n)]*x + s^2* 
x^2), x]; 2*(r^2/(a*n))   Int[1/(r^2 + s^2*x^2), x] + 2*(r/(a*n))   Sum[u, 
{k, 1, (n - 2)/4}], x]] /; FreeQ[{a, b}, x] && IGtQ[(n - 2)/4, 0] && PosQ[a 
/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 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{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 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 

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.46 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.69

method result size
risch \(-\frac {2 \,{\mathrm e}^{x}}{3 \left ({\mathrm e}^{6 x}+1\right )}+\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{9}-\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{9}+4 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (1679616 \textit {\_Z}^{4}-1296 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{x}+36 \textit {\_R} \right )\right )\) \(59\)
default \(\frac {-\frac {4 \tanh \left (\frac {x}{2}\right )^{3}}{3}-\frac {28 \tanh \left (\frac {x}{2}\right )^{2}}{9}+\frac {4 \tanh \left (\frac {x}{2}\right )}{3}-\frac {4}{9}}{\tanh \left (\frac {x}{2}\right )^{4}+14 \tanh \left (\frac {x}{2}\right )^{2}+1}+\frac {\sqrt {3}\, \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+7+4 \sqrt {3}\right )}{18}+\frac {2 \left (2+\sqrt {3}\right ) \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{4+2 \sqrt {3}}\right )}{9 \left (4+2 \sqrt {3}\right )}-\frac {\sqrt {3}\, \ln \left (\tanh \left (\frac {x}{2}\right )^{2}+7-4 \sqrt {3}\right )}{18}-\frac {2 \left (\sqrt {3}-2\right ) \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{4-2 \sqrt {3}}\right )}{9 \left (4-2 \sqrt {3}\right )}-\frac {2}{9 \left (\tanh \left (\frac {x}{2}\right )^{2}+1\right )}+\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{9}\) \(167\)

Input:

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

Output:

-2/3*exp(x)/(exp(6*x)+1)+1/9*I*ln(exp(x)+I)-1/9*I*ln(exp(x)-I)+4*sum(_R*ln 
(exp(x)+36*_R),_R=RootOf(1679616*_Z^4-1296*_Z^2+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 481 vs. \(2 (62) = 124\).

Time = 0.09 (sec) , antiderivative size = 481, normalized size of antiderivative = 5.66 \[ \int e^x \text {sech}^2(3 x) \, dx =\text {Too large to display} \] Input:

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

Output:

1/18*(2*(cosh(x)^6 + 6*cosh(x)^5*sinh(x) + 15*cosh(x)^4*sinh(x)^2 + 20*cos 
h(x)^3*sinh(x)^3 + 15*cosh(x)^2*sinh(x)^4 + 6*cosh(x)*sinh(x)^5 + sinh(x)^ 
6 + 1)*arctan(sqrt(3) + 2*cosh(x) + 2*sinh(x)) + 2*(cosh(x)^6 + 6*cosh(x)^ 
5*sinh(x) + 15*cosh(x)^4*sinh(x)^2 + 20*cosh(x)^3*sinh(x)^3 + 15*cosh(x)^2 
*sinh(x)^4 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 1)*arctan(-sqrt(3) + 2*cosh 
(x) + 2*sinh(x)) + 4*(cosh(x)^6 + 6*cosh(x)^5*sinh(x) + 15*cosh(x)^4*sinh( 
x)^2 + 20*cosh(x)^3*sinh(x)^3 + 15*cosh(x)^2*sinh(x)^4 + 6*cosh(x)*sinh(x) 
^5 + sinh(x)^6 + 1)*arctan(cosh(x) + sinh(x)) + (sqrt(3)*cosh(x)^6 + 6*sqr 
t(3)*cosh(x)^5*sinh(x) + 15*sqrt(3)*cosh(x)^4*sinh(x)^2 + 20*sqrt(3)*cosh( 
x)^3*sinh(x)^3 + 15*sqrt(3)*cosh(x)^2*sinh(x)^4 + 6*sqrt(3)*cosh(x)*sinh(x 
)^5 + sqrt(3)*sinh(x)^6 + sqrt(3))*log((sqrt(3) + 2*cosh(x))/(cosh(x) - si 
nh(x))) - (sqrt(3)*cosh(x)^6 + 6*sqrt(3)*cosh(x)^5*sinh(x) + 15*sqrt(3)*co 
sh(x)^4*sinh(x)^2 + 20*sqrt(3)*cosh(x)^3*sinh(x)^3 + 15*sqrt(3)*cosh(x)^2* 
sinh(x)^4 + 6*sqrt(3)*cosh(x)*sinh(x)^5 + sqrt(3)*sinh(x)^6 + sqrt(3))*log 
(-(sqrt(3) - 2*cosh(x))/(cosh(x) - sinh(x))) - 12*cosh(x) - 12*sinh(x))/(c 
osh(x)^6 + 6*cosh(x)^5*sinh(x) + 15*cosh(x)^4*sinh(x)^2 + 20*cosh(x)^3*sin 
h(x)^3 + 15*cosh(x)^2*sinh(x)^4 + 6*cosh(x)*sinh(x)^5 + sinh(x)^6 + 1)
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.93 \[ \int e^x \text {sech}^2(3 x) \, dx=\frac {1}{18} \, \sqrt {3} \log \left (\sqrt {3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {1}{18} \, \sqrt {3} \log \left (-\sqrt {3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} + 1\right )}} + \frac {1}{9} \, \arctan \left (\sqrt {3} + 2 \, e^{x}\right ) + \frac {1}{9} \, \arctan \left (-\sqrt {3} + 2 \, e^{x}\right ) + \frac {2}{9} \, \arctan \left (e^{x}\right ) \] Input:

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

Output:

1/18*sqrt(3)*log(sqrt(3)*e^x + e^(2*x) + 1) - 1/18*sqrt(3)*log(-sqrt(3)*e^ 
x + e^(2*x) + 1) - 2/3*e^x/(e^(6*x) + 1) + 1/9*arctan(sqrt(3) + 2*e^x) + 1 
/9*arctan(-sqrt(3) + 2*e^x) + 2/9*arctan(e^x)
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.93 \[ \int e^x \text {sech}^2(3 x) \, dx=\frac {1}{18} \, \sqrt {3} \log \left (\sqrt {3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {1}{18} \, \sqrt {3} \log \left (-\sqrt {3} e^{x} + e^{\left (2 \, x\right )} + 1\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} + 1\right )}} + \frac {1}{9} \, \arctan \left (\sqrt {3} + 2 \, e^{x}\right ) + \frac {1}{9} \, \arctan \left (-\sqrt {3} + 2 \, e^{x}\right ) + \frac {2}{9} \, \arctan \left (e^{x}\right ) \] Input:

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

Output:

1/18*sqrt(3)*log(sqrt(3)*e^x + e^(2*x) + 1) - 1/18*sqrt(3)*log(-sqrt(3)*e^ 
x + e^(2*x) + 1) - 2/3*e^x/(e^(6*x) + 1) + 1/9*arctan(sqrt(3) + 2*e^x) + 1 
/9*arctan(-sqrt(3) + 2*e^x) + 2/9*arctan(e^x)
 

Mupad [B] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.99 \[ \int e^x \text {sech}^2(3 x) \, dx=\frac {2\,\mathrm {atan}\left ({\mathrm {e}}^x\right )}{9}+\frac {\mathrm {atan}\left (2\,{\mathrm {e}}^x+\sqrt {3}\right )}{9}+\frac {\mathrm {atan}\left (2\,{\mathrm {e}}^x-\sqrt {3}\right )}{9}-\frac {2\,{\mathrm {e}}^x}{3\,\left ({\mathrm {e}}^{6\,x}+1\right )}-\frac {\sqrt {3}\,\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}-\frac {\sqrt {3}}{3}\right )}^2+\frac {1}{9}\right )}{18}+\frac {\sqrt {3}\,\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}+\frac {\sqrt {3}}{3}\right )}^2+\frac {1}{9}\right )}{18} \] Input:

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

Output:

(2*atan(exp(x)))/9 + atan(2*exp(x) + 3^(1/2))/9 + atan(2*exp(x) - 3^(1/2)) 
/9 - (2*exp(x))/(3*(exp(6*x) + 1)) - (3^(1/2)*log(((2*exp(x))/3 - 3^(1/2)/ 
3)^2 + 1/9))/18 + (3^(1/2)*log(((2*exp(x))/3 + 3^(1/2)/3)^2 + 1/9))/18
 

Reduce [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 175, normalized size of antiderivative = 2.06 \[ \int e^x \text {sech}^2(3 x) \, dx=\frac {4 e^{6 x} \mathit {atan} \left (e^{x}\right )+4 \mathit {atan} \left (e^{x}\right )+2 e^{6 x} \mathit {atan} \left (2 e^{x}-\sqrt {3}\right )+2 \mathit {atan} \left (2 e^{x}-\sqrt {3}\right )+2 e^{6 x} \mathit {atan} \left (2 e^{x}+\sqrt {3}\right )+2 \mathit {atan} \left (2 e^{x}+\sqrt {3}\right )-e^{6 x} \sqrt {3}\, \mathrm {log}\left (e^{2 x}-e^{x} \sqrt {3}+1\right )+e^{6 x} \sqrt {3}\, \mathrm {log}\left (e^{2 x}+e^{x} \sqrt {3}+1\right )-12 e^{x}-\sqrt {3}\, \mathrm {log}\left (e^{2 x}-e^{x} \sqrt {3}+1\right )+\sqrt {3}\, \mathrm {log}\left (e^{2 x}+e^{x} \sqrt {3}+1\right )}{18 e^{6 x}+18} \] Input:

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

Output:

(4*e**(6*x)*atan(e**x) + 4*atan(e**x) + 2*e**(6*x)*atan(2*e**x - sqrt(3)) 
+ 2*atan(2*e**x - sqrt(3)) + 2*e**(6*x)*atan(2*e**x + sqrt(3)) + 2*atan(2* 
e**x + sqrt(3)) - e**(6*x)*sqrt(3)*log(e**(2*x) - e**x*sqrt(3) + 1) + e**( 
6*x)*sqrt(3)*log(e**(2*x) + e**x*sqrt(3) + 1) - 12*e**x - sqrt(3)*log(e**( 
2*x) - e**x*sqrt(3) + 1) + sqrt(3)*log(e**(2*x) + e**x*sqrt(3) + 1))/(18*( 
e**(6*x) + 1))