Integrand size = 8, antiderivative size = 71 \[ \int e^x \coth (3 x) \, dx=e^x+\frac {\arctan \left (\frac {1-2 e^x}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\arctan \left (\frac {1+2 e^x}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {2 \text {arctanh}\left (e^x\right )}{3}-\frac {1}{3} \text {arctanh}\left (\frac {e^x}{1+e^{2 x}}\right ) \] Output:
exp(x)+1/3*arctan(1/3*(1-2*exp(x))*3^(1/2))*3^(1/2)-1/3*arctan(1/3*(1+2*ex p(x))*3^(1/2))*3^(1/2)-2/3*arctanh(exp(x))-1/3*arctanh(exp(x)/(1+exp(2*x)) )
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.31 \[ \int e^x \coth (3 x) \, dx=e^x-2 e^x \operatorname {Hypergeometric2F1}\left (\frac {1}{6},1,\frac {7}{6},e^{6 x}\right ) \] Input:
Integrate[E^x*Coth[3*x],x]
Output:
E^x - 2*E^x*Hypergeometric2F1[1/6, 1, 7/6, E^(6*x)]
Time = 0.30 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.37, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.375, Rules used = {2720, 25, 913, 754, 27, 219, 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 \coth (3 x) \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \int -\frac {e^{6 x}+1}{1-e^{6 x}}de^x\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1+e^{6 x}}{1-e^{6 x}}de^x\) |
\(\Big \downarrow \) 913 |
\(\displaystyle e^x-2 \int \frac {1}{1-e^{6 x}}de^x\) |
\(\Big \downarrow \) 754 |
\(\displaystyle e^x-2 \left (\frac {1}{3} \int \frac {1}{1-e^{2 x}}de^x+\frac {1}{3} \int \frac {2-e^x}{2 \left (1-e^x+e^{2 x}\right )}de^x+\frac {1}{3} \int \frac {2+e^x}{2 \left (1+e^x+e^{2 x}\right )}de^x\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle e^x-2 \left (\frac {1}{3} \int \frac {1}{1-e^{2 x}}de^x+\frac {1}{6} \int \frac {2-e^x}{1-e^x+e^{2 x}}de^x+\frac {1}{6} \int \frac {2+e^x}{1+e^x+e^{2 x}}de^x\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \int \frac {2-e^x}{1-e^x+e^{2 x}}de^x+\frac {1}{6} \int \frac {2+e^x}{1+e^x+e^{2 x}}de^x+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \left (\frac {3}{2} \int \frac {1}{1-e^x+e^{2 x}}de^x-\frac {1}{2} \int -\frac {1-2 e^x}{1-e^x+e^{2 x}}de^x\right )+\frac {1}{6} \left (\frac {3}{2} \int \frac {1}{1+e^x+e^{2 x}}de^x+\frac {1}{2} \int \frac {1+2 e^x}{1+e^x+e^{2 x}}de^x\right )+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \left (\frac {3}{2} \int \frac {1}{1-e^x+e^{2 x}}de^x+\frac {1}{2} \int \frac {1-2 e^x}{1-e^x+e^{2 x}}de^x\right )+\frac {1}{6} \left (\frac {3}{2} \int \frac {1}{1+e^x+e^{2 x}}de^x+\frac {1}{2} \int \frac {1+2 e^x}{1+e^x+e^{2 x}}de^x\right )+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \left (\frac {1}{2} \int \frac {1-2 e^x}{1-e^x+e^{2 x}}de^x-3 \int \frac {1}{-3-e^{2 x}}d\left (-1+2 e^x\right )\right )+\frac {1}{6} \left (\frac {1}{2} \int \frac {1+2 e^x}{1+e^x+e^{2 x}}de^x-3 \int \frac {1}{-3-e^{2 x}}d\left (1+2 e^x\right )\right )+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
\(\Big \downarrow \) 217 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \left (\frac {1}{2} \int \frac {1-2 e^x}{1-e^x+e^{2 x}}de^x+\sqrt {3} \arctan \left (\frac {2 e^x-1}{\sqrt {3}}\right )\right )+\frac {1}{6} \left (\frac {1}{2} \int \frac {1+2 e^x}{1+e^x+e^{2 x}}de^x+\sqrt {3} \arctan \left (\frac {2 e^x+1}{\sqrt {3}}\right )\right )+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle e^x-2 \left (\frac {1}{6} \left (\sqrt {3} \arctan \left (\frac {2 e^x-1}{\sqrt {3}}\right )-\frac {1}{2} \log \left (-e^x+e^{2 x}+1\right )\right )+\frac {1}{6} \left (\sqrt {3} \arctan \left (\frac {2 e^x+1}{\sqrt {3}}\right )+\frac {1}{2} \log \left (e^x+e^{2 x}+1\right )\right )+\frac {\text {arctanh}\left (e^x\right )}{3}\right )\) |
Input:
Int[E^x*Coth[3*x],x]
Output:
E^x - 2*(ArcTanh[E^x]/3 + (Sqrt[3]*ArcTan[(-1 + 2*E^x)/Sqrt[3]] - Log[1 - E^x + E^(2*x)]/2)/6 + (Sqrt[3]*ArcTan[(1 + 2*E^x)/Sqrt[3]] + Log[1 + E^x + E^(2*x)]/2)/6)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
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/(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] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Si mp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(p + 1) + 1))), x] - Simp[(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, p}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]
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]
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]
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]
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]]]
Result contains complex when optimal does not.
Time = 0.54 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.94
method | result | size |
risch | \({\mathrm e}^{x}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{6}+\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{6}-\frac {\ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{6}-\frac {i \ln \left ({\mathrm e}^{x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{6}-\frac {\ln \left ({\mathrm e}^{x}+1\right )}{3}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{6}+\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{6}+\frac {\ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{6}-\frac {i \ln \left ({\mathrm e}^{x}-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}{6}+\frac {\ln \left ({\mathrm e}^{x}-1\right )}{3}\) | \(138\) |
Input:
int(exp(x)*coth(3*x),x,method=_RETURNVERBOSE)
Output:
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/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(ex p(x)-1/2+1/2*I*3^(1/2))*3^(1/2)+1/3*ln(exp(x)-1)
Leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (56) = 112\).
Time = 0.09 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.59 \[ \int e^x \coth (3 x) \, dx=-\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 ) \] Input:
integrate(exp(x)*coth(3*x),x, algorithm="fricas")
Output:
-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*sq rt(3)) + cosh(x) - 1/6*log((2*cosh(x) + 1)/(cosh(x) - sinh(x))) + 1/6*log( (2*cosh(x) - 1)/(cosh(x) - sinh(x))) - 1/3*log(cosh(x) + sinh(x) + 1) + 1/ 3*log(cosh(x) + sinh(x) - 1) + sinh(x)
\[ \int e^x \coth (3 x) \, dx=\int e^{x} \coth {\left (3 x \right )}\, dx \] Input:
integrate(exp(x)*coth(3*x),x)
Output:
Integral(exp(x)*coth(3*x), x)
Time = 0.11 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.06 \[ \int e^x \coth (3 x) \, dx=-\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 ) \] Input:
integrate(exp(x)*coth(3*x),x, algorithm="maxima")
Output:
-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)
Time = 0.10 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.07 \[ \int e^x \coth (3 x) \, dx=-\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 ) \] Input:
integrate(exp(x)*coth(3*x),x, algorithm="giac")
Output:
-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))
Time = 0.27 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.14 \[ \int e^x \coth (3 x) \, dx=\frac {\ln \left (2-2\,{\mathrm {e}}^x\right )}{3}-\frac {\ln \left (-2\,{\mathrm {e}}^x-2\right )}{3}+\frac {\ln \left ({\left (2\,{\mathrm {e}}^x-1\right )}^2+3\right )}{6}-\frac {\ln \left ({\left (2\,{\mathrm {e}}^x+1\right )}^2+3\right )}{6}+{\mathrm {e}}^x-\frac {\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,\left (2\,{\mathrm {e}}^x-1\right )}{3}\right )}{3}-\frac {\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,\left (2\,{\mathrm {e}}^x+1\right )}{3}\right )}{3} \] Input:
int(coth(3*x)*exp(x),x)
Output:
log(2 - 2*exp(x))/3 - log(- 2*exp(x) - 2)/3 + log((2*exp(x) - 1)^2 + 3)/6 - log((2*exp(x) + 1)^2 + 3)/6 + exp(x) - (3^(1/2)*atan((3^(1/2)*(2*exp(x) - 1))/3))/3 - (3^(1/2)*atan((3^(1/2)*(2*exp(x) + 1))/3))/3
Time = 0.26 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.15 \[ \int e^x \coth (3 x) \, dx=-\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}-1}{\sqrt {3}}\right )}{3}-\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}+1}{\sqrt {3}}\right )}{3}+e^{x}-\frac {\mathrm {log}\left (e^{2 x}+e^{x}+1\right )}{6}+\frac {\mathrm {log}\left (e^{2 x}-e^{x}+1\right )}{6}+\frac {\mathrm {log}\left (e^{x}-1\right )}{3}-\frac {\mathrm {log}\left (e^{x}+1\right )}{3} \] Input:
int(exp(x)*coth(3*x),x)
Output:
( - 2*sqrt(3)*atan((2*e**x - 1)/sqrt(3)) - 2*sqrt(3)*atan((2*e**x + 1)/sqr t(3)) + 6*e**x - log(e**(2*x) + e**x + 1) + log(e**(2*x) - e**x + 1) + 2*l og(e**x - 1) - 2*log(e**x + 1))/6