Integrand size = 10, antiderivative size = 94 \[ \int e^x \coth ^2(3 x) \, dx=e^x+\frac {2 e^x}{3 \left (1-e^{6 x}\right )}+\frac {\arctan \left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\arctan \left (\frac {1+2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2 \text {arctanh}\left (e^x\right )}{9}-\frac {1}{9} \text {arctanh}\left (\frac {e^x}{1+e^{2 x}}\right ) \] Output:
exp(x)+2*exp(x)/(3-3*exp(6*x))+1/9*arctan(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)-2/9*arctanh(exp(x))-1/9*arc tanh(exp(x)/(1+exp(2*x)))
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 1.45 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.20 \[ \int e^x \coth ^2(3 x) \, dx=\frac {e^{-11 x} \left (-15379-28153 e^{6 x}-5633 e^{12 x}+3109 e^{18 x}+7 \left (2197+3708 e^{6 x}+538 e^{12 x}-684 e^{18 x}+e^{24 x}\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{6},1,\frac {7}{6},e^{6 x}\right )\right )}{3024}+\frac {36 e^{7 x} \left (1+e^{6 x}\right )^2 \, _4F_3\left (\frac {7}{6},2,2,2;1,1,\frac {25}{6};e^{6 x}\right )}{1729} \] Input:
Integrate[E^x*Coth[3*x]^2,x]
Output:
(-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*Hypergeometr icPFQ[{7/6, 2, 2, 2}, {1, 1, 25/6}, E^(6*x)])/1729
Time = 0.50 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.15, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2720, 915, 2009}
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 ^2(3 x) \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \int \frac {\left (e^{6 x}+1\right )^2}{\left (1-e^{6 x}\right )^2}de^x\) |
\(\Big \downarrow \) 915 |
\(\displaystyle \int \left (\frac {4 e^{6 x}}{\left (1-e^{6 x}\right )^2}+1\right )de^x\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\arctan \left (\frac {1-2 e^x}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {\arctan \left (\frac {2 e^x+1}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {2 \text {arctanh}\left (e^x\right )}{9}+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 )\) |
Input:
Int[E^x*Coth[3*x]^2,x]
Output:
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*Sqrt[3]) - (2*ArcTanh[E^x])/9 + Log[1 - E ^x + E^(2*x)]/18 - Log[1 + E^x + E^(2*x)]/18
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] && ILtQ[q, 0] && GeQ[p, -q]
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.56 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.60
method | result | size |
risch | \({\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}+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}\) | \(150\) |
Input:
int(exp(x)*coth(3*x)^2,x,method=_RETURNVERBOSE)
Output:
exp(x)-2/3*exp(x)/(exp(6*x)-1)+1/9*ln(exp(x)-1)-1/9*ln(exp(x)+1)+1/18*ln(e xp(x)-1/2-1/2*I*3^(1/2))+1/18*I*3^(1/2)*ln(exp(x)-1/2-1/2*I*3^(1/2))+1/18* ln(exp(x)-1/2+1/2*I*3^(1/2))-1/18*I*3^(1/2)*ln(exp(x)-1/2+1/2*I*3^(1/2))-1 /18*ln(exp(x)+1/2-1/2*I*3^(1/2))+1/18*I*3^(1/2)*ln(exp(x)+1/2-1/2*I*3^(1/2 ))-1/18*ln(exp(x)+1/2+1/2*I*3^(1/2))-1/18*I*3^(1/2)*ln(exp(x)+1/2+1/2*I*3^ (1/2))
Leaf count of result is larger than twice the leaf count of optimal. 628 vs. \(2 (68) = 136\).
Time = 0.11 (sec) , antiderivative size = 628, normalized size of antiderivative = 6.68 \[ \int e^x \coth ^2(3 x) \, dx=\text {Too large to display} \] Input:
integrate(exp(x)*coth(3*x)^2,x, algorithm="fricas")
Output:
1/18*(18*cosh(x)^7 + 378*cosh(x)^5*sinh(x)^2 + 630*cosh(x)^4*sinh(x)^3 + 6 30*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*sq rt(3)*cosh(x)^4*sinh(x)^2 + 20*sqrt(3)*cosh(x)^3*sinh(x)^3 + 15*sqrt(3)*co sh(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*sin h(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*sqr t(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)/(co sh(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(cosh(x) + sinh(x) - 1) + 6*(21*cosh(x)^6 - 5)*si...
\[ \int e^x \coth ^2(3 x) \, dx=\int e^{x} \coth ^{2}{\left (3 x \right )}\, dx \] Input:
integrate(exp(x)*coth(3*x)**2,x)
Output:
Integral(exp(x)*coth(3*x)**2, x)
Time = 0.12 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.93 \[ \int e^x \coth ^2(3 x) \, dx=-\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 ) \] Input:
integrate(exp(x)*coth(3*x)^2,x, algorithm="maxima")
Output:
-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)
Time = 0.11 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.94 \[ \int e^x \coth ^2(3 x) \, dx=-\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 ) \] Input:
integrate(exp(x)*coth(3*x)^2,x, algorithm="giac")
Output:
-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) )
Time = 2.47 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.99 \[ \int e^x \coth ^2(3 x) \, dx=\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} \] Input:
int(coth(3*x)^2*exp(x),x)
Output:
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
Time = 0.24 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.21 \[ \int e^x \coth ^2(3 x) \, dx=\frac {-2 e^{6 x} \sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}-1}{\sqrt {3}}\right )+2 \sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}-1}{\sqrt {3}}\right )-2 e^{6 x} \sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}+1}{\sqrt {3}}\right )+2 \sqrt {3}\, \mathit {atan} \left (\frac {2 e^{x}+1}{\sqrt {3}}\right )+18 e^{7 x}-e^{6 x} \mathrm {log}\left (e^{2 x}+e^{x}+1\right )+e^{6 x} \mathrm {log}\left (e^{2 x}-e^{x}+1\right )+2 e^{6 x} \mathrm {log}\left (e^{x}-1\right )-2 e^{6 x} \mathrm {log}\left (e^{x}+1\right )-30 e^{x}+\mathrm {log}\left (e^{2 x}+e^{x}+1\right )-\mathrm {log}\left (e^{2 x}-e^{x}+1\right )-2 \,\mathrm {log}\left (e^{x}-1\right )+2 \,\mathrm {log}\left (e^{x}+1\right )}{18 e^{6 x}-18} \] Input:
int(exp(x)*coth(3*x)^2,x)
Output:
( - 2*e**(6*x)*sqrt(3)*atan((2*e**x - 1)/sqrt(3)) + 2*sqrt(3)*atan((2*e**x - 1)/sqrt(3)) - 2*e**(6*x)*sqrt(3)*atan((2*e**x + 1)/sqrt(3)) + 2*sqrt(3) *atan((2*e**x + 1)/sqrt(3)) + 18*e**(7*x) - e**(6*x)*log(e**(2*x) + e**x + 1) + e**(6*x)*log(e**(2*x) - e**x + 1) + 2*e**(6*x)*log(e**x - 1) - 2*e** (6*x)*log(e**x + 1) - 30*e**x + log(e**(2*x) + e**x + 1) - log(e**(2*x) - e**x + 1) - 2*log(e**x - 1) + 2*log(e**x + 1))/(18*(e**(6*x) - 1))