Integrand size = 21, antiderivative size = 53 \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {b \arctan \left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{3/2} d}+\frac {\sinh (c+d x)}{(a+b) d} \] Output:
b*arctan((a+b)^(1/2)*sinh(d*x+c)/a^(1/2))/a^(1/2)/(a+b)^(3/2)/d+sinh(d*x+c )/(a+b)/d
Time = 0.08 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {b \arctan \left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{3/2} d}+\frac {\sinh (c+d x)}{(a+b) d} \] Input:
Integrate[Cosh[c + d*x]/(a + b*Tanh[c + d*x]^2),x]
Output:
(b*ArcTan[(Sqrt[a + b]*Sinh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(3/2)*d) + Sinh[c + d*x]/((a + b)*d)
Time = 0.44 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4159, 299, 218}
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 {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (i c+i d x) \left (a-b \tan (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 4159 |
\(\displaystyle \frac {\int \frac {\sinh ^2(c+d x)+1}{(a+b) \sinh ^2(c+d x)+a}d\sinh (c+d x)}{d}\) |
\(\Big \downarrow \) 299 |
\(\displaystyle \frac {\frac {b \int \frac {1}{(a+b) \sinh ^2(c+d x)+a}d\sinh (c+d x)}{a+b}+\frac {\sinh (c+d x)}{a+b}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {b \arctan \left (\frac {\sqrt {a+b} \sinh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{3/2}}+\frac {\sinh (c+d x)}{a+b}}{d}\) |
Input:
Int[Cosh[c + d*x]/(a + b*Tanh[c + d*x]^2),x]
Output:
((b*ArcTan[(Sqrt[a + b]*Sinh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a + b)^(3/2)) + Sinh[c + d*x]/(a + b))/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x *((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 *p + 3)) Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && NeQ[2*p + 3, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ ))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 *x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(148\) vs. \(2(45)=90\).
Time = 1.37 (sec) , antiderivative size = 149, normalized size of antiderivative = 2.81
method | result | size |
risch | \(\frac {{\mathrm e}^{d x +c}}{2 \left (a +b \right ) d}-\frac {{\mathrm e}^{-d x -c}}{2 \left (a +b \right ) d}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 a \,{\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{\sqrt {-a^{2}-a b}}-1\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}\) | \(149\) |
derivativedivides | \(\frac {\frac {2 b a \left (\frac {\left (\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{a +b}-\frac {2}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d}\) | \(208\) |
default | \(\frac {\frac {2 b a \left (\frac {\left (\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{a +b}-\frac {2}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2}{\left (2 b +2 a \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d}\) | \(208\) |
Input:
int(cosh(d*x+c)/(a+tanh(d*x+c)^2*b),x,method=_RETURNVERBOSE)
Output:
1/2/(a+b)/d*exp(d*x+c)-1/2/(a+b)/d*exp(-d*x-c)-1/2/(-a^2-a*b)^(1/2)*b/(a+b )/d*ln(exp(2*d*x+2*c)-2*a/(-a^2-a*b)^(1/2)*exp(d*x+c)-1)+1/2/(-a^2-a*b)^(1 /2)*b/(a+b)/d*ln(exp(2*d*x+2*c)+2*a/(-a^2-a*b)^(1/2)*exp(d*x+c)-1)
Leaf count of result is larger than twice the leaf count of optimal. 302 vs. \(2 (45) = 90\).
Time = 0.12 (sec) , antiderivative size = 773, normalized size of antiderivative = 14.58 \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\text {Too large to display} \] Input:
integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x, algorithm="fricas")
Output:
[1/2*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + a*b)*sinh(d*x + c)^2 - sqrt(-a^2 - a*b)*(b*cosh(d*x + c) + b* sinh(d*x + c))*log(((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh (d*x + c)^3 + (a + b)*sinh(d*x + c)^4 - 2*(3*a + b)*cosh(d*x + c)^2 + 2*(3 *(a + b)*cosh(d*x + c)^2 - 3*a - b)*sinh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 - (3*a + b)*cosh(d*x + c))*sinh(d*x + c) - 4*(cosh(d*x + c)^3 + 3*c osh(d*x + c)*sinh(d*x + c)^2 + sinh(d*x + c)^3 + (3*cosh(d*x + c)^2 - 1)*s inh(d*x + c) - cosh(d*x + c))*sqrt(-a^2 - a*b) + a + b)/((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*sinh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 + 2*(a - b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 + a - b)*sinh( d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 + (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)) - a^2 - a*b)/((a^3 + 2*a^2*b + a*b^2)*d*cosh(d*x + c) + (a^ 3 + 2*a^2*b + a*b^2)*d*sinh(d*x + c)), 1/2*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + a*b)*sinh(d*x + c)^2 + 2*sqrt(a^2 + a*b)*(b*cosh(d*x + c) + b*sinh(d*x + c))*arctan(1/2*((a + b)* cosh(d*x + c)^3 + 3*(a + b)*cosh(d*x + c)*sinh(d*x + c)^2 + (a + b)*sinh(d *x + c)^3 + (3*a - b)*cosh(d*x + c) + (3*(a + b)*cosh(d*x + c)^2 + 3*a - b )*sinh(d*x + c))/sqrt(a^2 + a*b)) - 2*sqrt(a^2 + a*b)*(b*cosh(d*x + c) + b *sinh(d*x + c))*arctan(2*sqrt(a^2 + a*b)/((a + b)*cosh(d*x + c) + (a + b)* sinh(d*x + c))) - a^2 - a*b)/((a^3 + 2*a^2*b + a*b^2)*d*cosh(d*x + c) +...
\[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {\cosh {\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)**2),x)
Output:
Integral(cosh(c + d*x)/(a + b*tanh(c + d*x)**2), x)
\[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {\cosh \left (d x + c\right )}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \] Input:
integrate(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x, algorithm="maxima")
Output:
1/2*(e^(2*d*x + 2*c) - 1)*e^(-d*x)/(a*d*e^c + b*d*e^c) + 1/2*integrate(4*( b*e^(3*d*x + 3*c) + b*e^(d*x + c))/(a^2 + 2*a*b + b^2 + (a^2*e^(4*c) + 2*a *b*e^(4*c) + b^2*e^(4*c))*e^(4*d*x) + 2*(a^2*e^(2*c) - b^2*e^(2*c))*e^(2*d *x)), x)
Exception generated. \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(cosh(d*x+c)/(a+b*tanh(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 = 2.77 (sec) , antiderivative size = 154, normalized size of antiderivative = 2.91 \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {{\mathrm {e}}^{c+d\,x}}{2\,d\,\left (a+b\right )}-\frac {{\mathrm {e}}^{-c-d\,x}}{2\,d\,\left (a+b\right )}-\frac {b\,\ln \left (\sqrt {-a}\,\sqrt {a+b}+2\,a\,{\mathrm {e}}^{c+d\,x}-\sqrt {-a}\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\sqrt {a+b}\right )}{2\,\sqrt {-a}\,d\,{\left (a+b\right )}^{3/2}}+\frac {b\,\ln \left (2\,a\,{\mathrm {e}}^{c+d\,x}-\sqrt {-a}\,\sqrt {a+b}+\sqrt {-a}\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\sqrt {a+b}\right )}{2\,\sqrt {-a}\,d\,{\left (a+b\right )}^{3/2}} \] Input:
int(cosh(c + d*x)/(a + b*tanh(c + d*x)^2),x)
Output:
exp(c + d*x)/(2*d*(a + b)) - exp(- c - d*x)/(2*d*(a + b)) - (b*log((-a)^(1 /2)*(a + b)^(1/2) + 2*a*exp(c + d*x) - (-a)^(1/2)*exp(2*c + 2*d*x)*(a + b) ^(1/2)))/(2*(-a)^(1/2)*d*(a + b)^(3/2)) + (b*log(2*a*exp(c + d*x) - (-a)^( 1/2)*(a + b)^(1/2) + (-a)^(1/2)*exp(2*c + 2*d*x)*(a + b)^(1/2)))/(2*(-a)^( 1/2)*d*(a + b)^(3/2))
Time = 0.25 (sec) , antiderivative size = 195, normalized size of antiderivative = 3.68 \[ \int \frac {\cosh (c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {2 e^{d x +c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}-\sqrt {b}}{\sqrt {a}}\right ) b +2 e^{d x +c} \sqrt {a}\, \sqrt {a +b}\, \mathit {atan} \left (\frac {e^{d x +c} \sqrt {a +b}+\sqrt {b}}{\sqrt {a}}\right ) b -e^{2 d x +2 c} a b -e^{2 d x +2 c} b^{2}+2 e^{d x +c} \sinh \left (d x +c \right ) a^{2}+4 e^{d x +c} \sinh \left (d x +c \right ) a b +2 e^{d x +c} \sinh \left (d x +c \right ) b^{2}+a b +b^{2}}{2 e^{d x +c} a d \left (a^{2}+2 a b +b^{2}\right )} \] Input:
int(cosh(d*x+c)/(a+b*tanh(d*x+c)^2),x)
Output:
(2*e**(c + d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqrt(a + b) - sqrt( b))/sqrt(a))*b + 2*e**(c + d*x)*sqrt(a)*sqrt(a + b)*atan((e**(c + d*x)*sqr t(a + b) + sqrt(b))/sqrt(a))*b - e**(2*c + 2*d*x)*a*b - e**(2*c + 2*d*x)*b **2 + 2*e**(c + d*x)*sinh(c + d*x)*a**2 + 4*e**(c + d*x)*sinh(c + d*x)*a*b + 2*e**(c + d*x)*sinh(c + d*x)*b**2 + a*b + b**2)/(2*e**(c + d*x)*a*d*(a* *2 + 2*a*b + b**2))