Integrand size = 18, antiderivative size = 73 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=\frac {e^{2 a+2 b x}}{2 b}-\frac {2 e^{2 a-2 d}}{b \left (1+e^{2 d+2 b x}\right )}-\frac {2 e^{2 a-2 d} \log \left (1+e^{2 d+2 b x}\right )}{b} \] Output:
1/2*exp(2*b*x+2*a)/b-2*exp(2*a-2*d)/b/(1+exp(2*b*x+2*d))-2*exp(2*a-2*d)*ln (1+exp(2*b*x+2*d))/b
Leaf count is larger than twice the leaf count of optimal. \(158\) vs. \(2(73)=146\).
Time = 0.32 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.16 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=\frac {e^{2 a} (\cosh (d)-\sinh (d)) \left (e^{2 b x} \left (1-4 \log \left (\left (1+e^{2 b x}\right ) \cosh (d)+\left (-1+e^{2 b x}\right ) \sinh (d)\right )\right )+\cosh (2 d) \left (-4+e^{4 b x}-4 \log \left (\left (1+e^{2 b x}\right ) \cosh (d)+\left (-1+e^{2 b x}\right ) \sinh (d)\right )\right )+\left (4+e^{4 b x}+4 \log \left (\left (1+e^{2 b x}\right ) \cosh (d)+\left (-1+e^{2 b x}\right ) \sinh (d)\right )\right ) \sinh (2 d)\right )}{2 b \left (\left (1+e^{2 b x}\right ) \cosh (d)+\left (-1+e^{2 b x}\right ) \sinh (d)\right )} \] Input:
Integrate[E^(2*(a + b*x))*Tanh[d + b*x]^2,x]
Output:
(E^(2*a)*(Cosh[d] - Sinh[d])*(E^(2*b*x)*(1 - 4*Log[(1 + E^(2*b*x))*Cosh[d] + (-1 + E^(2*b*x))*Sinh[d]]) + Cosh[2*d]*(-4 + E^(4*b*x) - 4*Log[(1 + E^( 2*b*x))*Cosh[d] + (-1 + E^(2*b*x))*Sinh[d]]) + (4 + E^(4*b*x) + 4*Log[(1 + E^(2*b*x))*Cosh[d] + (-1 + E^(2*b*x))*Sinh[d]])*Sinh[2*d]))/(2*b*((1 + E^ (2*b*x))*Cosh[d] + (-1 + E^(2*b*x))*Sinh[d]))
Time = 0.23 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.58, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {2720, 27, 353, 49, 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^{2 (a+b x)} \tanh ^2(b x+d) \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {\int \frac {e^{2 a+b x} \left (1-e^{2 b x}\right )^2}{\left (1+e^{2 b x}\right )^2}de^{b x}}{b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {e^{2 a} \int \frac {e^{b x} \left (1-e^{2 b x}\right )^2}{\left (1+e^{2 b x}\right )^2}de^{b x}}{b}\) |
\(\Big \downarrow \) 353 |
\(\displaystyle \frac {e^{2 a} \int \frac {\left (1-e^{2 b x}\right )^2}{\left (1+e^{2 b x}\right )^2}de^{2 b x}}{2 b}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {e^{2 a} \int \left (1-\frac {4}{1+e^{2 b x}}+\frac {4}{\left (1+e^{2 b x}\right )^2}\right )de^{2 b x}}{2 b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {e^{2 a} \left (e^{2 b x}-\frac {4}{e^{2 b x}+1}-4 \log \left (e^{2 b x}+1\right )\right )}{2 b}\) |
Input:
Int[E^(2*(a + b*x))*Tanh[d + b*x]^2,x]
Output:
(E^(2*a)*(E^(2*b*x) - 4/(1 + E^(2*b*x)) - 4*Log[1 + E^(2*b*x)]))/(2*b)
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_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[1/2 Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ {a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
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]]]
Time = 0.27 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.29
method | result | size |
risch | \(\frac {{\mathrm e}^{2 b x +2 a}}{2 b}+\frac {4 \,{\mathrm e}^{2 a -2 d} a}{b}-\frac {2 \,{\mathrm e}^{4 a -2 d}}{\left ({\mathrm e}^{2 b x +2 a +2 d}+{\mathrm e}^{2 a}\right ) b}-\frac {2 \ln \left ({\mathrm e}^{2 b x +2 a}+{\mathrm e}^{2 a -2 d}\right ) {\mathrm e}^{2 a -2 d}}{b}\) | \(94\) |
Input:
int(exp(2*b*x+2*a)*tanh(b*x+d)^2,x,method=_RETURNVERBOSE)
Output:
1/2*exp(2*b*x+2*a)/b+4/b*exp(2*a-2*d)*a-2/(exp(2*b*x+2*a+2*d)+exp(2*a))/b* exp(4*a-2*d)-2*ln(exp(2*b*x+2*a)+exp(2*a-2*d))/b*exp(2*a-2*d)
Leaf count of result is larger than twice the leaf count of optimal. 453 vs. \(2 (66) = 132\).
Time = 0.10 (sec) , antiderivative size = 453, normalized size of antiderivative = 6.21 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=\frac {\cosh \left (b x + d\right )^{4} \cosh \left (-2 \, a + 2 \, d\right ) + {\left (\cosh \left (-2 \, a + 2 \, d\right ) - \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right )^{4} + 4 \, {\left (\cosh \left (b x + d\right ) \cosh \left (-2 \, a + 2 \, d\right ) - \cosh \left (b x + d\right ) \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right )^{3} + \cosh \left (b x + d\right )^{2} \cosh \left (-2 \, a + 2 \, d\right ) + {\left (6 \, \cosh \left (b x + d\right )^{2} \cosh \left (-2 \, a + 2 \, d\right ) - {\left (6 \, \cosh \left (b x + d\right )^{2} + 1\right )} \sinh \left (-2 \, a + 2 \, d\right ) + \cosh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right )^{2} - 4 \, {\left (\cosh \left (b x + d\right )^{2} \cosh \left (-2 \, a + 2 \, d\right ) + {\left (\cosh \left (-2 \, a + 2 \, d\right ) - \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right )^{2} + 2 \, {\left (\cosh \left (b x + d\right ) \cosh \left (-2 \, a + 2 \, d\right ) - \cosh \left (b x + d\right ) \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right ) - {\left (\cosh \left (b x + d\right )^{2} + 1\right )} \sinh \left (-2 \, a + 2 \, d\right ) + \cosh \left (-2 \, a + 2 \, d\right )\right )} \log \left (\frac {2 \, \cosh \left (b x + d\right )}{\cosh \left (b x + d\right ) - \sinh \left (b x + d\right )}\right ) + 2 \, {\left (2 \, \cosh \left (b x + d\right )^{3} \cosh \left (-2 \, a + 2 \, d\right ) + \cosh \left (b x + d\right ) \cosh \left (-2 \, a + 2 \, d\right ) - {\left (2 \, \cosh \left (b x + d\right )^{3} + \cosh \left (b x + d\right )\right )} \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right ) - {\left (\cosh \left (b x + d\right )^{4} + \cosh \left (b x + d\right )^{2} - 4\right )} \sinh \left (-2 \, a + 2 \, d\right ) - 4 \, \cosh \left (-2 \, a + 2 \, d\right )}{2 \, {\left (b \cosh \left (b x + d\right )^{2} + 2 \, b \cosh \left (b x + d\right ) \sinh \left (b x + d\right ) + b \sinh \left (b x + d\right )^{2} + b\right )}} \] Input:
integrate(exp(2*b*x+2*a)*tanh(b*x+d)^2,x, algorithm="fricas")
Output:
1/2*(cosh(b*x + d)^4*cosh(-2*a + 2*d) + (cosh(-2*a + 2*d) - sinh(-2*a + 2* d))*sinh(b*x + d)^4 + 4*(cosh(b*x + d)*cosh(-2*a + 2*d) - cosh(b*x + d)*si nh(-2*a + 2*d))*sinh(b*x + d)^3 + cosh(b*x + d)^2*cosh(-2*a + 2*d) + (6*co sh(b*x + d)^2*cosh(-2*a + 2*d) - (6*cosh(b*x + d)^2 + 1)*sinh(-2*a + 2*d) + cosh(-2*a + 2*d))*sinh(b*x + d)^2 - 4*(cosh(b*x + d)^2*cosh(-2*a + 2*d) + (cosh(-2*a + 2*d) - sinh(-2*a + 2*d))*sinh(b*x + d)^2 + 2*(cosh(b*x + d) *cosh(-2*a + 2*d) - cosh(b*x + d)*sinh(-2*a + 2*d))*sinh(b*x + d) - (cosh( b*x + d)^2 + 1)*sinh(-2*a + 2*d) + cosh(-2*a + 2*d))*log(2*cosh(b*x + d)/( cosh(b*x + d) - sinh(b*x + d))) + 2*(2*cosh(b*x + d)^3*cosh(-2*a + 2*d) + cosh(b*x + d)*cosh(-2*a + 2*d) - (2*cosh(b*x + d)^3 + cosh(b*x + d))*sinh( -2*a + 2*d))*sinh(b*x + d) - (cosh(b*x + d)^4 + cosh(b*x + d)^2 - 4)*sinh( -2*a + 2*d) - 4*cosh(-2*a + 2*d))/(b*cosh(b*x + d)^2 + 2*b*cosh(b*x + d)*s inh(b*x + d) + b*sinh(b*x + d)^2 + b)
\[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=e^{2 a} \int e^{2 b x} \tanh ^{2}{\left (b x + d \right )}\, dx \] Input:
integrate(exp(2*b*x+2*a)*tanh(b*x+d)**2,x)
Output:
exp(2*a)*Integral(exp(2*b*x)*tanh(b*x + d)**2, x)
Time = 0.11 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.25 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=-\frac {4 \, {\left (b x + d\right )} e^{\left (2 \, a - 2 \, d\right )}}{b} - \frac {2 \, e^{\left (2 \, a - 2 \, d\right )} \log \left (e^{\left (-2 \, b x - 2 \, d\right )} + 1\right )}{b} + \frac {{\left (5 \, e^{\left (-2 \, b x - 2 \, d\right )} + 1\right )} e^{\left (2 \, a - 2 \, d\right )}}{2 \, b {\left (e^{\left (-2 \, b x - 2 \, d\right )} + e^{\left (-4 \, b x - 4 \, d\right )}\right )}} \] Input:
integrate(exp(2*b*x+2*a)*tanh(b*x+d)^2,x, algorithm="maxima")
Output:
-4*(b*x + d)*e^(2*a - 2*d)/b - 2*e^(2*a - 2*d)*log(e^(-2*b*x - 2*d) + 1)/b + 1/2*(5*e^(-2*b*x - 2*d) + 1)*e^(2*a - 2*d)/(b*(e^(-2*b*x - 2*d) + e^(-4 *b*x - 4*d)))
Time = 0.12 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.92 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=-\frac {2 \, e^{\left (2 \, a - 2 \, d\right )} \log \left (e^{\left (2 \, b x + 2 \, d\right )} + 1\right )}{b} + \frac {e^{\left (2 \, b x + 2 \, a\right )}}{2 \, b} + \frac {2 \, e^{\left (2 \, b x + 2 \, a\right )}}{b {\left (e^{\left (2 \, b x + 2 \, d\right )} + 1\right )}} \] Input:
integrate(exp(2*b*x+2*a)*tanh(b*x+d)^2,x, algorithm="giac")
Output:
-2*e^(2*a - 2*d)*log(e^(2*b*x + 2*d) + 1)/b + 1/2*e^(2*b*x + 2*a)/b + 2*e^ (2*b*x + 2*a)/(b*(e^(2*b*x + 2*d) + 1))
Time = 0.16 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.12 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=\frac {{\mathrm {e}}^{2\,a+2\,b\,x}}{2\,b}-\frac {2\,{\mathrm {e}}^{2\,a-2\,d}\,\ln \left ({\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}+{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{-2\,d}\right )}{b}-\frac {2\,{\mathrm {e}}^{4\,a-4\,d}}{b\,\left ({\mathrm {e}}^{2\,a-2\,d}+{\mathrm {e}}^{2\,a+2\,b\,x}\right )} \] Input:
int(exp(2*a + 2*b*x)*tanh(d + b*x)^2,x)
Output:
exp(2*a + 2*b*x)/(2*b) - (2*exp(2*a - 2*d)*log(exp(2*a)*exp(2*b*x) + exp(2 *a)*exp(-2*d)))/b - (2*exp(4*a - 4*d))/(b*(exp(2*a - 2*d) + exp(2*a + 2*b* x)))
Time = 0.22 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.29 \[ \int e^{2 (a+b x)} \tanh ^2(d+b x) \, dx=\frac {e^{2 a} \left (e^{4 b x +4 d}-4 e^{2 b x +2 d} \mathrm {log}\left (e^{2 b x +2 d}+1\right )+5 e^{2 b x +2 d}-4 \,\mathrm {log}\left (e^{2 b x +2 d}+1\right )\right )}{2 e^{2 d} b \left (e^{2 b x +2 d}+1\right )} \] Input:
int(exp(2*b*x+2*a)*tanh(b*x+d)^2,x)
Output:
(e**(2*a)*(e**(4*b*x + 4*d) - 4*e**(2*b*x + 2*d)*log(e**(2*b*x + 2*d) + 1) + 5*e**(2*b*x + 2*d) - 4*log(e**(2*b*x + 2*d) + 1)))/(2*e**(2*d)*b*(e**(2 *b*x + 2*d) + 1))