Integrand size = 16, antiderivative size = 101 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=-\frac {a b^2 x}{\left (a^2-b^2\right )^2}+\frac {a x}{2 \left (a^2-b^2\right )}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {b^3 \log (a \cosh (x)+b \sinh (x))}{\left (a^2-b^2\right )^2}+\frac {a \cosh (x) \sinh (x)}{2 \left (a^2-b^2\right )} \] Output:
-a*b^2*x/(a^2-b^2)^2+a*x/(2*a^2-2*b^2)-b*cosh(x)^2/(2*a^2-2*b^2)+b^3*ln(a* cosh(x)+b*sinh(x))/(a^2-b^2)^2+a*cosh(x)*sinh(x)/(2*a^2-2*b^2)
Time = 0.10 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.74 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {2 a^3 x-6 a b^2 x+\left (-a^2 b+b^3\right ) \cosh (2 x)+4 b^3 \log (a \cosh (x)+b \sinh (x))+a \left (a^2-b^2\right ) \sinh (2 x)}{4 (a-b)^2 (a+b)^2} \] Input:
Integrate[Cosh[x]^3/(a*Cosh[x] + b*Sinh[x]),x]
Output:
(2*a^3*x - 6*a*b^2*x + (-(a^2*b) + b^3)*Cosh[2*x] + 4*b^3*Log[a*Cosh[x] + b*Sinh[x]] + a*(a^2 - b^2)*Sinh[2*x])/(4*(a - b)^2*(a + b)^2)
Time = 0.53 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.562, Rules used = {3042, 3579, 3042, 3115, 24, 3577, 26, 3042, 3612}
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 ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (i x)^3}{a \cos (i x)-i b \sin (i x)}dx\) |
\(\Big \downarrow \) 3579 |
\(\displaystyle \frac {a \int \cosh ^2(x)dx}{a^2-b^2}-\frac {b^2 \int \frac {\cosh (x)}{a \cosh (x)+b \sinh (x)}dx}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \sin \left (i x+\frac {\pi }{2}\right )^2dx}{a^2-b^2}-\frac {b^2 \int \frac {\cos (i x)}{a \cos (i x)-i b \sin (i x)}dx}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle -\frac {b^2 \int \frac {\cos (i x)}{a \cos (i x)-i b \sin (i x)}dx}{a^2-b^2}+\frac {a \left (\frac {\int 1dx}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {b^2 \int \frac {\cos (i x)}{a \cos (i x)-i b \sin (i x)}dx}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}\) |
\(\Big \downarrow \) 3577 |
\(\displaystyle -\frac {b^2 \left (\frac {a x}{a^2-b^2}-\frac {i b \int -\frac {i (b \cosh (x)+a \sinh (x))}{a \cosh (x)+b \sinh (x)}dx}{a^2-b^2}\right )}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -\frac {b^2 \left (\frac {a x}{a^2-b^2}-\frac {b \int \frac {b \cosh (x)+a \sinh (x)}{a \cosh (x)+b \sinh (x)}dx}{a^2-b^2}\right )}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {b^2 \left (\frac {a x}{a^2-b^2}-\frac {b \int \frac {b \cos (i x)-i a \sin (i x)}{a \cos (i x)-i b \sin (i x)}dx}{a^2-b^2}\right )}{a^2-b^2}-\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}\) |
\(\Big \downarrow \) 3612 |
\(\displaystyle -\frac {b \cosh ^2(x)}{2 \left (a^2-b^2\right )}+\frac {a \left (\frac {x}{2}+\frac {1}{2} \sinh (x) \cosh (x)\right )}{a^2-b^2}-\frac {b^2 \left (\frac {a x}{a^2-b^2}-\frac {b \log (a \cosh (x)+b \sinh (x))}{a^2-b^2}\right )}{a^2-b^2}\) |
Input:
Int[Cosh[x]^3/(a*Cosh[x] + b*Sinh[x]),x]
Output:
-1/2*(b*Cosh[x]^2)/(a^2 - b^2) - (b^2*((a*x)/(a^2 - b^2) - (b*Log[a*Cosh[x ] + b*Sinh[x]])/(a^2 - b^2)))/(a^2 - b^2) + (a*(x/2 + (Cosh[x]*Sinh[x])/2) )/(a^2 - b^2)
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[cos[(c_.) + (d_.)*(x_)]/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_. ) + (d_.)*(x_)]), x_Symbol] :> Simp[a*(x/(a^2 + b^2)), x] + Simp[b/(a^2 + b ^2) Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c + d*x ]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
Int[cos[(c_.) + (d_.)*(x_)]^(m_)/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin [(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[b*(Cos[c + d*x]^(m - 1)/(d*(a^2 + b^2)*(m - 1))), x] + (Simp[a/(a^2 + b^2) Int[Cos[c + d*x]^(m - 1), x], x] + Simp[b^2/(a^2 + b^2) Int[Cos[c + d*x]^(m - 2)/(a*Cos[c + d*x] + b*Sin[ c + d*x]), x], x]) /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && GtQ[m, 1]
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]) /((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x _Symbol] :> Simp[(b*B + c*C)*(x/(b^2 + c^2)), x] + Simp[(c*B - b*C)*(Log[a + b*Cos[d + e*x] + c*Sin[d + e*x]]/(e*(b^2 + c^2))), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2 + c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C ), 0]
Time = 0.88 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.03
method | result | size |
risch | \(\frac {x a}{2 \left (a +b \right )^{2}}+\frac {x b}{\left (a +b \right )^{2}}+\frac {{\mathrm e}^{2 x}}{8 a +8 b}-\frac {{\mathrm e}^{-2 x}}{8 \left (a -b \right )}-\frac {2 b^{3} x}{a^{4}-2 b^{2} a^{2}+b^{4}}+\frac {b^{3} \ln \left ({\mathrm e}^{2 x}+\frac {a -b}{a +b}\right )}{a^{4}-2 b^{2} a^{2}+b^{4}}\) | \(104\) |
default | \(\frac {1}{\left (2 a +2 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {2}{\left (4 a +4 b \right ) \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (-a -2 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 \left (a +b \right )^{2}}+\frac {b^{3} \ln \left (a +2 b \tanh \left (\frac {x}{2}\right )+a \tanh \left (\frac {x}{2}\right )^{2}\right )}{\left (a -b \right )^{2} \left (a +b \right )^{2}}-\frac {1}{\left (2 a -2 b \right ) \left (1+\tanh \left (\frac {x}{2}\right )\right )^{2}}+\frac {2}{\left (4 a -4 b \right ) \left (1+\tanh \left (\frac {x}{2}\right )\right )}+\frac {\left (a -2 b \right ) \ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{2 \left (a -b \right )^{2}}\) | \(153\) |
Input:
int(cosh(x)^3/(a*cosh(x)+b*sinh(x)),x,method=_RETURNVERBOSE)
Output:
1/2*x/(a+b)^2*a+x/(a+b)^2*b+1/8/(a+b)*exp(2*x)-1/8/(a-b)*exp(-2*x)-2*b^3/( a^4-2*a^2*b^2+b^4)*x+b^3/(a^4-2*a^2*b^2+b^4)*ln(exp(2*x)+(a-b)/(a+b))
Leaf count of result is larger than twice the leaf count of optimal. 331 vs. \(2 (95) = 190\).
Time = 0.10 (sec) , antiderivative size = 331, normalized size of antiderivative = 3.28 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {{\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{4} + 4 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \sinh \left (x\right )^{4} + 4 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x \cosh \left (x\right )^{2} - a^{3} - a^{2} b + a b^{2} + b^{3} + 2 \, {\left (3 \, {\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x\right )} \sinh \left (x\right )^{2} + 8 \, {\left (b^{3} \cosh \left (x\right )^{2} + 2 \, b^{3} \cosh \left (x\right ) \sinh \left (x\right ) + b^{3} \sinh \left (x\right )^{2}\right )} \log \left (\frac {2 \, {\left (a \cosh \left (x\right ) + b \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 4 \, {\left ({\left (a^{3} - a^{2} b - a b^{2} + b^{3}\right )} \cosh \left (x\right )^{3} + 2 \, {\left (a^{3} - 3 \, a b^{2} - 2 \, b^{3}\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right )}{8 \, {\left ({\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (x\right )^{2}\right )}} \] Input:
integrate(cosh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="fricas")
Output:
1/8*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^4 + 4*(a^3 - a^2*b - a*b^2 + b^3) *cosh(x)*sinh(x)^3 + (a^3 - a^2*b - a*b^2 + b^3)*sinh(x)^4 + 4*(a^3 - 3*a* b^2 - 2*b^3)*x*cosh(x)^2 - a^3 - a^2*b + a*b^2 + b^3 + 2*(3*(a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^2 + 2*(a^3 - 3*a*b^2 - 2*b^3)*x)*sinh(x)^2 + 8*(b^3* cosh(x)^2 + 2*b^3*cosh(x)*sinh(x) + b^3*sinh(x)^2)*log(2*(a*cosh(x) + b*si nh(x))/(cosh(x) - sinh(x))) + 4*((a^3 - a^2*b - a*b^2 + b^3)*cosh(x)^3 + 2 *(a^3 - 3*a*b^2 - 2*b^3)*x*cosh(x))*sinh(x))/((a^4 - 2*a^2*b^2 + b^4)*cosh (x)^2 + 2*(a^4 - 2*a^2*b^2 + b^4)*cosh(x)*sinh(x) + (a^4 - 2*a^2*b^2 + b^4 )*sinh(x)^2)
Timed out. \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\text {Timed out} \] Input:
integrate(cosh(x)**3/(a*cosh(x)+b*sinh(x)),x)
Output:
Timed out
Time = 0.05 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.85 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {b^{3} \log \left (-{\left (a - b\right )} e^{\left (-2 \, x\right )} - a - b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (a + 2 \, b\right )} x}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {e^{\left (2 \, x\right )}}{8 \, {\left (a + b\right )}} - \frac {e^{\left (-2 \, x\right )}}{8 \, {\left (a - b\right )}} \] Input:
integrate(cosh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="maxima")
Output:
b^3*log(-(a - b)*e^(-2*x) - a - b)/(a^4 - 2*a^2*b^2 + b^4) + 1/2*(a + 2*b) *x/(a^2 + 2*a*b + b^2) + 1/8*e^(2*x)/(a + b) - 1/8*e^(-2*x)/(a - b)
Time = 0.12 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.10 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {b^{3} \log \left ({\left | a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + a - b \right |}\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (a - 2 \, b\right )} x}{2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} - \frac {{\left (2 \, a e^{\left (2 \, x\right )} - 4 \, b e^{\left (2 \, x\right )} + a - b\right )} e^{\left (-2 \, x\right )}}{8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )}} + \frac {e^{\left (2 \, x\right )}}{8 \, {\left (a + b\right )}} \] Input:
integrate(cosh(x)^3/(a*cosh(x)+b*sinh(x)),x, algorithm="giac")
Output:
b^3*log(abs(a*e^(2*x) + b*e^(2*x) + a - b))/(a^4 - 2*a^2*b^2 + b^4) + 1/2* (a - 2*b)*x/(a^2 - 2*a*b + b^2) - 1/8*(2*a*e^(2*x) - 4*b*e^(2*x) + a - b)* e^(-2*x)/(a^2 - 2*a*b + b^2) + 1/8*e^(2*x)/(a + b)
Time = 1.03 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.83 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {{\mathrm {e}}^{2\,x}}{8\,a+8\,b}-\frac {{\mathrm {e}}^{-2\,x}}{8\,a-8\,b}+\frac {b^3\,\ln \left (a-b+a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{a^4-2\,a^2\,b^2+b^4}+\frac {x\,\left (a-2\,b\right )}{2\,{\left (a-b\right )}^2} \] Input:
int(cosh(x)^3/(a*cosh(x) + b*sinh(x)),x)
Output:
exp(2*x)/(8*a + 8*b) - exp(-2*x)/(8*a - 8*b) + (b^3*log(a - b + a*exp(2*x) + b*exp(2*x)))/(a^4 + b^4 - 2*a^2*b^2) + (x*(a - 2*b))/(2*(a - b)^2)
Time = 0.22 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.49 \[ \int \frac {\cosh ^3(x)}{a \cosh (x)+b \sinh (x)} \, dx=\frac {e^{4 x} a^{3}-e^{4 x} a^{2} b -e^{4 x} a \,b^{2}+e^{4 x} b^{3}+8 e^{2 x} \mathrm {log}\left (e^{2 x} a +e^{2 x} b +a -b \right ) b^{3}+4 e^{2 x} a^{3} x -12 e^{2 x} a \,b^{2} x -8 e^{2 x} b^{3} x -a^{3}-a^{2} b +a \,b^{2}+b^{3}}{8 e^{2 x} \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )} \] Input:
int(cosh(x)^3/(a*cosh(x)+b*sinh(x)),x)
Output:
(e**(4*x)*a**3 - e**(4*x)*a**2*b - e**(4*x)*a*b**2 + e**(4*x)*b**3 + 8*e** (2*x)*log(e**(2*x)*a + e**(2*x)*b + a - b)*b**3 + 4*e**(2*x)*a**3*x - 12*e **(2*x)*a*b**2*x - 8*e**(2*x)*b**3*x - a**3 - a**2*b + a*b**2 + b**3)/(8*e **(2*x)*(a**4 - 2*a**2*b**2 + b**4))