3.221 \(\int e^x \coth ^2(3 x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 9, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.900, Rules used = {2282, 390, 288, 210, 634, 618, 204, 628, 206} \[ e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {1}{18} \log \left (-e^x+e^{2 x}+1\right )-\frac {1}{18} \log \left (e^x+e^{2 x}+1\right )+\frac {\tan ^{-1}\left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\tan ^{-1}\left (\frac {2 e^x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2}{9} \tanh ^{-1}\left (e^x\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 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])

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 288

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] - Dist[(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 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

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

Rubi steps

\begin {align*} \int e^x \coth ^2(3 x) \, dx &=\operatorname {Subst}\left (\int \frac {\left (1+x^6\right )^2}{\left (1-x^6\right )^2} \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \left (1+\frac {4 x^6}{\left (1-x^6\right )^2}\right ) \, dx,x,e^x\right )\\ &=e^x+4 \operatorname {Subst}\left (\int \frac {x^6}{\left (1-x^6\right )^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{1-x^6} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,e^x\right )-\frac {2}{9} \operatorname {Subst}\left (\int \frac {1-\frac {x}{2}}{1-x+x^2} \, dx,x,e^x\right )-\frac {2}{9} \operatorname {Subst}\left (\int \frac {1+\frac {x}{2}}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \operatorname {Subst}\left (\int \frac {-1+2 x}{1-x+x^2} \, dx,x,e^x\right )-\frac {1}{18} \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}{1-x+x^2} \, dx,x,e^x\right )-\frac {1}{6} \operatorname {Subst}\left (\int \frac {1}{1+x+x^2} \, dx,x,e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \log \left (1-e^x+e^{2 x}\right )-\frac {1}{18} \log \left (1+e^x+e^{2 x}\right )+\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 e^x\right )+\frac {1}{3} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 e^x\right )\\ &=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {\tan ^{-1}\left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\tan ^{-1}\left (\frac {1+2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2}{9} \tanh ^{-1}\left (e^x\right )+\frac {1}{18} \log \left (1-e^x+e^{2 x}\right )-\frac {1}{18} \log \left (1+e^x+e^{2 x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.90, size = 113, normalized size = 1.05 \[ \frac {36 e^{7 x} \left (e^{6 x}+1\right )^2 \, _4F_3\left (\frac {7}{6},2,2,2;1,1,\frac {25}{6};e^{6 x}\right )}{1729}+\frac {e^{-11 x} \left (7 \left (3708 e^{6 x}+538 e^{12 x}-684 e^{18 x}+e^{24 x}+2197\right ) \, _2F_1\left (\frac {1}{6},1;\frac {7}{6};e^{6 x}\right )-28153 e^{6 x}-5633 e^{12 x}+3109 e^{18 x}-15379\right )}{3024} \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(-15379 - 28153*E^(6*x) - 5633*E^(12*x) + 3109*E^(18*x) + 7*(2197 + 3708*E^(6*x) + 538*E^(12*x) - 684*E^(18*x)
 + E^(24*x))*Hypergeometric2F1[1/6, 1, 7/6, E^(6*x)])/(3024*E^(11*x)) + (36*E^(7*x)*(1 + E^(6*x))^2*Hypergeome
tricPFQ[{7/6, 2, 2, 2}, {1, 1, 25/6}, E^(6*x)])/1729

________________________________________________________________________________________

fricas [B]  time = 0.56, size = 628, normalized size = 5.81 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*(18*cosh(x)^7 + 378*cosh(x)^5*sinh(x)^2 + 630*cosh(x)^4*sinh(x)^3 + 630*cosh(x)^3*sinh(x)^4 + 378*cosh(x)
^2*sinh(x)^5 + 126*cosh(x)*sinh(x)^6 + 18*sinh(x)^7 - 2*(sqrt(3)*cosh(x)^6 + 6*sqrt(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))*arctan(2/3*sqrt(3)*cosh(x) + 2/3*sqrt(3)*sinh(x) + 1/3*sqrt(3)) -
 2*(sqrt(3)*cosh(x)^6 + 6*sqrt(3)*cosh(x)^5*sinh(x) + 15*sqrt(3)*cosh(x)^4*sinh(x)^2 + 20*sqrt(3)*cosh(x)^3*si
nh(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))*arctan(2
/3*sqrt(3)*cosh(x) + 2/3*sqrt(3)*sinh(x) - 1/3*sqrt(3)) - (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)*log((2*cosh(x)
+ 1)/(cosh(x) - sinh(x))) + (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)*log((2*cosh(x) - 1)/(cosh(x) - 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)*log(cosh(x) + sinh(x) + 1) + 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)*log(c
osh(x) + sinh(x) - 1) + 6*(21*cosh(x)^6 - 5)*sinh(x) - 30*cosh(x))/(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)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 88, normalized size = 0.81 \[ -\frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} + 1\right )}\right ) - \frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} - 1\right )}\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} - 1\right )}} + e^{x} - \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac {1}{9} \, \log \left (e^{x} + 1\right ) + \frac {1}{9} \, \log \left ({\left | e^{x} - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.26, size = 150, normalized size = 1.39 \[ {\mathrm e}^{x}-\frac {2 \,{\mathrm e}^{x}}{3 \left ({\mathrm e}^{6 x}-1\right )}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{9}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{18}+\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{18}-\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{18}+\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{18}-\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{18}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 87, normalized size = 0.81 \[ -\frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} + 1\right )}\right ) - \frac {1}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, e^{x} - 1\right )}\right ) - \frac {2 \, e^{x}}{3 \, {\left (e^{\left (6 \, x\right )} - 1\right )}} + e^{x} - \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} + e^{x} + 1\right ) + \frac {1}{18} \, \log \left (e^{\left (2 \, x\right )} - e^{x} + 1\right ) - \frac {1}{9} \, \log \left (e^{x} + 1\right ) + \frac {1}{9} \, \log \left (e^{x} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.38, size = 93, normalized size = 0.86 \[ \frac {\ln \left (\frac {2}{3}-\frac {2\,{\mathrm {e}}^x}{3}\right )}{9}-\frac {\ln \left (-\frac {2\,{\mathrm {e}}^x}{3}-\frac {2}{3}\right )}{9}+\frac {\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}-\frac {1}{3}\right )}^2+\frac {1}{3}\right )}{18}-\frac {\ln \left ({\left (\frac {2\,{\mathrm {e}}^x}{3}+\frac {1}{3}\right )}^2+\frac {1}{3}\right )}{18}+{\mathrm {e}}^x-\frac {2\,{\mathrm {e}}^x}{3\,\left ({\mathrm {e}}^{6\,x}-1\right )}-\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,\left (\frac {2\,{\mathrm {e}}^x}{3}-\frac {1}{3}\right )\right )}{9}-\frac {\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,\left (\frac {2\,{\mathrm {e}}^x}{3}+\frac {1}{3}\right )\right )}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int e^{x} \coth ^{2}{\left (3 x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________