Integrand size = 18, antiderivative size = 80 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=-\frac {c C x}{b^2-c^2}+\frac {A \arctan \left (\frac {c \cosh (x)+b \sinh (x)}{\sqrt {b^2-c^2}}\right )}{\sqrt {b^2-c^2}}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2} \] Output:
-c*C*x/(b^2-c^2)+A*arctan((c*cosh(x)+b*sinh(x))/(b^2-c^2)^(1/2))/(b^2-c^2) ^(1/2)+b*C*ln(b*cosh(x)+c*sinh(x))/(b^2-c^2)
Time = 0.56 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.98 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\frac {2 A \arctan \left (\frac {c+b \tanh \left (\frac {x}{2}\right )}{\sqrt {b-c} \sqrt {b+c}}\right )}{\sqrt {b-c} \sqrt {b+c}}+\frac {C (-c x+b \log (b \cosh (x)+c \sinh (x)))}{b^2-c^2} \] Input:
Integrate[(A + C*Sinh[x])/(b*Cosh[x] + c*Sinh[x]),x]
Output:
(2*A*ArcTan[(c + b*Tanh[x/2])/(Sqrt[b - c]*Sqrt[b + c])])/(Sqrt[b - c]*Sqr t[b + c]) + (C*(-(c*x) + b*Log[b*Cosh[x] + c*Sinh[x]]))/(b^2 - c^2)
Result contains complex when optimal does not.
Time = 0.35 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.11, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {3042, 3616, 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 {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A-i C \sin (i x)}{b \cos (i x)-i c \sin (i x)}dx\) |
\(\Big \downarrow \) 3616 |
\(\displaystyle A \int \frac {1}{b \cosh (x)+c \sinh (x)}dx-\frac {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle A \int \frac {1}{b \cos (i x)-i c \sin (i x)}dx-\frac {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\) |
\(\Big \downarrow \) 3553 |
\(\displaystyle i A \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))-\frac {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {i A \text {arctanh}\left (\frac {-i b \sinh (x)-i c \cosh (x)}{\sqrt {b^2-c^2}}\right )}{\sqrt {b^2-c^2}}-\frac {c C x}{b^2-c^2}+\frac {b C \log (b \cosh (x)+c \sinh (x))}{b^2-c^2}\) |
Input:
Int[(A + C*Sinh[x])/(b*Cosh[x] + c*Sinh[x]),x]
Output:
-((c*C*x)/(b^2 - c^2)) + (I*A*ArcTanh[((-I)*c*Cosh[x] - I*b*Sinh[x])/Sqrt[ b^2 - c^2]])/Sqrt[b^2 - c^2] + (b*C*Log[b*Cosh[x] + c*Sinh[x]])/(b^2 - c^2 )
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_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_) ]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[c*C*((d + e*x)/ (e*(b^2 + c^2))), x] + (-Simp[b*C*(Log[a + b*Cos[d + e*x] + c*Sin[d + e*x]] /(e*(b^2 + c^2))), x] + Simp[(A*(b^2 + c^2) - a*c*C)/(b^2 + c^2) Int[1/(a + b*Cos[d + e*x] + c*Sin[d + e*x]), x], x]) /; FreeQ[{a, b, c, d, e, A, C} , x] && NeQ[b^2 + c^2, 0] && NeQ[A*(b^2 + c^2) - a*c*C, 0]
Time = 0.68 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.58
method | result | size |
default | \(-\frac {2 C \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b +2 c}-\frac {2 C \ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{2 b -2 c}+\frac {b C \ln \left (b \tanh \left (\frac {x}{2}\right )^{2}+2 c \tanh \left (\frac {x}{2}\right )+b \right )+\frac {2 \left (A \,b^{2}-A \,c^{2}\right ) \arctan \left (\frac {2 b \tanh \left (\frac {x}{2}\right )+2 c}{2 \sqrt {b^{2}-c^{2}}}\right )}{\sqrt {b^{2}-c^{2}}}}{\left (b -c \right ) \left (b +c \right )}\) | \(126\) |
risch | \(\frac {C x}{b +c}-\frac {2 x C \,b^{3}}{b^{4}-2 b^{2} c^{2}+c^{4}}+\frac {2 x C b \,c^{2}}{b^{4}-2 b^{2} c^{2}+c^{4}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{A \left (b +c \right )}\right ) b C}{\left (b +c \right ) \left (b -c \right )}+\frac {\ln \left ({\mathrm e}^{x}+\frac {\sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{A \left (b +c \right )}\right ) \sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{\left (b +c \right ) \left (b -c \right )}+\frac {\ln \left ({\mathrm e}^{x}-\frac {\sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{A \left (b +c \right )}\right ) b C}{\left (b +c \right ) \left (b -c \right )}-\frac {\ln \left ({\mathrm e}^{x}-\frac {\sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{A \left (b +c \right )}\right ) \sqrt {-A^{2} b^{2}+A^{2} c^{2}}}{\left (b +c \right ) \left (b -c \right )}\) | \(278\) |
Input:
int((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x,method=_RETURNVERBOSE)
Output:
-2*C/(2*b+2*c)*ln(tanh(1/2*x)-1)-2*C/(2*b-2*c)*ln(1+tanh(1/2*x))+2/(b-c)/( b+c)*(1/2*b*C*ln(b*tanh(1/2*x)^2+2*c*tanh(1/2*x)+b)+(A*b^2-A*c^2)/(b^2-c^2 )^(1/2)*arctan(1/2*(2*b*tanh(1/2*x)+2*c)/(b^2-c^2)^(1/2)))
Time = 0.11 (sec) , antiderivative size = 233, normalized size of antiderivative = 2.91 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\left [\frac {C b \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - \sqrt {-b^{2} + c^{2}} A \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 ) - {\left (C b + C c\right )} x}{b^{2} - c^{2}}, \frac {C b \log \left (\frac {2 \, {\left (b \cosh \left (x\right ) + c \sinh \left (x\right )\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) - 2 \, \sqrt {b^{2} - c^{2}} A \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 + C c\right )} x}{b^{2} - c^{2}}\right ] \] Input:
integrate((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x, algorithm="fricas")
Output:
[(C*b*log(2*(b*cosh(x) + c*sinh(x))/(cosh(x) - sinh(x))) - sqrt(-b^2 + c^2 )*A*log(((b + c)*cosh(x)^2 + 2*(b + c)*cosh(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)) - (C*b + C*c)*x)/(b^ 2 - c^2), (C*b*log(2*(b*cosh(x) + c*sinh(x))/(cosh(x) - sinh(x))) - 2*sqrt (b^2 - c^2)*A*arctan(sqrt(b^2 - c^2)/((b + c)*cosh(x) + (b + c)*sinh(x))) - (C*b + C*c)*x)/(b^2 - c^2)]
Leaf count of result is larger than twice the leaf count of optimal. 367 vs. \(2 (66) = 132\).
Time = 14.12 (sec) , antiderivative size = 367, normalized size of antiderivative = 4.59 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\begin {cases} \tilde {\infty } \left (A \log {\left (\tanh {\left (\frac {x}{2} \right )} \right )} + C x\right ) & \text {for}\: b = 0 \wedge c = 0 \\\frac {A \log {\left (\tanh {\left (\frac {x}{2} \right )} \right )} + C x}{c} & \text {for}\: b = 0 \\- \frac {2 A}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {C x \sinh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \cosh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {C \sinh {\left (x \right )}}{- 2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} & \text {for}\: b = - c \\- \frac {2 A}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \sinh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} + \frac {C x \cosh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} - \frac {C \sinh {\left (x \right )}}{2 c \sinh {\left (x \right )} + 2 c \cosh {\left (x \right )}} & \text {for}\: b = c \\- \frac {A \sqrt {- b^{2} + c^{2}} \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} - \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {A \sqrt {- b^{2} + c^{2}} \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} + \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {C b x}{b^{2} - c^{2}} - \frac {2 C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + 1 \right )}}{b^{2} - c^{2}} + \frac {C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} - \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} + \frac {C b \log {\left (\tanh {\left (\frac {x}{2} \right )} + \frac {c}{b} + \frac {\sqrt {- b^{2} + c^{2}}}{b} \right )}}{b^{2} - c^{2}} - \frac {C c x}{b^{2} - c^{2}} & \text {otherwise} \end {cases} \] Input:
integrate((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x)
Output:
Piecewise((zoo*(A*log(tanh(x/2)) + C*x), Eq(b, 0) & Eq(c, 0)), ((A*log(tan h(x/2)) + C*x)/c, Eq(b, 0)), (-2*A/(-2*c*sinh(x) + 2*c*cosh(x)) - C*x*sinh (x)/(-2*c*sinh(x) + 2*c*cosh(x)) + C*x*cosh(x)/(-2*c*sinh(x) + 2*c*cosh(x) ) - C*sinh(x)/(-2*c*sinh(x) + 2*c*cosh(x)), Eq(b, -c)), (-2*A/(2*c*sinh(x) + 2*c*cosh(x)) + C*x*sinh(x)/(2*c*sinh(x) + 2*c*cosh(x)) + C*x*cosh(x)/(2 *c*sinh(x) + 2*c*cosh(x)) - C*sinh(x)/(2*c*sinh(x) + 2*c*cosh(x)), Eq(b, c )), (-A*sqrt(-b**2 + c**2)*log(tanh(x/2) + c/b - sqrt(-b**2 + c**2)/b)/(b* *2 - c**2) + A*sqrt(-b**2 + c**2)*log(tanh(x/2) + c/b + sqrt(-b**2 + c**2) /b)/(b**2 - c**2) + C*b*x/(b**2 - c**2) - 2*C*b*log(tanh(x/2) + 1)/(b**2 - c**2) + C*b*log(tanh(x/2) + c/b - sqrt(-b**2 + c**2)/b)/(b**2 - c**2) + C *b*log(tanh(x/2) + c/b + sqrt(-b**2 + c**2)/b)/(b**2 - c**2) - C*c*x/(b**2 - c**2), True))
Exception generated. \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x, algorithm="maxima")
Output:
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.14 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\frac {C b \log \left (b e^{\left (2 \, x\right )} + c e^{\left (2 \, x\right )} + b - c\right )}{b^{2} - c^{2}} + \frac {2 \, A \arctan \left (\frac {b e^{x} + c e^{x}}{\sqrt {b^{2} - c^{2}}}\right )}{\sqrt {b^{2} - c^{2}}} - \frac {C x}{b - c} \] Input:
integrate((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x, algorithm="giac")
Output:
C*b*log(b*e^(2*x) + c*e^(2*x) + b - c)/(b^2 - c^2) + 2*A*arctan((b*e^x + c *e^x)/sqrt(b^2 - c^2))/sqrt(b^2 - c^2) - C*x/(b - c)
Time = 3.28 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.22 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\frac {2\,\mathrm {atan}\left (\frac {A\,{\mathrm {e}}^x\,\sqrt {b^2-c^2}}{b\,\sqrt {A^2}-c\,\sqrt {A^2}}\right )\,\sqrt {A^2}}{\sqrt {b^2-c^2}}-\frac {C\,x}{b-c}+\frac {C\,b^3\,\ln \left (4\,A^2\,b-4\,A^2\,c+4\,A^2\,b\,{\mathrm {e}}^{2\,x}+4\,A^2\,c\,{\mathrm {e}}^{2\,x}\right )}{b^4-2\,b^2\,c^2+c^4}-\frac {C\,b\,c^2\,\ln \left (4\,A^2\,b-4\,A^2\,c+4\,A^2\,b\,{\mathrm {e}}^{2\,x}+4\,A^2\,c\,{\mathrm {e}}^{2\,x}\right )}{b^4-2\,b^2\,c^2+c^4} \] Input:
int((A + C*sinh(x))/(b*cosh(x) + c*sinh(x)),x)
Output:
(2*atan((A*exp(x)*(b^2 - c^2)^(1/2))/(b*(A^2)^(1/2) - c*(A^2)^(1/2)))*(A^2 )^(1/2))/(b^2 - c^2)^(1/2) - (C*x)/(b - c) + (C*b^3*log(4*A^2*b - 4*A^2*c + 4*A^2*b*exp(2*x) + 4*A^2*c*exp(2*x)))/(b^4 + c^4 - 2*b^2*c^2) - (C*b*c^2 *log(4*A^2*b - 4*A^2*c + 4*A^2*b*exp(2*x) + 4*A^2*c*exp(2*x)))/(b^4 + c^4 - 2*b^2*c^2)
Time = 0.21 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.88 \[ \int \frac {A+C \sinh (x)}{b \cosh (x)+c \sinh (x)} \, dx=\frac {2 \sqrt {b^{2}-c^{2}}\, \mathit {atan} \left (\frac {e^{x} b +e^{x} c}{\sqrt {b^{2}-c^{2}}}\right ) a +\mathrm {log}\left (\cosh \left (x \right ) b +\sinh \left (x \right ) c \right ) b c -c^{2} x}{b^{2}-c^{2}} \] Input:
int((A+C*sinh(x))/(b*cosh(x)+c*sinh(x)),x)
Output:
(2*sqrt(b**2 - c**2)*atan((e**x*b + e**x*c)/sqrt(b**2 - c**2))*a + log(cos h(x)*b + sinh(x)*c)*b*c - c**2*x)/(b**2 - c**2)