Integrand size = 23, antiderivative size = 45 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=-\frac {\log (\cosh (c+d x))}{b d}+\frac {(a+b) \log \left (b+a \cosh ^2(c+d x)\right )}{2 a b d} \] Output:
-ln(cosh(d*x+c))/b/d+1/2*(a+b)*ln(b+a*cosh(d*x+c)^2)/a/b/d
Time = 0.09 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.91 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {-2 a \log (\cosh (c+d x))+(a+b) \log \left (b+a \cosh ^2(c+d x)\right )}{2 a b d} \] Input:
Integrate[Tanh[c + d*x]^3/(a + b*Sech[c + d*x]^2),x]
Output:
(-2*a*Log[Cosh[c + d*x]] + (a + b)*Log[b + a*Cosh[c + d*x]^2])/(2*a*b*d)
Time = 0.30 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 26, 4626, 354, 86, 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 \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {i \tan (i c+i d x)^3}{a+b \sec (i c+i d x)^2}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle i \int \frac {\tan (i c+i d x)^3}{b \sec (i c+i d x)^2+a}dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \frac {\left (1-\cosh ^2(c+d x)\right ) \text {sech}(c+d x)}{a \cosh ^2(c+d x)+b}d\cosh (c+d x)}{d}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle -\frac {\int \frac {\left (1-\cosh ^2(c+d x)\right ) \text {sech}(c+d x)}{a \cosh ^2(c+d x)+b}d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle -\frac {\int \left (\frac {-a-b}{b \left (a \cosh ^2(c+d x)+b\right )}+\frac {\text {sech}(c+d x)}{b}\right )d\cosh ^2(c+d x)}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {\log \left (\cosh ^2(c+d x)\right )}{b}-\frac {(a+b) \log \left (a \cosh ^2(c+d x)+b\right )}{a b}}{2 d}\) |
Input:
Int[Tanh[c + d*x]^3/(a + b*Sech[c + d*x]^2),x]
Output:
-1/2*(Log[Cosh[c + d*x]^2]/b - ((a + b)*Log[b + a*Cosh[c + d*x]^2])/(a*b)) /d
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_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(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] && IntegerQ [(m - 1)/2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(114\) vs. \(2(43)=86\).
Time = 1.61 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.56
method | result | size |
risch | \(-\frac {x}{a}-\frac {2 c}{d a}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{4 d x +4 c}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 d x +2 c}}{a}+1\right )}{2 b d}+\frac {\ln \left ({\mathrm e}^{4 d x +4 c}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 d x +2 c}}{a}+1\right )}{2 a d}\) | \(115\) |
derivativedivides | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a}+\frac {2 \left (\frac {a}{4}+\frac {b}{4}\right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )}{a b}-\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a}}{d}\) | \(132\) |
default | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a}+\frac {2 \left (\frac {a}{4}+\frac {b}{4}\right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a +b \right )}{a b}-\frac {\ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a}}{d}\) | \(132\) |
Input:
int(tanh(d*x+c)^3/(a+b*sech(d*x+c)^2),x,method=_RETURNVERBOSE)
Output:
-x/a-2/d/a*c-1/b/d*ln(exp(2*d*x+2*c)+1)+1/2/b/d*ln(exp(4*d*x+4*c)+2*(a+2*b )/a*exp(2*d*x+2*c)+1)+1/2/a/d*ln(exp(4*d*x+4*c)+2*(a+2*b)/a*exp(2*d*x+2*c) +1)
Leaf count of result is larger than twice the leaf count of optimal. 112 vs. \(2 (43) = 86\).
Time = 0.35 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.49 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=-\frac {2 \, b d x - {\left (a + b\right )} \log \left (\frac {2 \, {\left (a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + a + 2 \, b\right )}}{\cosh \left (d x + c\right )^{2} - 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2}}\right ) + 2 \, a \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{2 \, a b d} \] Input:
integrate(tanh(d*x+c)^3/(a+b*sech(d*x+c)^2),x, algorithm="fricas")
Output:
-1/2*(2*b*d*x - (a + b)*log(2*(a*cosh(d*x + c)^2 + a*sinh(d*x + c)^2 + a + 2*b)/(cosh(d*x + c)^2 - 2*cosh(d*x + c)*sinh(d*x + c) + sinh(d*x + c)^2)) + 2*a*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))))/(a*b*d)
\[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\int \frac {\tanh ^{3}{\left (c + d x \right )}}{a + b \operatorname {sech}^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(tanh(d*x+c)**3/(a+b*sech(d*x+c)**2),x)
Output:
Integral(tanh(c + d*x)**3/(a + b*sech(c + d*x)**2), x)
Time = 0.15 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.71 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {d x + c}{a d} + \frac {{\left (a + b\right )} \log \left (2 \, {\left (a + 2 \, b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a e^{\left (-4 \, d x - 4 \, c\right )} + a\right )}{2 \, a b d} - \frac {\log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{b d} \] Input:
integrate(tanh(d*x+c)^3/(a+b*sech(d*x+c)^2),x, algorithm="maxima")
Output:
(d*x + c)/(a*d) + 1/2*(a + b)*log(2*(a + 2*b)*e^(-2*d*x - 2*c) + a*e^(-4*d *x - 4*c) + a)/(a*b*d) - log(e^(-2*d*x - 2*c) + 1)/(b*d)
Exception generated. \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(tanh(d*x+c)^3/(a+b*sech(d*x+c)^2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Limit: Max order reached or unable to make series expansion Error: Bad Argument Value
Time = 0.33 (sec) , antiderivative size = 238, normalized size of antiderivative = 5.29 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {\ln \left (a\,b+3\,a^2+6\,a^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+3\,a^2\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{4\,d\,x}+4\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+14\,a\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+a\,b\,{\mathrm {e}}^{4\,c}\,{\mathrm {e}}^{4\,d\,x}\right )\,\left (a+b\right )}{2\,a\,b\,d}-\frac {\ln \left (21\,a\,b^4+108\,a^4\,b+27\,a^5+2\,b^5+82\,a^2\,b^3+144\,a^3\,b^2+27\,a^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+2\,b^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+21\,a\,b^4\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+108\,a^4\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+82\,a^2\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+144\,a^3\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\right )}{b\,d}-\frac {x}{a} \] Input:
int(tanh(c + d*x)^3/(a + b/cosh(c + d*x)^2),x)
Output:
(log(a*b + 3*a^2 + 6*a^2*exp(2*c)*exp(2*d*x) + 3*a^2*exp(4*c)*exp(4*d*x) + 4*b^2*exp(2*c)*exp(2*d*x) + 14*a*b*exp(2*c)*exp(2*d*x) + a*b*exp(4*c)*exp (4*d*x))*(a + b))/(2*a*b*d) - log(21*a*b^4 + 108*a^4*b + 27*a^5 + 2*b^5 + 82*a^2*b^3 + 144*a^3*b^2 + 27*a^5*exp(2*c)*exp(2*d*x) + 2*b^5*exp(2*c)*exp (2*d*x) + 21*a*b^4*exp(2*c)*exp(2*d*x) + 108*a^4*b*exp(2*c)*exp(2*d*x) + 8 2*a^2*b^3*exp(2*c)*exp(2*d*x) + 144*a^3*b^2*exp(2*c)*exp(2*d*x))/(b*d) - x /a
Time = 0.23 (sec) , antiderivative size = 213, normalized size of antiderivative = 4.73 \[ \int \frac {\tanh ^3(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx=\frac {-2 \,\mathrm {log}\left (e^{2 d x +2 c}+1\right ) a +\mathrm {log}\left (-\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a +\mathrm {log}\left (-\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) b +\mathrm {log}\left (\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) a +\mathrm {log}\left (\sqrt {2 \sqrt {b}\, \sqrt {a +b}-a -2 b}+e^{d x +c} \sqrt {a}\right ) b +\mathrm {log}\left (2 \sqrt {b}\, \sqrt {a +b}+e^{2 d x +2 c} a +a +2 b \right ) a +\mathrm {log}\left (2 \sqrt {b}\, \sqrt {a +b}+e^{2 d x +2 c} a +a +2 b \right ) b -2 b d x}{2 a b d} \] Input:
int(tanh(d*x+c)^3/(a+b*sech(d*x+c)^2),x)
Output:
( - 2*log(e**(2*c + 2*d*x) + 1)*a + log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*a + log( - sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*b + log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b ) + e**(c + d*x)*sqrt(a))*a + log(sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b) + e**(c + d*x)*sqrt(a))*b + log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)*a + log(2*sqrt(b)*sqrt(a + b) + e**(2*c + 2*d*x)*a + a + 2*b)*b - 2*b*d*x)/(2*a*b*d)