Integrand size = 15, antiderivative size = 39 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\frac {x}{b}-\frac {\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b} \] Output:
x/b-(a+b)^(1/2)*arctanh(a^(1/2)*tanh(x)/(a+b)^(1/2))/a^(1/2)/b
Time = 0.08 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\frac {x-\frac {\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a}}}{b} \] Input:
Integrate[Sinh[x]^2/(a + b*Cosh[x]^2),x]
Output:
(x - (Sqrt[a + b]*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/Sqrt[a])/b
Time = 0.25 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 25, 3670, 303, 219, 221}
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 {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\cos \left (\frac {\pi }{2}+i x\right )^2}{a+b \sin \left (\frac {\pi }{2}+i x\right )^2}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\cos \left (i x+\frac {\pi }{2}\right )^2}{b \sin \left (i x+\frac {\pi }{2}\right )^2+a}dx\) |
\(\Big \downarrow \) 3670 |
\(\displaystyle -\int \frac {1}{\left (1-\coth ^2(x)\right ) \left (a-(a+b) \coth ^2(x)\right )}d\coth (x)\) |
\(\Big \downarrow \) 303 |
\(\displaystyle \frac {\int \frac {1}{1-\coth ^2(x)}d\coth (x)}{b}-\frac {(a+b) \int \frac {1}{a-(a+b) \coth ^2(x)}d\coth (x)}{b}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\text {arctanh}(\coth (x))}{b}-\frac {(a+b) \int \frac {1}{a-(a+b) \coth ^2(x)}d\coth (x)}{b}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\text {arctanh}(\coth (x))}{b}-\frac {\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \coth (x)}{\sqrt {a}}\right )}{\sqrt {a} b}\) |
Input:
Int[Sinh[x]^2/(a + b*Cosh[x]^2),x]
Output:
ArcTanh[Coth[x]]/b - (Sqrt[a + b]*ArcTanh[(Sqrt[a + b]*Coth[x])/Sqrt[a]])/ (Sqrt[a]*b)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[1/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Simp[b/(b *c - a*d) Int[1/(a + b*x^2), x], x] - Simp[d/(b*c - a*d) Int[1/(c + d*x ^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Su bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(87\) vs. \(2(31)=62\).
Time = 1.52 (sec) , antiderivative size = 88, normalized size of antiderivative = 2.26
method | result | size |
risch | \(\frac {x}{b}+\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {a \left (a +b \right )}+2 a +b}{b}\right )}{2 a b}-\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {a \left (a +b \right )}-2 a -b}{b}\right )}{2 a b}\) | \(88\) |
default | \(\frac {2 \left (a +b \right ) \left (-\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )^{2}-2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}\right )}{b}-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {\ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{b}\) | \(110\) |
Input:
int(sinh(x)^2/(a+b*cosh(x)^2),x,method=_RETURNVERBOSE)
Output:
x/b+1/2/a*(a*(a+b))^(1/2)/b*ln(exp(2*x)+(2*(a*(a+b))^(1/2)+2*a+b)/b)-1/2/a *(a*(a+b))^(1/2)/b*ln(exp(2*x)-(2*(a*(a+b))^(1/2)-2*a-b)/b)
Time = 0.11 (sec) , antiderivative size = 300, normalized size of antiderivative = 7.69 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\left [\frac {\sqrt {\frac {a + b}{a}} \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 \, {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + 4 \, {\left (a b \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) \sinh \left (x\right ) + a b \sinh \left (x\right )^{2} + 2 \, a^{2} + a b\right )} \sqrt {\frac {a + b}{a}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + {\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 2 \, x}{2 \, b}, -\frac {\sqrt {-\frac {a + b}{a}} \arctan \left (\frac {{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt {-\frac {a + b}{a}}}{2 \, {\left (a + b\right )}}\right ) - x}{b}\right ] \] Input:
integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="fricas")
Output:
[1/2*(sqrt((a + b)/a)*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2*s inh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2 + 2*(3*b^2*cosh(x)^2 + 2*a*b + b^2)*s inh(x)^2 + 8*a^2 + 8*a*b + b^2 + 4*(b^2*cosh(x)^3 + (2*a*b + b^2)*cosh(x)) *sinh(x) + 4*(a*b*cosh(x)^2 + 2*a*b*cosh(x)*sinh(x) + a*b*sinh(x)^2 + 2*a^ 2 + a*b)*sqrt((a + b)/a))/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x) ^4 + 2*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b* cosh(x)^3 + (2*a + b)*cosh(x))*sinh(x) + b)) + 2*x)/b, -(sqrt(-(a + b)/a)* arctan(1/2*(b*cosh(x)^2 + 2*b*cosh(x)*sinh(x) + b*sinh(x)^2 + 2*a + b)*sqr t(-(a + b)/a)/(a + b)) - x)/b]
Timed out. \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\text {Timed out} \] Input:
integrate(sinh(x)**2/(a+b*cosh(x)**2),x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (31) = 62\).
Time = 0.15 (sec) , antiderivative size = 120, normalized size of antiderivative = 3.08 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=-\frac {{\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a} b} + \frac {\log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a}} + \frac {x}{b} \] Input:
integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="maxima")
Output:
-1/4*(2*a + b)*log((b*e^(2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(2*x) + 2*a + b + 2*sqrt((a + b)*a)))/(sqrt((a + b)*a)*b) + 1/4*log((b*e^(-2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(-2*x) + 2*a + b + 2*sqrt((a + b)*a)))/s qrt((a + b)*a) + x/b
Time = 0.12 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.33 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=-\frac {{\left (a + b\right )} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b} + \frac {x}{b} \] Input:
integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="giac")
Output:
-(a + b)*arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a *b)*b) + x/b
Time = 2.25 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.03 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\frac {x}{b}+\frac {\mathrm {atan}\left (\frac {\sqrt {-a\,b^2}}{2\,a\,\sqrt {a+b}}+\frac {\sqrt {-a\,b^2}}{b\,\sqrt {a+b}}+\frac {{\mathrm {e}}^{2\,x}\,\sqrt {-a\,b^2}}{2\,a\,\sqrt {a+b}}\right )\,\sqrt {a+b}}{\sqrt {-a\,b^2}} \] Input:
int(sinh(x)^2/(a + b*cosh(x)^2),x)
Output:
x/b + (atan((-a*b^2)^(1/2)/(2*a*(a + b)^(1/2)) + (-a*b^2)^(1/2)/(b*(a + b) ^(1/2)) + (exp(2*x)*(-a*b^2)^(1/2))/(2*a*(a + b)^(1/2)))*(a + b)^(1/2))/(- a*b^2)^(1/2)
Time = 0.28 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.74 \[ \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx=\frac {-\sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (-\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right )-\sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (\sqrt {2 \sqrt {a}\, \sqrt {a +b}-2 a -b}+e^{x} \sqrt {b}\right )+\sqrt {a}\, \sqrt {a +b}\, \mathrm {log}\left (2 \sqrt {a}\, \sqrt {a +b}+e^{2 x} b +2 a +b \right )+2 a x}{2 a b} \] Input:
int(sinh(x)^2/(a+b*cosh(x)^2),x)
Output:
( - sqrt(a)*sqrt(a + b)*log( - sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + e** x*sqrt(b)) - sqrt(a)*sqrt(a + b)*log(sqrt(2*sqrt(a)*sqrt(a + b) - 2*a - b) + e**x*sqrt(b)) + sqrt(a)*sqrt(a + b)*log(2*sqrt(a)*sqrt(a + b) + e**(2*x )*b + 2*a + b) + 2*a*x)/(2*a*b)