Integrand size = 15, antiderivative size = 45 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=-\frac {\arctan (\sinh (c+b x)) \cosh (a-c)}{b}+\frac {\text {sech}(c+b x) \sinh (a-c)}{b}+\frac {\sinh (a+b x)}{b} \] Output:
-arctan(sinh(b*x+c))*cosh(a-c)/b+sech(b*x+c)*sinh(a-c)/b+sinh(b*x+a)/b
Leaf count is larger than twice the leaf count of optimal. \(102\) vs. \(2(45)=90\).
Time = 0.08 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.27 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=-\frac {2 \arctan \left (\frac {(\cosh (c)-\sinh (c)) \left (\cosh \left (\frac {b x}{2}\right ) \sinh (c)+\cosh (c) \sinh \left (\frac {b x}{2}\right )\right )}{\cosh (c) \cosh \left (\frac {b x}{2}\right )-\cosh \left (\frac {b x}{2}\right ) \sinh (c)}\right ) \cosh (a-c)}{b}+\frac {\cosh (b x) \sinh (a)}{b}+\frac {\text {sech}(c+b x) \sinh (a-c)}{b}+\frac {\cosh (a) \sinh (b x)}{b} \] Input:
Integrate[Cosh[a + b*x]*Tanh[c + b*x]^2,x]
Output:
(-2*ArcTan[((Cosh[c] - Sinh[c])*(Cosh[(b*x)/2]*Sinh[c] + Cosh[c]*Sinh[(b*x )/2]))/(Cosh[c]*Cosh[(b*x)/2] - Cosh[(b*x)/2]*Sinh[c])]*Cosh[a - c])/b + ( Cosh[b*x]*Sinh[a])/b + (Sech[c + b*x]*Sinh[a - c])/b + (Cosh[a]*Sinh[b*x]) /b
Time = 0.43 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {6157, 3042, 26, 3086, 24, 6154, 3042, 3117, 4257}
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 \cosh (a+b x) \tanh ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 6157 |
\(\displaystyle \int \sinh (a+b x) \tanh (c+b x)dx-\sinh (a-c) \int \text {sech}(c+b x) \tanh (c+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sinh (a+b x) \tanh (c+b x)dx-\sinh (a-c) \int -i \sec (i c+i b x) \tan (i c+i b x)dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \int \sinh (a+b x) \tanh (c+b x)dx+i \sinh (a-c) \int \sec (i c+i b x) \tan (i c+i b x)dx\) |
\(\Big \downarrow \) 3086 |
\(\displaystyle \int \sinh (a+b x) \tanh (c+b x)dx+\frac {\sinh (a-c) \int 1d\text {sech}(c+b x)}{b}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \int \sinh (a+b x) \tanh (c+b x)dx+\frac {\sinh (a-c) \text {sech}(b x+c)}{b}\) |
\(\Big \downarrow \) 6154 |
\(\displaystyle -\cosh (a-c) \int \text {sech}(c+b x)dx+\int \cosh (a+b x)dx+\frac {\sinh (a-c) \text {sech}(b x+c)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\cosh (a-c) \int \csc \left (i c+i b x+\frac {\pi }{2}\right )dx+\int \sin \left (i a+i b x+\frac {\pi }{2}\right )dx+\frac {\sinh (a-c) \text {sech}(b x+c)}{b}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle -\cosh (a-c) \int \csc \left (i c+i b x+\frac {\pi }{2}\right )dx+\frac {\sinh (a-c) \text {sech}(b x+c)}{b}+\frac {\sinh (a+b x)}{b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\cosh (a-c) \arctan (\sinh (b x+c))}{b}+\frac {\sinh (a-c) \text {sech}(b x+c)}{b}+\frac {\sinh (a+b x)}{b}\) |
Input:
Int[Cosh[a + b*x]*Tanh[c + b*x]^2,x]
Output:
-((ArcTan[Sinh[c + b*x]]*Cosh[a - c])/b) + (Sech[c + b*x]*Sinh[a - c])/b + Sinh[a + b*x]/b
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_.), x_Symbol] :> Simp[a/f Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 ), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 ] && !(IntegerQ[m/2] && LtQ[0, m, n + 1])
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[Sinh[v_]*Tanh[w_]^(n_.), x_Symbol] :> Int[Cosh[v]*Tanh[w]^(n - 1), x] - Simp[Cosh[v - w] Int[Sech[w]*Tanh[w]^(n - 1), x], x] /; GtQ[n, 0] && NeQ [w, v] && FreeQ[v - w, x]
Int[Cosh[v_]*Tanh[w_]^(n_.), x_Symbol] :> Int[Sinh[v]*Tanh[w]^(n - 1), x] - Simp[Sinh[v - w] Int[Sech[w]*Tanh[w]^(n - 1), x], x] /; GtQ[n, 0] && NeQ [w, v] && FreeQ[v - w, x]
Result contains complex when optimal does not.
Time = 0.17 (sec) , antiderivative size = 207, normalized size of antiderivative = 4.60
method | result | size |
risch | \(\frac {{\mathrm e}^{b x +a}}{2 b}-\frac {{\mathrm e}^{-b x -a}}{2 b}+\frac {{\mathrm e}^{b x +a} \left ({\mathrm e}^{2 a}-{\mathrm e}^{2 c}\right )}{b \left ({\mathrm e}^{2 b x +2 a +2 c}+{\mathrm e}^{2 a}\right )}+\frac {i \ln \left ({\mathrm e}^{b x +a}-i {\mathrm e}^{a -c}\right ) {\mathrm e}^{-a -c} {\mathrm e}^{2 a}}{2 b}+\frac {i \ln \left ({\mathrm e}^{b x +a}-i {\mathrm e}^{a -c}\right ) {\mathrm e}^{-a -c} {\mathrm e}^{2 c}}{2 b}-\frac {i \ln \left ({\mathrm e}^{b x +a}+i {\mathrm e}^{a -c}\right ) {\mathrm e}^{-a -c} {\mathrm e}^{2 a}}{2 b}-\frac {i \ln \left ({\mathrm e}^{b x +a}+i {\mathrm e}^{a -c}\right ) {\mathrm e}^{-a -c} {\mathrm e}^{2 c}}{2 b}\) | \(207\) |
Input:
int(cosh(b*x+a)*tanh(b*x+c)^2,x,method=_RETURNVERBOSE)
Output:
1/2/b*exp(b*x+a)-1/2/b*exp(-b*x-a)+1/b*exp(b*x+a)*(exp(2*a)-exp(2*c))/(exp (2*b*x+2*a+2*c)+exp(2*a))+1/2*I*ln(exp(b*x+a)-I*exp(a-c))/b*exp(-a-c)*exp( 2*a)+1/2*I*ln(exp(b*x+a)-I*exp(a-c))/b*exp(-a-c)*exp(2*c)-1/2*I*ln(exp(b*x +a)+I*exp(a-c))/b*exp(-a-c)*exp(2*a)-1/2*I*ln(exp(b*x+a)+I*exp(a-c))/b*exp (-a-c)*exp(2*c)
Leaf count of result is larger than twice the leaf count of optimal. 902 vs. \(2 (45) = 90\).
Time = 0.10 (sec) , antiderivative size = 902, normalized size of antiderivative = 20.04 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(cosh(b*x+a)*tanh(b*x+c)^2,x, algorithm="fricas")
Output:
1/2*(cosh(b*x + c)^4*cosh(-a + c)^2 + (cosh(-a + c)^2 - 2*cosh(-a + c)*sin h(-a + c) + sinh(-a + c)^2)*sinh(b*x + c)^4 + 4*(cosh(b*x + c)*cosh(-a + c )^2 - 2*cosh(b*x + c)*cosh(-a + c)*sinh(-a + c) + cosh(b*x + c)*sinh(-a + c)^2)*sinh(b*x + c)^3 + 3*(cosh(-a + c)^2 - 1)*cosh(b*x + c)^2 + 3*(2*cosh (b*x + c)^2*cosh(-a + c)^2 + (2*cosh(b*x + c)^2 + 1)*sinh(-a + c)^2 + cosh (-a + c)^2 - 2*(2*cosh(b*x + c)^2*cosh(-a + c) + cosh(-a + c))*sinh(-a + c ) - 1)*sinh(b*x + c)^2 + (cosh(b*x + c)^4 + 3*cosh(b*x + c)^2)*sinh(-a + c )^2 - 2*((cosh(-a + c)^2 + 1)*cosh(b*x + c)^3 + (cosh(-a + c)^2 - 2*cosh(- a + c)*sinh(-a + c) + sinh(-a + c)^2 + 1)*sinh(b*x + c)^3 - 3*(2*cosh(b*x + c)*cosh(-a + c)*sinh(-a + c) - cosh(b*x + c)*sinh(-a + c)^2 - (cosh(-a + c)^2 + 1)*cosh(b*x + c))*sinh(b*x + c)^2 + (cosh(b*x + c)^3 + cosh(b*x + c))*sinh(-a + c)^2 + (cosh(-a + c)^2 + 1)*cosh(b*x + c) + (3*(cosh(-a + c) ^2 + 1)*cosh(b*x + c)^2 + (3*cosh(b*x + c)^2 + 1)*sinh(-a + c)^2 + cosh(-a + c)^2 - 2*(3*cosh(b*x + c)^2*cosh(-a + c) + cosh(-a + c))*sinh(-a + c) + 1)*sinh(b*x + c) - 2*(cosh(b*x + c)^3*cosh(-a + c) + cosh(b*x + c)*cosh(- a + c))*sinh(-a + c))*arctan(cosh(b*x + c) + sinh(b*x + c)) + 2*(2*cosh(b* x + c)^3*cosh(-a + c)^2 + (2*cosh(b*x + c)^3 + 3*cosh(b*x + c))*sinh(-a + c)^2 + 3*(cosh(-a + c)^2 - 1)*cosh(b*x + c) - 2*(2*cosh(b*x + c)^3*cosh(-a + c) + 3*cosh(b*x + c)*cosh(-a + c))*sinh(-a + c))*sinh(b*x + c) - 2*(cos h(b*x + c)^4*cosh(-a + c) + 3*cosh(b*x + c)^2*cosh(-a + c))*sinh(-a + c...
\[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=\int \cosh {\left (a + b x \right )} \tanh ^{2}{\left (b x + c \right )}\, dx \] Input:
integrate(cosh(b*x+a)*tanh(b*x+c)**2,x)
Output:
Integral(cosh(a + b*x)*tanh(b*x + c)**2, x)
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (45) = 90\).
Time = 0.12 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.29 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=\frac {{\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \arctan \left (e^{\left (-b x - c\right )}\right ) e^{\left (-a - c\right )}}{b} - \frac {e^{\left (-b x - a\right )}}{2 \, b} + \frac {{\left (3 \, e^{\left (2 \, a\right )} - 2 \, e^{\left (2 \, c\right )}\right )} e^{\left (-2 \, b x - 2 \, a\right )} + e^{\left (2 \, c\right )}}{2 \, b {\left (e^{\left (-b x - a + 2 \, c\right )} + e^{\left (-3 \, b x - a\right )}\right )}} \] Input:
integrate(cosh(b*x+a)*tanh(b*x+c)^2,x, algorithm="maxima")
Output:
(e^(2*a) + e^(2*c))*arctan(e^(-b*x - c))*e^(-a - c)/b - 1/2*e^(-b*x - a)/b + 1/2*((3*e^(2*a) - 2*e^(2*c))*e^(-2*b*x - 2*a) + e^(2*c))/(b*(e^(-b*x - a + 2*c) + e^(-3*b*x - a)))
Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (45) = 90\).
Time = 0.16 (sec) , antiderivative size = 97, normalized size of antiderivative = 2.16 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=-\frac {2 \, {\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \arctan \left (e^{\left (b x + c\right )}\right ) e^{\left (-a - c\right )} - \frac {2 \, e^{\left (2 \, b x + 4 \, a\right )} - 3 \, e^{\left (2 \, b x + 2 \, a + 2 \, c\right )} - e^{\left (2 \, a\right )}}{e^{\left (3 \, b x + 3 \, a + 2 \, c\right )} + e^{\left (b x + 3 \, a\right )}} - e^{\left (b x + a\right )}}{2 \, b} \] Input:
integrate(cosh(b*x+a)*tanh(b*x+c)^2,x, algorithm="giac")
Output:
-1/2*(2*(e^(2*a) + e^(2*c))*arctan(e^(b*x + c))*e^(-a - c) - (2*e^(2*b*x + 4*a) - 3*e^(2*b*x + 2*a + 2*c) - e^(2*a))/(e^(3*b*x + 3*a + 2*c) + e^(b*x + 3*a)) - e^(b*x + a))/b
Time = 1.12 (sec) , antiderivative size = 173, normalized size of antiderivative = 3.84 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=\frac {{\mathrm {e}}^{a+b\,x}}{2\,b}-\frac {{\mathrm {e}}^{-a-b\,x}}{2\,b}-\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{-a}\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{b\,x}\,\left (\sqrt {b^2}+{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{-2\,c}\,\sqrt {b^2}\right )}{b\,\sqrt {{\mathrm {e}}^{-2\,a}\,{\mathrm {e}}^{2\,c}\,\left (2\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{-2\,c}+{\mathrm {e}}^{4\,a}\,{\mathrm {e}}^{-4\,c}+1\right )}}\right )\,\sqrt {{\mathrm {e}}^{2\,c-2\,a}\,\left (2\,{\mathrm {e}}^{2\,a-2\,c}+{\mathrm {e}}^{4\,a-4\,c}+1\right )}}{\sqrt {b^2}}+\frac {{\mathrm {e}}^{a+b\,x}\,\left ({\mathrm {e}}^{2\,a-2\,c}-1\right )}{b\,\left ({\mathrm {e}}^{2\,a-2\,c}+{\mathrm {e}}^{2\,a+2\,b\,x}\right )} \] Input:
int(cosh(a + b*x)*tanh(c + b*x)^2,x)
Output:
exp(a + b*x)/(2*b) - exp(- a - b*x)/(2*b) - (atan((exp(-a)*exp(2*c)*exp(b* x)*((b^2)^(1/2) + exp(2*a)*exp(-2*c)*(b^2)^(1/2)))/(b*(exp(-2*a)*exp(2*c)* (2*exp(2*a)*exp(-2*c) + exp(4*a)*exp(-4*c) + 1))^(1/2)))*(exp(2*c - 2*a)*( 2*exp(2*a - 2*c) + exp(4*a - 4*c) + 1))^(1/2))/(b^2)^(1/2) + (exp(a + b*x) *(exp(2*a - 2*c) - 1))/(b*(exp(2*a - 2*c) + exp(2*a + 2*b*x)))
Time = 0.25 (sec) , antiderivative size = 154, normalized size of antiderivative = 3.42 \[ \int \cosh (a+b x) \tanh ^2(c+b x) \, dx=\frac {-2 e^{3 b x +2 a +2 c} \mathit {atan} \left (e^{b x +c}\right )-2 e^{3 b x +4 c} \mathit {atan} \left (e^{b x +c}\right )-2 e^{b x +2 a} \mathit {atan} \left (e^{b x +c}\right )-2 e^{b x +2 c} \mathit {atan} \left (e^{b x +c}\right )+e^{4 b x +2 a +3 c}+3 e^{2 b x +2 a +c}-3 e^{2 b x +3 c}-e^{c}}{2 e^{b x +a +c} b \left (e^{2 b x +2 c}+1\right )} \] Input:
int(cosh(b*x+a)*tanh(b*x+c)^2,x)
Output:
( - 2*e**(2*a + 3*b*x + 2*c)*atan(e**(b*x + c)) - 2*e**(3*b*x + 4*c)*atan( e**(b*x + c)) - 2*e**(2*a + b*x)*atan(e**(b*x + c)) - 2*e**(b*x + 2*c)*ata n(e**(b*x + c)) + e**(2*a + 4*b*x + 3*c) + 3*e**(2*a + 2*b*x + c) - 3*e**( 2*b*x + 3*c) - e**c)/(2*e**(a + b*x + c)*b*(e**(2*b*x + 2*c) + 1))