Integrand size = 19, antiderivative size = 255 \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\frac {x}{c}-\frac {2 \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {arctanh}\left (\frac {\sqrt {b-2 c-\sqrt {b^2-4 a c}} \tanh \left (\frac {x}{2}\right )}{\sqrt {b+2 c-\sqrt {b^2-4 a c}}}\right )}{c \sqrt {b-2 c-\sqrt {b^2-4 a c}} \sqrt {b+2 c-\sqrt {b^2-4 a c}}}-\frac {2 \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {arctanh}\left (\frac {\sqrt {b-2 c+\sqrt {b^2-4 a c}} \tanh \left (\frac {x}{2}\right )}{\sqrt {b+2 c+\sqrt {b^2-4 a c}}}\right )}{c \sqrt {b-2 c+\sqrt {b^2-4 a c}} \sqrt {b+2 c+\sqrt {b^2-4 a c}}} \] Output:
x/c-2*(b-(-2*a*c+b^2)/(-4*a*c+b^2)^(1/2))*arctanh((b-2*c-(-4*a*c+b^2)^(1/2 ))^(1/2)*tanh(1/2*x)/(b+2*c-(-4*a*c+b^2)^(1/2))^(1/2))/c/(b-2*c-(-4*a*c+b^ 2)^(1/2))^(1/2)/(b+2*c-(-4*a*c+b^2)^(1/2))^(1/2)-2*(b+(-2*a*c+b^2)/(-4*a*c +b^2)^(1/2))*arctanh((b-2*c+(-4*a*c+b^2)^(1/2))^(1/2)*tanh(1/2*x)/(b+2*c+( -4*a*c+b^2)^(1/2))^(1/2))/c/(b-2*c+(-4*a*c+b^2)^(1/2))^(1/2)/(b+2*c+(-4*a* c+b^2)^(1/2))^(1/2)
Time = 0.70 (sec) , antiderivative size = 264, normalized size of antiderivative = 1.04 \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\frac {x+\frac {\sqrt {2} \left (b^2-2 a c+b \sqrt {b^2-4 a c}\right ) \arctan \left (\frac {\left (b-2 c+\sqrt {b^2-4 a c}\right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {-2 b^2+4 c (a+c)-2 b \sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \sqrt {-b^2+2 c (a+c)-b \sqrt {b^2-4 a c}}}-\frac {\sqrt {2} \left (-b^2+2 a c+b \sqrt {b^2-4 a c}\right ) \arctan \left (\frac {\left (-b+2 c+\sqrt {b^2-4 a c}\right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {-2 b^2+4 c (a+c)+2 b \sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \sqrt {-b^2+2 c (a+c)+b \sqrt {b^2-4 a c}}}}{c} \] Input:
Integrate[Cosh[x]^2/(a + b*Cosh[x] + c*Cosh[x]^2),x]
Output:
(x + (Sqrt[2]*(b^2 - 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTan[((b - 2*c + Sqrt[ b^2 - 4*a*c])*Tanh[x/2])/Sqrt[-2*b^2 + 4*c*(a + c) - 2*b*Sqrt[b^2 - 4*a*c] ]])/(Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]]) - ( Sqrt[2]*(-b^2 + 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTan[((-b + 2*c + Sqrt[b^2 - 4*a*c])*Tanh[x/2])/Sqrt[-2*b^2 + 4*c*(a + c) + 2*b*Sqrt[b^2 - 4*a*c]]])/ (Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]]))/c
Time = 1.57 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3738, 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 \cosh (x)+c \cosh ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (i x)^2}{a+b \cos (i x)+c \cos (i x)^2}dx\) |
\(\Big \downarrow \) 3738 |
\(\displaystyle \int \left (\frac {-a-b \cosh (x)}{c \left (a+b \cosh (x)+c \cosh ^2(x)\right )}+\frac {1}{c}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \text {arctanh}\left (\frac {\tanh \left (\frac {x}{2}\right ) \sqrt {-\sqrt {b^2-4 a c}+b-2 c}}{\sqrt {-\sqrt {b^2-4 a c}+b+2 c}}\right )}{c \sqrt {-\sqrt {b^2-4 a c}+b-2 c} \sqrt {-\sqrt {b^2-4 a c}+b+2 c}}-\frac {2 \left (\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}+b\right ) \text {arctanh}\left (\frac {\tanh \left (\frac {x}{2}\right ) \sqrt {\sqrt {b^2-4 a c}+b-2 c}}{\sqrt {\sqrt {b^2-4 a c}+b+2 c}}\right )}{c \sqrt {\sqrt {b^2-4 a c}+b-2 c} \sqrt {\sqrt {b^2-4 a c}+b+2 c}}+\frac {x}{c}\) |
Input:
Int[Cosh[x]^2/(a + b*Cosh[x] + c*Cosh[x]^2),x]
Output:
x/c - (2*(b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTanh[(Sqrt[b - 2*c - Sqr t[b^2 - 4*a*c]]*Tanh[x/2])/Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]])/(c*Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) - (2*(b + (b^ 2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTanh[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*T anh[x/2])/Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]])/(c*Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]])
Int[cos[(d_.) + (e_.)*(x_)]^(m_.)*((a_.) + cos[(d_.) + (e_.)*(x_)]^(n_.)*(b _.) + cos[(d_.) + (e_.)*(x_)]^(n2_.)*(c_.))^(p_), x_Symbol] :> Int[ExpandTr ig[cos[d + e*x]^m*(a + b*cos[d + e*x]^n + c*cos[d + e*x]^(2*n))^p, x], x] / ; FreeQ[{a, b, c, d, e}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && Integ ersQ[m, n, p]
Time = 0.95 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.07
method | result | size |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{c}+\frac {\ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{c}+\frac {2 \left (a -b +c \right ) \left (\frac {\left (a \sqrt {-4 a c +b^{2}}-b \sqrt {-4 a c +b^{2}}-a b -2 a c +b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (-a +b -c \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (\sqrt {-4 a c +b^{2}}+a -c \right ) \left (a -b +c \right )}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \left (a -b +c \right ) \sqrt {\left (\sqrt {-4 a c +b^{2}}+a -c \right ) \left (a -b +c \right )}}+\frac {\left (a \sqrt {-4 a c +b^{2}}-b \sqrt {-4 a c +b^{2}}+a b +2 a c -b^{2}\right ) \arctan \left (\frac {\left (a -b +c \right ) \tanh \left (\frac {x}{2}\right )}{\sqrt {\left (\sqrt {-4 a c +b^{2}}-a +c \right ) \left (a -b +c \right )}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \left (a -b +c \right ) \sqrt {\left (\sqrt {-4 a c +b^{2}}-a +c \right ) \left (a -b +c \right )}}\right )}{c}\) | \(274\) |
risch | \(\text {Expression too large to display}\) | \(1158\) |
Input:
int(cosh(x)^2/(a+b*cosh(x)+c*cosh(x)^2),x,method=_RETURNVERBOSE)
Output:
-1/c*ln(tanh(1/2*x)-1)+1/c*ln(1+tanh(1/2*x))+2/c*(a-b+c)*(1/2*(a*(-4*a*c+b ^2)^(1/2)-b*(-4*a*c+b^2)^(1/2)-a*b-2*a*c+b^2)/(-4*a*c+b^2)^(1/2)/(a-b+c)/( ((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2)*arctanh((-a+b-c)*tanh(1/2*x)/(((-4 *a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2))+1/2*(a*(-4*a*c+b^2)^(1/2)-b*(-4*a*c+b ^2)^(1/2)+a*b+2*a*c-b^2)/(-4*a*c+b^2)^(1/2)/(a-b+c)/(((-4*a*c+b^2)^(1/2)-a +c)*(a-b+c))^(1/2)*arctan((a-b+c)*tanh(1/2*x)/(((-4*a*c+b^2)^(1/2)-a+c)*(a -b+c))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 5079 vs. \(2 (215) = 430\).
Time = 0.49 (sec) , antiderivative size = 5079, normalized size of antiderivative = 19.92 \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\text {Too large to display} \] Input:
integrate(cosh(x)^2/(a+b*cosh(x)+c*cosh(x)^2),x, algorithm="fricas")
Output:
Too large to include
Timed out. \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\text {Timed out} \] Input:
integrate(cosh(x)**2/(a+b*cosh(x)+c*cosh(x)**2),x)
Output:
Timed out
\[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\int { \frac {\cosh \left (x\right )^{2}}{c \cosh \left (x\right )^{2} + b \cosh \left (x\right ) + a} \,d x } \] Input:
integrate(cosh(x)^2/(a+b*cosh(x)+c*cosh(x)^2),x, algorithm="maxima")
Output:
x/c - 1/4*integrate(8*(b*e^(3*x) + 2*a*e^(2*x) + b*e^x)/(c^2*e^(4*x) + 2*b *c*e^(3*x) + 2*b*c*e^x + c^2 + 2*(2*a*c + c^2)*e^(2*x)), x)
Time = 0.56 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.02 \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\frac {x}{c} \] Input:
integrate(cosh(x)^2/(a+b*cosh(x)+c*cosh(x)^2),x, algorithm="giac")
Output:
x/c
Timed out. \[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\text {Hanged} \] Input:
int(cosh(x)^2/(a + b*cosh(x) + c*cosh(x)^2),x)
Output:
\text{Hanged}
\[ \int \frac {\cosh ^2(x)}{a+b \cosh (x)+c \cosh ^2(x)} \, dx=\frac {4 \left (\int \frac {e^{2 x}}{e^{4 x} c +2 e^{3 x} b +4 e^{2 x} a +2 e^{2 x} c +2 e^{x} b +c}d x \right ) a +4 \left (\int \frac {e^{2 x}}{e^{4 x} c +2 e^{3 x} b +4 e^{2 x} a +2 e^{2 x} c +2 e^{x} b +c}d x \right ) c +4 \left (\int \frac {e^{x}}{e^{4 x} c +2 e^{3 x} b +4 e^{2 x} a +2 e^{2 x} c +2 e^{x} b +c}d x \right ) b +4 \left (\int \frac {1}{e^{4 x} c +2 e^{3 x} b +4 e^{2 x} a +2 e^{2 x} c +2 e^{x} b +c}d x \right ) c +\mathrm {log}\left (e^{4 x} c +2 e^{3 x} b +4 e^{2 x} a +2 e^{2 x} c +2 e^{x} b +c \right )-3 x}{c} \] Input:
int(cosh(x)^2/(a+b*cosh(x)+c*cosh(x)^2),x)
Output:
(4*int(e**(2*x)/(e**(4*x)*c + 2*e**(3*x)*b + 4*e**(2*x)*a + 2*e**(2*x)*c + 2*e**x*b + c),x)*a + 4*int(e**(2*x)/(e**(4*x)*c + 2*e**(3*x)*b + 4*e**(2* x)*a + 2*e**(2*x)*c + 2*e**x*b + c),x)*c + 4*int(e**x/(e**(4*x)*c + 2*e**( 3*x)*b + 4*e**(2*x)*a + 2*e**(2*x)*c + 2*e**x*b + c),x)*b + 4*int(1/(e**(4 *x)*c + 2*e**(3*x)*b + 4*e**(2*x)*a + 2*e**(2*x)*c + 2*e**x*b + c),x)*c + log(e**(4*x)*c + 2*e**(3*x)*b + 4*e**(2*x)*a + 2*e**(2*x)*c + 2*e**x*b + c ) - 3*x)/c