Integrand size = 21, antiderivative size = 78 \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\frac {(b B-c C) \arctan \left (\frac {c \cosh (x)+b \sinh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}}+\frac {B c-b C}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))} \]
(B*b-C*c)*arctan((c*cosh(x)+b*sinh(x))/(b^2-c^2)^(1/2))/(b^2-c^2)^(3/2)+(B *c-C*b)/(b^2-c^2)/(b*cosh(x)+c*sinh(x))
Time = 0.30 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.12 \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\frac {2 (b B-c C) \arctan \left (\frac {c+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-c} \sqrt {b+c}}\right )}{(b-c)^{3/2} (b+c)^{3/2}}+\frac {B c-b C}{(b-c) (b+c) (b \cosh (x)+c \sinh (x))} \]
(2*(b*B - c*C)*ArcTan[(c + b*Tanh[x/2])/(Sqrt[b - c]*Sqrt[b + c])])/((b - c)^(3/2)*(b + c)^(3/2)) + (B*c - b*C)/((b - c)*(b + c)*(b*Cosh[x] + c*Sinh [x]))
Result contains complex when optimal does not.
Time = 0.34 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.12, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 3632, 3042, 3553, 219}
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 {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \cos (i x)-i C \sin (i x)}{(b \cos (i x)-i c \sin (i x))^2}dx\) |
\(\Big \downarrow \) 3632 |
\(\displaystyle \frac {(b B-c C) \int \frac {1}{b \cosh (x)+c \sinh (x)}dx}{b^2-c^2}+\frac {B c-b C}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {B c-b C}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {(b B-c C) \int \frac {1}{b \cos (i x)-i c \sin (i x)}dx}{b^2-c^2}\) |
\(\Big \downarrow \) 3553 |
\(\displaystyle \frac {B c-b C}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {i (b B-c C) \int \frac {1}{b^2-c^2-(-i c \cosh (x)-i b \sinh (x))^2}d(-i c \cosh (x)-i b \sinh (x))}{b^2-c^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {B c-b C}{\left (b^2-c^2\right ) (b \cosh (x)+c \sinh (x))}+\frac {i (b B-c C) \text {arctanh}\left (\frac {-i b \sinh (x)-i c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\left (b^2-c^2\right )^{3/2}}\) |
(I*(b*B - c*C)*ArcTanh[((-I)*c*Cosh[x] - I*b*Sinh[x])/Sqrt[b^2 - c^2]])/(b ^2 - c^2)^(3/2) + (B*c - b*C)/((b^2 - c^2)*(b*Cosh[x] + c*Sinh[x]))
3.8.34.3.1 Defintions of rubi rules used
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[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x _Symbol] :> Simp[-d^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, b*Cos[c + d*x] - a*Sin[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]) /((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^2, x_Symbol] :> Simp[(c*B - b*C - (a*C - c*A)*Cos[d + e*x] + (a*B - b*A)*Sin[ d + e*x])/(e*(a^2 - b^2 - c^2)*(a + b*Cos[d + e*x] + c*Sin[d + e*x])), x] + Simp[(a*A - b*B - c*C)/(a^2 - b^2 - c^2) Int[1/(a + b*Cos[d + e*x] + c*S in[d + e*x]), x], x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[a^2 - b^2 - c^2, 0] && NeQ[a*A - b*B - c*C, 0]
Time = 1.65 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.51
method | result | size |
default | \(\frac {\frac {2 c \left (B c -b C \right ) \tanh \left (\frac {x}{2}\right )}{\left (b^{2}-c^{2}\right ) b}+\frac {2 \left (B c -b C \right )}{b^{2}-c^{2}}}{\tanh \left (\frac {x}{2}\right )^{2} b +2 c \tanh \left (\frac {x}{2}\right )+b}+\frac {2 \left (B b -C c \right ) \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\left (b^{2}-c^{2}\right )^{\frac {3}{2}}}\) | \(118\) |
risch | \(\frac {2 \,{\mathrm e}^{x} \left (B c -b C \right )}{\left (b -c \right ) \left (b +c \right ) \left (b \,{\mathrm e}^{2 x}+{\mathrm e}^{2 x} c +b -c \right )}-\frac {b B \ln \left ({\mathrm e}^{x}-\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}+\frac {c C \ln \left ({\mathrm e}^{x}-\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}+\frac {b B \ln \left ({\mathrm e}^{x}+\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}-\frac {c C \ln \left ({\mathrm e}^{x}+\frac {b -c}{\sqrt {-b^{2}+c^{2}}}\right )}{\sqrt {-b^{2}+c^{2}}\, \left (b +c \right ) \left (b -c \right )}\) | \(237\) |
2*(c*(B*c-C*b)/(b^2-c^2)/b*tanh(1/2*x)+(B*c-C*b)/(b^2-c^2))/(tanh(1/2*x)^2 *b+2*c*tanh(1/2*x)+b)+2*(B*b-C*c)/(b^2-c^2)^(3/2)*arctan(1/2*(2*b*tanh(1/2 *x)+2*c)/(b^2-c^2)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 346 vs. \(2 (75) = 150\).
Time = 0.29 (sec) , antiderivative size = 749, normalized size of antiderivative = 9.60 \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\left [-\frac {{\left (B b^{2} - {\left (B + C\right )} b c + C c^{2} + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \sinh \left (x\right )^{2}\right )} \sqrt {-b^{2} + c^{2}} \log \left (\frac {{\left (b + c\right )} \cosh \left (x\right )^{2} + 2 \, {\left (b + c\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (b + c\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt {-b^{2} + c^{2}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )} - b + c}{{\left (b + c\right )} \cosh \left (x\right )^{2} + 2 \, {\left (b + c\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (b + c\right )} \sinh \left (x\right )^{2} + b - c}\right ) + 2 \, {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \cosh \left (x\right ) + 2 \, {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \sinh \left (x\right )}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \left (x\right )^{2}}, -\frac {2 \, {\left ({\left (B b^{2} - {\left (B + C\right )} b c + C c^{2} + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (B b^{2} + {\left (B - C\right )} b c - C c^{2}\right )} \sinh \left (x\right )^{2}\right )} \sqrt {b^{2} - c^{2}} \arctan \left (\frac {\sqrt {b^{2} - c^{2}}}{{\left (b + c\right )} \cosh \left (x\right ) + {\left (b + c\right )} \sinh \left (x\right )}\right ) + {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \cosh \left (x\right ) + {\left (C b^{3} - B b^{2} c - C b c^{2} + B c^{3}\right )} \sinh \left (x\right )\right )}}{b^{5} - b^{4} c - 2 \, b^{3} c^{2} + 2 \, b^{2} c^{3} + b c^{4} - c^{5} + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (b^{5} + b^{4} c - 2 \, b^{3} c^{2} - 2 \, b^{2} c^{3} + b c^{4} + c^{5}\right )} \sinh \left (x\right )^{2}}\right ] \]
[-((B*b^2 - (B + C)*b*c + C*c^2 + (B*b^2 + (B - C)*b*c - C*c^2)*cosh(x)^2 + 2*(B*b^2 + (B - C)*b*c - C*c^2)*cosh(x)*sinh(x) + (B*b^2 + (B - C)*b*c - C*c^2)*sinh(x)^2)*sqrt(-b^2 + c^2)*log(((b + c)*cosh(x)^2 + 2*(b + c)*cos h(x)*sinh(x) + (b + c)*sinh(x)^2 - 2*sqrt(-b^2 + c^2)*(cosh(x) + sinh(x)) - b + c)/((b + c)*cosh(x)^2 + 2*(b + c)*cosh(x)*sinh(x) + (b + c)*sinh(x)^ 2 + b - c)) + 2*(C*b^3 - B*b^2*c - C*b*c^2 + B*c^3)*cosh(x) + 2*(C*b^3 - B *b^2*c - C*b*c^2 + B*c^3)*sinh(x))/(b^5 - b^4*c - 2*b^3*c^2 + 2*b^2*c^3 + b*c^4 - c^5 + (b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*cosh(x)^ 2 + 2*(b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*cosh(x)*sinh(x) + (b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*sinh(x)^2), -2*((B*b ^2 - (B + C)*b*c + C*c^2 + (B*b^2 + (B - C)*b*c - C*c^2)*cosh(x)^2 + 2*(B* b^2 + (B - C)*b*c - C*c^2)*cosh(x)*sinh(x) + (B*b^2 + (B - C)*b*c - C*c^2) *sinh(x)^2)*sqrt(b^2 - c^2)*arctan(sqrt(b^2 - c^2)/((b + c)*cosh(x) + (b + c)*sinh(x))) + (C*b^3 - B*b^2*c - C*b*c^2 + B*c^3)*cosh(x) + (C*b^3 - B*b ^2*c - C*b*c^2 + B*c^3)*sinh(x))/(b^5 - b^4*c - 2*b^3*c^2 + 2*b^2*c^3 + b* c^4 - c^5 + (b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*cosh(x)^2 + 2*(b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*cosh(x)*sinh(x) + (b^5 + b^4*c - 2*b^3*c^2 - 2*b^2*c^3 + b*c^4 + c^5)*sinh(x)^2)]
Timed out. \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*b^2>0)', see `assume?` f or more de
Time = 0.25 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.13 \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\frac {2 \, {\left (B b - C c\right )} \arctan \left (\frac {b e^{x} + c e^{x}}{\sqrt {b^{2} - c^{2}}}\right )}{{\left (b^{2} - c^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (C b e^{x} - B c e^{x}\right )}}{{\left (b^{2} - c^{2}\right )} {\left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}} \]
2*(B*b - C*c)*arctan((b*e^x + c*e^x)/sqrt(b^2 - c^2))/(b^2 - c^2)^(3/2) - 2*(C*b*e^x - B*c*e^x)/((b^2 - c^2)*(b*e^(2*x) + c*e^(2*x) + b - c))
Time = 2.73 (sec) , antiderivative size = 199, normalized size of antiderivative = 2.55 \[ \int \frac {B \cosh (x)+C \sinh (x)}{(b \cosh (x)+c \sinh (x))^2} \, dx=\frac {\ln \left (\frac {2\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}+\frac {2\,{\mathrm {e}}^x\,\left (B\,b-C\,c\right )}{-b^3-b^2\,c+b\,c^2+c^3}\right )\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}-\frac {\ln \left (\frac {2\,{\mathrm {e}}^x\,\left (B\,b-C\,c\right )}{-b^3-b^2\,c+b\,c^2+c^3}-\frac {2\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{5/2}\,\sqrt {c-b}}\right )\,\left (B\,b-C\,c\right )}{{\left (b+c\right )}^{3/2}\,{\left (c-b\right )}^{3/2}}+\frac {2\,{\mathrm {e}}^x\,\left (B\,c-C\,b\right )}{\left (b+c\right )\,\left (b-c\right )\,\left (b-c+{\mathrm {e}}^{2\,x}\,\left (b+c\right )\right )} \]
(log((2*(B*b - C*c))/((b + c)^(5/2)*(c - b)^(1/2)) + (2*exp(x)*(B*b - C*c) )/(b*c^2 - b^2*c - b^3 + c^3))*(B*b - C*c))/((b + c)^(3/2)*(c - b)^(3/2)) - (log((2*exp(x)*(B*b - C*c))/(b*c^2 - b^2*c - b^3 + c^3) - (2*(B*b - C*c) )/((b + c)^(5/2)*(c - b)^(1/2)))*(B*b - C*c))/((b + c)^(3/2)*(c - b)^(3/2) ) + (2*exp(x)*(B*c - C*b))/((b + c)*(b - c)*(b - c + exp(2*x)*(b + c)))