Integrand size = 12, antiderivative size = 86 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\frac {2 a \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2} d}-\frac {b \sinh (c+d x)}{\left (a^2-b^2\right ) d (a+b \cosh (c+d x))} \] Output:
2*a*arctanh((a-b)^(1/2)*tanh(1/2*d*x+1/2*c)/(a+b)^(1/2))/(a-b)^(3/2)/(a+b) ^(3/2)/d-b*sinh(d*x+c)/(a^2-b^2)/d/(a+b*cosh(d*x+c))
Time = 0.19 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.98 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\frac {\frac {2 a \arctan \left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{3/2}}-\frac {b \sinh (c+d x)}{(a-b) (a+b) (a+b \cosh (c+d x))}}{d} \] Input:
Integrate[(a + b*Cosh[c + d*x])^(-2),x]
Output:
((2*a*ArcTan[((a - b)*Tanh[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^( 3/2) - (b*Sinh[c + d*x])/((a - b)*(a + b)*(a + b*Cosh[c + d*x])))/d
Time = 0.34 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.13, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {3042, 3143, 25, 27, 3042, 3138, 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 {1}{(a+b \cosh (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a+b \sin \left (i c+i d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3143 |
\(\displaystyle -\frac {\int -\frac {a}{a+b \cosh (c+d x)}dx}{a^2-b^2}-\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a}{a+b \cosh (c+d x)}dx}{a^2-b^2}-\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a \int \frac {1}{a+b \cosh (c+d x)}dx}{a^2-b^2}-\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}+\frac {a \int \frac {1}{a+b \sin \left (i c+i d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle -\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}-\frac {2 i a \int \frac {1}{-\left ((a-b) \tanh ^2\left (\frac {1}{2} (c+d x)\right )\right )+a+b}d\left (i \tanh \left (\frac {1}{2} (c+d x)\right )\right )}{d \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {2 a \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )}-\frac {b \sinh (c+d x)}{d \left (a^2-b^2\right ) (a+b \cosh (c+d x))}\) |
Input:
Int[(a + b*Cosh[c + d*x])^(-2),x]
Output:
(2*a*ArcTanh[(Sqrt[a - b]*Tanh[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sq rt[a + b]*(a^2 - b^2)*d) - (b*Sinh[c + d*x])/((a^2 - b^2)*d*(a + b*Cosh[c + d*x]))
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_)^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_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos [c + d*x]*((a + b*Sin[c + d*x])^(n + 1)/(d*(n + 1)*(a^2 - b^2))), x] + Simp [1/((n + 1)*(a^2 - b^2)) Int[(a + b*Sin[c + d*x])^(n + 1)*Simp[a*(n + 1) - b*(n + 2)*Sin[c + d*x], x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && IntegerQ[2*n]
Time = 0.41 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.37
method | result | size |
derivativedivides | \(\frac {\frac {2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-a -b \right )}+\frac {2 a \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(118\) |
default | \(\frac {\frac {2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-a -b \right )}+\frac {2 a \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(118\) |
risch | \(\frac {2 \,{\mathrm e}^{d x +c} a +2 b}{d \left (a^{2}-b^{2}\right ) \left ({\mathrm e}^{2 d x +2 c} b +2 \,{\mathrm e}^{d x +c} a +b \right )}+\frac {a \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}-b^{2}}-a^{2}+b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}-\frac {a \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}-b^{2}}+a^{2}-b^{2}}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}\) | \(199\) |
Input:
int(1/(a+b*cosh(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(2*b/(a^2-b^2)*tanh(1/2*d*x+1/2*c)/(tanh(1/2*d*x+1/2*c)^2*a-b*tanh(1/2 *d*x+1/2*c)^2-a-b)+2*a/(a+b)/(a-b)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tanh( 1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 316 vs. \(2 (77) = 154\).
Time = 0.12 (sec) , antiderivative size = 743, normalized size of antiderivative = 8.64 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx =\text {Too large to display} \] Input:
integrate(1/(a+b*cosh(d*x+c))^2,x, algorithm="fricas")
Output:
[(2*a^2*b - 2*b^3 - (a*b*cosh(d*x + c)^2 + a*b*sinh(d*x + c)^2 + 2*a^2*cos h(d*x + c) + a*b + 2*(a*b*cosh(d*x + c) + a^2)*sinh(d*x + c))*sqrt(a^2 - b ^2)*log((b^2*cosh(d*x + c)^2 + b^2*sinh(d*x + c)^2 + 2*a*b*cosh(d*x + c) + 2*a^2 - b^2 + 2*(b^2*cosh(d*x + c) + a*b)*sinh(d*x + c) + 2*sqrt(a^2 - b^ 2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a))/(b*cosh(d*x + c)^2 + b*sinh(d* x + c)^2 + 2*a*cosh(d*x + c) + 2*(b*cosh(d*x + c) + a)*sinh(d*x + c) + b)) + 2*(a^3 - a*b^2)*cosh(d*x + c) + 2*(a^3 - a*b^2)*sinh(d*x + c))/((a^4*b - 2*a^2*b^3 + b^5)*d*cosh(d*x + c)^2 + (a^4*b - 2*a^2*b^3 + b^5)*d*sinh(d* x + c)^2 + 2*(a^5 - 2*a^3*b^2 + a*b^4)*d*cosh(d*x + c) + (a^4*b - 2*a^2*b^ 3 + b^5)*d + 2*((a^4*b - 2*a^2*b^3 + b^5)*d*cosh(d*x + c) + (a^5 - 2*a^3*b ^2 + a*b^4)*d)*sinh(d*x + c)), 2*(a^2*b - b^3 - (a*b*cosh(d*x + c)^2 + a*b *sinh(d*x + c)^2 + 2*a^2*cosh(d*x + c) + a*b + 2*(a*b*cosh(d*x + c) + a^2) *sinh(d*x + c))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a)/(a^2 - b^2)) + (a^3 - a*b^2)*cosh(d*x + c) + (a^3 - a*b^2)*sinh(d*x + c))/((a^4*b - 2*a^2*b^3 + b^5)*d*cosh(d*x + c)^2 + (a^ 4*b - 2*a^2*b^3 + b^5)*d*sinh(d*x + c)^2 + 2*(a^5 - 2*a^3*b^2 + a*b^4)*d*c osh(d*x + c) + (a^4*b - 2*a^2*b^3 + b^5)*d + 2*((a^4*b - 2*a^2*b^3 + b^5)* d*cosh(d*x + c) + (a^5 - 2*a^3*b^2 + a*b^4)*d)*sinh(d*x + c))]
Leaf count of result is larger than twice the leaf count of optimal. 2332 vs. \(2 (70) = 140\).
Time = 37.76 (sec) , antiderivative size = 2332, normalized size of antiderivative = 27.12 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\text {Too large to display} \] Input:
integrate(1/(a+b*cosh(d*x+c))**2,x)
Output:
Piecewise((zoo*x/cosh(c)**2, Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (-tanh(c/2 + d*x/2)**3/(6*b**2*d) + tanh(c/2 + d*x/2)/(2*b**2*d), Eq(a, b)), (1/(2*b** 2*d*tanh(c/2 + d*x/2)) - 1/(6*b**2*d*tanh(c/2 + d*x/2)**3), Eq(a, -b)), (x /(a + b*cosh(c))**2, Eq(d, 0)), (-a**2*log(-sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/2))*tanh(c/2 + d*x/2)**2/(a**4*d*sqrt(a/(a - b) + b/(a - b) )*tanh(c/2 + d*x/2)**2 - a**4*d*sqrt(a/(a - b) + b/(a - b)) - 2*a**3*b*d*s qrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 + 2*a**2*b**2*d*sqrt(a/(a - b) + b/(a - b)) + 2*a*b**3*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/ 2)**2 - b**4*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**4*d*s qrt(a/(a - b) + b/(a - b))) + a**2*log(-sqrt(a/(a - b) + b/(a - b)) + tanh (c/2 + d*x/2))/(a**4*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - a**4*d*sqrt(a/(a - b) + b/(a - b)) - 2*a**3*b*d*sqrt(a/(a - b) + b/(a - b) )*tanh(c/2 + d*x/2)**2 + 2*a**2*b**2*d*sqrt(a/(a - b) + b/(a - b)) + 2*a*b **3*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**4*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**4*d*sqrt(a/(a - b) + b/(a - b) )) + a**2*log(sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/2))*tanh(c/2 + d*x/2)**2/(a**4*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - a**4* d*sqrt(a/(a - b) + b/(a - b)) - 2*a**3*b*d*sqrt(a/(a - b) + b/(a - b))*tan h(c/2 + d*x/2)**2 + 2*a**2*b**2*d*sqrt(a/(a - b) + b/(a - b)) + 2*a*b**3*d *sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**4*d*sqrt(a/(a - ...
Exception generated. \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(1/(a+b*cosh(d*x+c))^2,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.11 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.15 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\frac {2 \, {\left (\frac {a \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{{\left (a^{2} - b^{2}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {a e^{\left (d x + c\right )} + b}{{\left (a^{2} - b^{2}\right )} {\left (b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a e^{\left (d x + c\right )} + b\right )}}\right )}}{d} \] Input:
integrate(1/(a+b*cosh(d*x+c))^2,x, algorithm="giac")
Output:
2*(a*arctan((b*e^(d*x + c) + a)/sqrt(-a^2 + b^2))/((a^2 - b^2)*sqrt(-a^2 + b^2)) + (a*e^(d*x + c) + b)/((a^2 - b^2)*(b*e^(2*d*x + 2*c) + 2*a*e^(d*x + c) + b)))/d
Time = 2.43 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.50 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\frac {\frac {2\,b^2}{d\,\left (a^2\,b-b^3\right )}+\frac {2\,a\,b\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2\,b-b^3\right )}}{b+2\,a\,{\mathrm {e}}^{c+d\,x}+b\,{\mathrm {e}}^{2\,c+2\,d\,x}}+\frac {a\,\ln \left (-\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{b\,\left (a^2-b^2\right )}-\frac {2\,a\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}\right )}{d\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}-\frac {a\,\ln \left (\frac {2\,a\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}-\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{b\,\left (a^2-b^2\right )}\right )}{d\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}} \] Input:
int(1/(a + b*cosh(c + d*x))^2,x)
Output:
((2*b^2)/(d*(a^2*b - b^3)) + (2*a*b*exp(c + d*x))/(d*(a^2*b - b^3)))/(b + 2*a*exp(c + d*x) + b*exp(2*c + 2*d*x)) + (a*log(- (2*a*exp(c + d*x))/(b*(a ^2 - b^2)) - (2*a*(b + a*exp(c + d*x)))/(b*(a + b)^(3/2)*(a - b)^(3/2))))/ (d*(a + b)^(3/2)*(a - b)^(3/2)) - (a*log((2*a*(b + a*exp(c + d*x)))/(b*(a + b)^(3/2)*(a - b)^(3/2)) - (2*a*exp(c + d*x))/(b*(a^2 - b^2))))/(d*(a + b )^(3/2)*(a - b)^(3/2))
Time = 0.21 (sec) , antiderivative size = 286, normalized size of antiderivative = 3.33 \[ \int \frac {1}{(a+b \cosh (c+d x))^2} \, dx=\frac {-2 e^{2 d x +2 c} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) a b -4 e^{d x +c} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) a^{2}-2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} b +a}{\sqrt {-a^{2}+b^{2}}}\right ) a b -e^{2 d x +2 c} a^{2} b +e^{2 d x +2 c} b^{3}+a^{2} b -b^{3}}{d \left (e^{2 d x +2 c} a^{4} b -2 e^{2 d x +2 c} a^{2} b^{3}+e^{2 d x +2 c} b^{5}+2 e^{d x +c} a^{5}-4 e^{d x +c} a^{3} b^{2}+2 e^{d x +c} a \,b^{4}+a^{4} b -2 a^{2} b^{3}+b^{5}\right )} \] Input:
int(1/(a+b*cosh(d*x+c))^2,x)
Output:
( - 2*e**(2*c + 2*d*x)*sqrt( - a**2 + b**2)*atan((e**(c + d*x)*b + a)/sqrt ( - a**2 + b**2))*a*b - 4*e**(c + d*x)*sqrt( - a**2 + b**2)*atan((e**(c + d*x)*b + a)/sqrt( - a**2 + b**2))*a**2 - 2*sqrt( - a**2 + b**2)*atan((e**( c + d*x)*b + a)/sqrt( - a**2 + b**2))*a*b - e**(2*c + 2*d*x)*a**2*b + e**( 2*c + 2*d*x)*b**3 + a**2*b - b**3)/(d*(e**(2*c + 2*d*x)*a**4*b - 2*e**(2*c + 2*d*x)*a**2*b**3 + e**(2*c + 2*d*x)*b**5 + 2*e**(c + d*x)*a**5 - 4*e**( c + d*x)*a**3*b**2 + 2*e**(c + d*x)*a*b**4 + a**4*b - 2*a**2*b**3 + b**5))