3.220 \(\int e^x \coth (3 x) \, dx\)

Optimal. Leaf size=85 \[ e^x+\frac{1}{6} \log \left (-e^x+e^{2 x}+1\right )-\frac{1}{6} \log \left (e^x+e^{2 x}+1\right )+\frac{\tan ^{-1}\left (\frac{1-2 e^x}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{\tan ^{-1}\left (\frac{2 e^x+1}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{2}{3} \tanh ^{-1}\left (e^x\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.122385, antiderivative size = 85, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 8, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1., Rules used = {2282, 388, 210, 634, 618, 204, 628, 206} \[ e^x+\frac{1}{6} \log \left (-e^x+e^{2 x}+1\right )-\frac{1}{6} \log \left (e^x+e^{2 x}+1\right )+\frac{\tan ^{-1}\left (\frac{1-2 e^x}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{\tan ^{-1}\left (\frac{2 e^x+1}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{2}{3} \tanh ^{-1}\left (e^x\right ) \]

Antiderivative was successfully verified.

[In]

Int[E^x*Coth[3*x],x]

[Out]

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

Rule 2282

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 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 210

Int[((a_) + (b_.)*(x_)^(n_))^(-1), x_Symbol] :> Module[{r = Numerator[Rt[-(a/b), n]], s = Denominator[Rt[-(a/b
), n]], k, u}, Simp[u = Int[(r - s*Cos[(2*k*Pi)/n]*x)/(r^2 - 2*r*s*Cos[(2*k*Pi)/n]*x + s^2*x^2), x] + Int[(r +
 s*Cos[(2*k*Pi)/n]*x)/(r^2 + 2*r*s*Cos[(2*k*Pi)/n]*x + s^2*x^2), x]; (2*r^2*Int[1/(r^2 - s^2*x^2), x])/(a*n) +
 Dist[(2*r)/(a*n), Sum[u, {k, 1, (n - 2)/4}], x], x]] /; FreeQ[{a, b}, x] && IGtQ[(n - 2)/4, 0] && NegQ[a/b]

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 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 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 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 206

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

Rubi steps

\begin{align*} \int e^x \coth (3 x) \, dx &=\operatorname{Subst}\left (\int \frac{-1-x^6}{1-x^6} \, dx,x,e^x\right )\\ &=e^x-2 \operatorname{Subst}\left (\int \frac{1}{1-x^6} \, dx,x,e^x\right )\\ &=e^x-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,e^x\right )-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1-\frac{x}{2}}{1-x+x^2} \, dx,x,e^x\right )-\frac{2}{3} \operatorname{Subst}\left (\int \frac{1+\frac{x}{2}}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x-\frac{2}{3} \tanh ^{-1}\left (e^x\right )+\frac{1}{6} \operatorname{Subst}\left (\int \frac{-1+2 x}{1-x+x^2} \, dx,x,e^x\right )-\frac{1}{6} \operatorname{Subst}\left (\int \frac{1+2 x}{1+x+x^2} \, dx,x,e^x\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-x+x^2} \, dx,x,e^x\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x-\frac{2}{3} \tanh ^{-1}\left (e^x\right )+\frac{1}{6} \log \left (1-e^x+e^{2 x}\right )-\frac{1}{6} \log \left (1+e^x+e^{2 x}\right )+\operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,-1+2 e^x\right )+\operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 e^x\right )\\ &=e^x-\frac{\tan ^{-1}\left (\frac{-1+2 e^x}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{\tan ^{-1}\left (\frac{1+2 e^x}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{2}{3} \tanh ^{-1}\left (e^x\right )+\frac{1}{6} \log \left (1-e^x+e^{2 x}\right )-\frac{1}{6} \log \left (1+e^x+e^{2 x}\right )\\ \end{align*}

Mathematica [C]  time = 0.0151578, size = 22, normalized size = 0.26 \[ e^x-2 e^x \, _2F_1\left (\frac{1}{6},1;\frac{7}{6};e^{6 x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[E^x*Coth[3*x],x]

[Out]

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

________________________________________________________________________________________

Maple [C]  time = 0.076, size = 138, normalized size = 1.6 \begin{align*}{{\rm e}^{x}}+{\frac{1}{6}\ln \left ({{\rm e}^{x}}-{\frac{1}{2}}-{\frac{i}{2}}\sqrt{3} \right ) }+{\frac{i}{6}}\ln \left ({{\rm e}^{x}}-{\frac{1}{2}}-{\frac{i}{2}}\sqrt{3} \right ) \sqrt{3}+{\frac{1}{6}\ln \left ({{\rm e}^{x}}-{\frac{1}{2}}+{\frac{i}{2}}\sqrt{3} \right ) }-{\frac{i}{6}}\ln \left ({{\rm e}^{x}}-{\frac{1}{2}}+{\frac{i}{2}}\sqrt{3} \right ) \sqrt{3}+{\frac{\ln \left ({{\rm e}^{x}}-1 \right ) }{3}}-{\frac{\ln \left ({{\rm e}^{x}}+1 \right ) }{3}}-{\frac{1}{6}\ln \left ({{\rm e}^{x}}+{\frac{1}{2}}-{\frac{i}{2}}\sqrt{3} \right ) }+{\frac{i}{6}}\ln \left ({{\rm e}^{x}}+{\frac{1}{2}}-{\frac{i}{2}}\sqrt{3} \right ) \sqrt{3}-{\frac{1}{6}\ln \left ({{\rm e}^{x}}+{\frac{1}{2}}+{\frac{i}{2}}\sqrt{3} \right ) }-{\frac{i}{6}}\ln \left ({{\rm e}^{x}}+{\frac{1}{2}}+{\frac{i}{2}}\sqrt{3} \right ) \sqrt{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x)*coth(3*x),x)

[Out]

exp(x)+1/6*ln(exp(x)-1/2-1/2*I*3^(1/2))+1/6*I*ln(exp(x)-1/2-1/2*I*3^(1/2))*3^(1/2)+1/6*ln(exp(x)-1/2+1/2*I*3^(
1/2))-1/6*I*ln(exp(x)-1/2+1/2*I*3^(1/2))*3^(1/2)+1/3*ln(exp(x)-1)-1/3*ln(exp(x)+1)-1/6*ln(exp(x)+1/2-1/2*I*3^(
1/2))+1/6*I*ln(exp(x)+1/2-1/2*I*3^(1/2))*3^(1/2)-1/6*ln(exp(x)+1/2+1/2*I*3^(1/2))-1/6*I*ln(exp(x)+1/2+1/2*I*3^
(1/2))*3^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.60532, size = 101, normalized size = 1.19 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} + 1\right )}\right ) - \frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} - 1\right )}\right ) + e^{x} - \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac{1}{3} \, \log \left (e^{x} + 1\right ) + \frac{1}{3} \, \log \left (e^{x} - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*coth(3*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.15978, size = 454, normalized size = 5.34 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{2}{3} \, \sqrt{3} \cosh \left (x\right ) + \frac{2}{3} \, \sqrt{3} \sinh \left (x\right ) + \frac{1}{3} \, \sqrt{3}\right ) - \frac{1}{3} \, \sqrt{3} \arctan \left (\frac{2}{3} \, \sqrt{3} \cosh \left (x\right ) + \frac{2}{3} \, \sqrt{3} \sinh \left (x\right ) - \frac{1}{3} \, \sqrt{3}\right ) + \cosh \left (x\right ) - \frac{1}{6} \, \log \left (\frac{2 \, \cosh \left (x\right ) + 1}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + \frac{1}{6} \, \log \left (\frac{2 \, \cosh \left (x\right ) - 1}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - \frac{1}{3} \, \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + \frac{1}{3} \, \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) - 1\right ) + \sinh \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*coth(3*x),x, algorithm="fricas")

[Out]

-1/3*sqrt(3)*arctan(2/3*sqrt(3)*cosh(x) + 2/3*sqrt(3)*sinh(x) + 1/3*sqrt(3)) - 1/3*sqrt(3)*arctan(2/3*sqrt(3)*
cosh(x) + 2/3*sqrt(3)*sinh(x) - 1/3*sqrt(3)) + cosh(x) - 1/6*log((2*cosh(x) + 1)/(cosh(x) - sinh(x))) + 1/6*lo
g((2*cosh(x) - 1)/(cosh(x) - sinh(x))) - 1/3*log(cosh(x) + sinh(x) + 1) + 1/3*log(cosh(x) + sinh(x) - 1) + sin
h(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{x} \coth{\left (3 x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*coth(3*x),x)

[Out]

Integral(exp(x)*coth(3*x), x)

________________________________________________________________________________________

Giac [A]  time = 1.20479, size = 103, normalized size = 1.21 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} + 1\right )}\right ) - \frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} - 1\right )}\right ) + e^{x} - \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac{1}{3} \, \log \left (e^{x} + 1\right ) + \frac{1}{3} \, \log \left ({\left | e^{x} - 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)*coth(3*x),x, algorithm="giac")

[Out]

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