Integrand size = 15, antiderivative size = 52 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=-\frac {\text {arctanh}\left (\frac {b-a \tanh (x)}{\sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log (a+b \sinh (2 x))}{4 b} \] Output:
-1/2*arctanh((b-a*tanh(x))/(a^2+b^2)^(1/2))/(a^2+b^2)^(1/2)+1/4*ln(a+b*sin h(2*x))/b
Time = 0.06 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.13 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {1}{4} \left (\frac {2 \arctan \left (\frac {b-a \tanh (x)}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}+\frac {\log (a+b \sinh (2 x))}{b}\right ) \] Input:
Integrate[Cosh[x]^2/(a + b*Sinh[2*x]),x]
Output:
((2*ArcTan[(b - a*Tanh[x])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] + Log[a + b *Sinh[2*x]]/b)/4
Time = 0.37 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.42, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3042, 4889, 1301, 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 {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (i x)^2}{a-i b \sin (2 i x)}dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \int \frac {1}{\left (1-\tanh ^2(x)\right ) \left (-a \tanh ^2(x)+a+2 b \tanh (x)\right )}d\tanh (x)\) |
\(\Big \downarrow \) 1301 |
\(\displaystyle -\int \left (-\frac {\tanh (x)}{2 b \left (1-\tanh ^2(x)\right )}-\frac {2 b-a \tanh (x)}{2 b \left (-a \tanh ^2(x)+2 b \tanh (x)+a\right )}\right )d\tanh (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\text {arctanh}\left (\frac {b-a \tanh (x)}{\sqrt {a^2+b^2}}\right )}{2 \sqrt {a^2+b^2}}+\frac {\log \left (-a \tanh ^2(x)+a+2 b \tanh (x)\right )}{4 b}-\frac {\log \left (1-\tanh ^2(x)\right )}{4 b}\) |
Input:
Int[Cosh[x]^2/(a + b*Sinh[2*x]),x]
Output:
-1/2*ArcTanh[(b - a*Tanh[x])/Sqrt[a^2 + b^2]]/Sqrt[a^2 + b^2] - Log[1 - Ta nh[x]^2]/(4*b) + Log[a + 2*b*Tanh[x] - a*Tanh[x]^2]/(4*b)
Int[((a_.) + (c_.)*(x_)^2)^(p_)*((d_.) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x _Symbol] :> With[{r = Rt[(-a)*c, 2]}, Simp[1/c^p Int[ExpandIntegrand[(-r + c*x)^p*(r + c*x)^p*(d + e*x + f*x^2)^q, x], x], x] /; EqQ[p, -1] || !Fra ctionalPowerFactorQ[r]] /; FreeQ[{a, c, d, e, f}, x] && ILtQ[p, 0] && Integ erQ[q] && NiceSqrtQ[(-a)*c]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Leaf count of result is larger than twice the leaf count of optimal. \(174\) vs. \(2(44)=88\).
Time = 1.32 (sec) , antiderivative size = 175, normalized size of antiderivative = 3.37
method | result | size |
default | \(\frac {a \left (\frac {\left (\frac {\sqrt {a^{2}+b^{2}}\, b}{2}+\frac {a^{2}}{2}+\frac {b^{2}}{2}\right ) \ln \left (a \tanh \left (\frac {x}{2}\right )^{2}+2 \sqrt {a^{2}+b^{2}}\, \tanh \left (\frac {x}{2}\right )+2 b \tanh \left (\frac {x}{2}\right )+a \right )}{2 a \left (a^{2}+b^{2}\right )}+\frac {\left (-\frac {\sqrt {a^{2}+b^{2}}\, b}{2}+\frac {a^{2}}{2}+\frac {b^{2}}{2}\right ) \ln \left (-a \tanh \left (\frac {x}{2}\right )^{2}+2 \sqrt {a^{2}+b^{2}}\, \tanh \left (\frac {x}{2}\right )-2 b \tanh \left (\frac {x}{2}\right )-a \right )}{2 a \left (a^{2}+b^{2}\right )}\right )}{b}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b}-\frac {\ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{2 b}\) | \(175\) |
risch | \(\frac {x}{2 b}-\frac {x \,a^{2} b}{b^{2} a^{2}+b^{4}}-\frac {x \,b^{3}}{b^{2} a^{2}+b^{4}}+\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right ) a^{2}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right ) \sqrt {b^{2} a^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right ) a^{2}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {b^{2} a^{2}+b^{4}}}{b^{2}}\right ) \sqrt {b^{2} a^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}\) | \(327\) |
Input:
int(cosh(x)^2/(a+b*sinh(2*x)),x,method=_RETURNVERBOSE)
Output:
1/b*a*(1/2/a/(a^2+b^2)*(1/2*(a^2+b^2)^(1/2)*b+1/2*a^2+1/2*b^2)*ln(a*tanh(1 /2*x)^2+2*(a^2+b^2)^(1/2)*tanh(1/2*x)+2*b*tanh(1/2*x)+a)+1/2/a/(a^2+b^2)*( -1/2*(a^2+b^2)^(1/2)*b+1/2*a^2+1/2*b^2)*ln(-a*tanh(1/2*x)^2+2*(a^2+b^2)^(1 /2)*tanh(1/2*x)-2*b*tanh(1/2*x)-a))-1/2/b*ln(tanh(1/2*x)-1)-1/2/b*ln(1+tan h(1/2*x))
Leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (46) = 92\).
Time = 0.13 (sec) , antiderivative size = 251, normalized size of antiderivative = 4.83 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\sqrt {a^{2} + b^{2}} b \log \left (\frac {b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, a b \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + a b\right )} \sinh \left (x\right )^{2} + 2 \, a^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + a b \cosh \left (x\right )\right )} \sinh \left (x\right ) - 2 \, {\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + a\right )} \sqrt {a^{2} + b^{2}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, a \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + a\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + a \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}\right ) - 2 \, {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right )}{4 \, {\left (a^{2} b + b^{3}\right )}} \] Input:
integrate(cosh(x)^2/(a+b*sinh(2*x)),x, algorithm="fricas")
Output:
1/4*(sqrt(a^2 + b^2)*b*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2* sinh(x)^4 + 2*a*b*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + a*b)*sinh(x)^2 + 2*a^2 + b^2 + 4*(b^2*cosh(x)^3 + a*b*cosh(x))*sinh(x) - 2*(b*cosh(x)^2 + 2*b*cos h(x)*sinh(x) + b*sinh(x)^2 + a)*sqrt(a^2 + b^2))/(b*cosh(x)^4 + 4*b*cosh(x )*sinh(x)^3 + b*sinh(x)^4 + 2*a*cosh(x)^2 + 2*(3*b*cosh(x)^2 + a)*sinh(x)^ 2 + 4*(b*cosh(x)^3 + a*cosh(x))*sinh(x) - b)) - 2*(a^2 + b^2)*x + (a^2 + b ^2)*log(2*(2*b*cosh(x)*sinh(x) + a)/(cosh(x)^2 - 2*cosh(x)*sinh(x) + sinh( x)^2)))/(a^2*b + b^3)
\[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\int \frac {\cosh ^{2}{\left (x \right )}}{a + b \sinh {\left (2 x \right )}}\, dx \] Input:
integrate(cosh(x)**2/(a+b*sinh(2*x)),x)
Output:
Integral(cosh(x)**2/(a + b*sinh(2*x)), x)
Time = 0.14 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.63 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\log \left (\frac {b e^{\left (-2 \, x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-2 \, x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left (b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b\right )}{4 \, b} \] Input:
integrate(cosh(x)^2/(a+b*sinh(2*x)),x, algorithm="maxima")
Output:
1/4*log((b*e^(-2*x) - a - sqrt(a^2 + b^2))/(b*e^(-2*x) - a + sqrt(a^2 + b^ 2)))/sqrt(a^2 + b^2) - 1/2*x/b + 1/4*log(b*e^(4*x) + 2*a*e^(2*x) - b)/b
Time = 0.12 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.77 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\log \left (\frac {{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (2 \, x\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{4 \, \sqrt {a^{2} + b^{2}}} - \frac {x}{2 \, b} + \frac {\log \left ({\left | b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - b \right |}\right )}{4 \, b} \] Input:
integrate(cosh(x)^2/(a+b*sinh(2*x)),x, algorithm="giac")
Output:
1/4*log(abs(2*b*e^(2*x) + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^(2*x) + 2*a + 2*sqrt(a^2 + b^2)))/sqrt(a^2 + b^2) - 1/2*x/b + 1/4*log(abs(b*e^(4*x) + 2 *a*e^(2*x) - b))/b
Time = 1.12 (sec) , antiderivative size = 137, normalized size of antiderivative = 2.63 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\mathrm {atan}\left (\frac {a}{\sqrt {-a^2-b^2}}+\frac {b\,{\mathrm {e}}^{2\,x}}{\sqrt {-a^2-b^2}}\right )}{2\,\sqrt {-a^2-b^2}}-\frac {x}{2\,b}+\frac {4\,b^3\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^4}+\frac {4\,a^2\,b\,\ln \left (2\,a\,{\mathrm {e}}^{2\,x}-b+b\,{\mathrm {e}}^{4\,x}\right )}{16\,a^2\,b^2+16\,b^4} \] Input:
int(cosh(x)^2/(a + b*sinh(2*x)),x)
Output:
atan(a/(- a^2 - b^2)^(1/2) + (b*exp(2*x))/(- a^2 - b^2)^(1/2))/(2*(- a^2 - b^2)^(1/2)) - x/(2*b) + (4*b^3*log(2*a*exp(2*x) - b + b*exp(4*x)))/(16*b^ 4 + 16*a^2*b^2) + (4*a^2*b*log(2*a*exp(2*x) - b + b*exp(4*x)))/(16*b^4 + 1 6*a^2*b^2)
Time = 0.22 (sec) , antiderivative size = 268, normalized size of antiderivative = 5.15 \[ \int \frac {\cosh ^2(x)}{a+b \sinh (2 x)} \, dx=\frac {\sqrt {a^{2}+b^{2}}\, \mathrm {log}\left (-\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) b -\sqrt {a^{2}+b^{2}}\, \mathrm {log}\left (\sqrt {a^{2}+b^{2}}+e^{2 x} b +a \right ) b +\sqrt {a^{2}+b^{2}}\, \mathrm {log}\left (\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) b +\mathrm {log}\left (-\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) a^{2}+\mathrm {log}\left (-\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) b^{2}+\mathrm {log}\left (\sqrt {a^{2}+b^{2}}+e^{2 x} b +a \right ) a^{2}+\mathrm {log}\left (\sqrt {a^{2}+b^{2}}+e^{2 x} b +a \right ) b^{2}+\mathrm {log}\left (\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) a^{2}+\mathrm {log}\left (\sqrt {\sqrt {a^{2}+b^{2}}-a}+e^{x} \sqrt {b}\right ) b^{2}-2 a^{2} x -2 b^{2} x}{4 b \left (a^{2}+b^{2}\right )} \] Input:
int(cosh(x)^2/(a+b*sinh(2*x)),x)
Output:
(sqrt(a**2 + b**2)*log( - sqrt(sqrt(a**2 + b**2) - a) + e**x*sqrt(b))*b - sqrt(a**2 + b**2)*log(sqrt(a**2 + b**2) + e**(2*x)*b + a)*b + sqrt(a**2 + b**2)*log(sqrt(sqrt(a**2 + b**2) - a) + e**x*sqrt(b))*b + log( - sqrt(sqrt (a**2 + b**2) - a) + e**x*sqrt(b))*a**2 + log( - sqrt(sqrt(a**2 + b**2) - a) + e**x*sqrt(b))*b**2 + log(sqrt(a**2 + b**2) + e**(2*x)*b + a)*a**2 + l og(sqrt(a**2 + b**2) + e**(2*x)*b + a)*b**2 + log(sqrt(sqrt(a**2 + b**2) - a) + e**x*sqrt(b))*a**2 + log(sqrt(sqrt(a**2 + b**2) - a) + e**x*sqrt(b)) *b**2 - 2*a**2*x - 2*b**2*x)/(4*b*(a**2 + b**2))