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} \]
Time = 0.08 (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 ) \]
Time = 0.35 (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}\) |
-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)
3.11.34.3.1 Defintions of rubi rules used
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]]
Time = 1.32 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.50
method | result | size |
default | \(-\frac {\ln \left (1+\tanh \left (x \right )\right )}{4 b}+\frac {\frac {\ln \left (a \tanh \left (x \right )^{2}-2 b \tanh \left (x \right )-a \right )}{2}+\frac {b \,\operatorname {arctanh}\left (\frac {2 a \tanh \left (x \right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{2 b}-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4 b}\) | \(78\) |
risch | \(\frac {x}{2 b}-\frac {x \,a^{2} b}{a^{2} b^{2}+b^{4}}-\frac {x \,b^{3}}{a^{2} b^{2}+b^{4}}+\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {a^{2} b^{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 {a^{2} b^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}+\frac {\ln \left ({\mathrm e}^{2 x}-\frac {-a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) \sqrt {a^{2} b^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}+\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {a^{2} b^{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 {a^{2} b^{2}+b^{4}}}{b^{2}}\right )}{4 a^{2}+4 b^{2}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {a b +\sqrt {a^{2} b^{2}+b^{4}}}{b^{2}}\right ) \sqrt {a^{2} b^{2}+b^{4}}}{4 \left (a^{2}+b^{2}\right ) b}\) | \(327\) |
-1/4/b*ln(1+tanh(x))+1/2/b*(1/2*ln(a*tanh(x)^2-2*b*tanh(x)-a)+b/(a^2+b^2)^ (1/2)*arctanh(1/2*(2*a*tanh(x)-2*b)/(a^2+b^2)^(1/2)))-1/4/b*ln(tanh(x)-1)
Leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (46) = 92\).
Time = 0.27 (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 )}} \]
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 \]
Time = 0.30 (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} \]
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.27 (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} \]
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 = 2.53 (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} \]