Integrand size = 14, antiderivative size = 52 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=-\frac {2 (b+c) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}+\frac {\log (a+b \sinh (x))}{b} \] Output:
-2*(b+c)*arctanh((b-a*tanh(1/2*x))/(a^2+b^2)^(1/2))/(a^2+b^2)^(1/2)+ln(a+b *sinh(x))/b
Time = 0.15 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.15 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {2 (b+c) \arctan \left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}+\frac {\log (a+b \sinh (x))}{b} \] Input:
Integrate[(b + c + Cosh[x])/(a + b*Sinh[x]),x]
Output:
(2*(b + c)*ArcTan[(b - a*Tanh[x/2])/Sqrt[-a^2 - b^2]])/Sqrt[-a^2 - b^2] + Log[a + b*Sinh[x]]/b
Time = 0.36 (sec) , antiderivative size = 52, 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.214, Rules used = {3042, 4901, 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 {b+c+\cosh (x)}{a+b \sinh (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {b+c+\cos (i x)}{a-i b \sin (i x)}dx\) |
\(\Big \downarrow \) 4901 |
\(\displaystyle \int \left (\frac {c \left (\frac {b}{c}+1\right )}{a+b \sinh (x)}+\frac {\cosh (x)}{a+b \sinh (x)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\log (a+b \sinh (x))}{b}-\frac {2 (b+c) \text {arctanh}\left (\frac {b-a \tanh \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}\) |
Input:
Int[(b + c + Cosh[x])/(a + b*Sinh[x]),x]
Output:
(-2*(b + c)*ArcTanh[(b - a*Tanh[x/2])/Sqrt[a^2 + b^2]])/Sqrt[a^2 + b^2] + Log[a + b*Sinh[x]]/b
Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /; !InertTrigFreeQ[u]
Time = 1.02 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.96
method | result | size |
parts | \(\frac {\ln \left (a +b \sinh \left (x \right )\right )}{b}+\frac {2 \left (b +c \right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}\) | \(50\) |
default | \(-\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {\ln \left (a \tanh \left (\frac {x}{2}\right )^{2}-2 b \tanh \left (\frac {x}{2}\right )-a \right )-\frac {2 \left (-b^{2}-b c \right ) \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{b}-\frac {\ln \left (1+\tanh \left (\frac {x}{2}\right )\right )}{b}\) | \(98\) |
risch | \(\frac {x}{b}-\frac {2 x \,a^{2} b}{a^{2} b^{2}+b^{4}}-\frac {2 x \,b^{3}}{a^{2} b^{2}+b^{4}}+\frac {\ln \left ({\mathrm e}^{x}-\frac {-a \,b^{2}-a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) a^{2}}{\left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{x}-\frac {-a \,b^{2}-a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right )}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{x}-\frac {-a \,b^{2}-a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) \sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{\left (a^{2}+b^{2}\right ) b}+\frac {\ln \left ({\mathrm e}^{x}+\frac {a \,b^{2}+a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) a^{2}}{\left (a^{2}+b^{2}\right ) b}+\frac {b \ln \left ({\mathrm e}^{x}+\frac {a \,b^{2}+a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right )}{a^{2}+b^{2}}-\frac {\ln \left ({\mathrm e}^{x}+\frac {a \,b^{2}+a b c +\sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{b^{2} \left (b +c \right )}\right ) \sqrt {a^{2} b^{4}+2 a^{2} b^{3} c +a^{2} b^{2} c^{2}+b^{6}+2 b^{5} c +b^{4} c^{2}}}{\left (a^{2}+b^{2}\right ) b}\) | \(634\) |
Input:
int((b+c+cosh(x))/(a+b*sinh(x)),x,method=_RETURNVERBOSE)
Output:
ln(a+b*sinh(x))/b+2*(b+c)/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tanh(1/2*x)-2*b )/(a^2+b^2)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (48) = 96\).
Time = 0.12 (sec) , antiderivative size = 167, normalized size of antiderivative = 3.21 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {\sqrt {a^{2} + b^{2}} {\left (b^{2} + b c\right )} \log \left (\frac {b^{2} \cosh \left (x\right )^{2} + b^{2} \sinh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (x\right ) + a b\right )} \sinh \left (x\right ) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (x\right ) + b \sinh \left (x\right ) + a\right )}}{b \cosh \left (x\right )^{2} + b \sinh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + 2 \, {\left (b \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) - b}\right ) - {\left (a^{2} + b^{2}\right )} x + {\left (a^{2} + b^{2}\right )} \log \left (\frac {2 \, {\left (b \sinh \left (x\right ) + a\right )}}{\cosh \left (x\right ) - \sinh \left (x\right )}\right )}{a^{2} b + b^{3}} \] Input:
integrate((b+c+cosh(x))/(a+b*sinh(x)),x, algorithm="fricas")
Output:
(sqrt(a^2 + b^2)*(b^2 + b*c)*log((b^2*cosh(x)^2 + b^2*sinh(x)^2 + 2*a*b*co sh(x) + 2*a^2 + b^2 + 2*(b^2*cosh(x) + a*b)*sinh(x) - 2*sqrt(a^2 + b^2)*(b *cosh(x) + b*sinh(x) + a))/(b*cosh(x)^2 + b*sinh(x)^2 + 2*a*cosh(x) + 2*(b *cosh(x) + a)*sinh(x) - b)) - (a^2 + b^2)*x + (a^2 + b^2)*log(2*(b*sinh(x) + a)/(cosh(x) - sinh(x))))/(a^2*b + b^3)
Result contains complex when optimal does not.
Time = 16.34 (sec) , antiderivative size = 585, normalized size of antiderivative = 11.25 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\text {Too large to display} \] Input:
integrate((b+c+cosh(x))/(a+b*sinh(x)),x)
Output:
Piecewise((zoo*(c*log(tanh(x/2)) + x - 2*log(tanh(x/2) + 1) + log(tanh(x/2 ))), Eq(a, 0) & Eq(b, 0)), ((b*log(tanh(x/2)) + c*log(tanh(x/2)) + x - 2*l og(tanh(x/2) + 1) + log(tanh(x/2)))/b, Eq(a, 0)), ((c*x + sinh(x))/a, Eq(b , 0)), (2*I*b/(b*tanh(x/2) - I*b) + 2*I*c/(b*tanh(x/2) - I*b) + x*tanh(x/2 )/(b*tanh(x/2) - I*b) - I*x/(b*tanh(x/2) - I*b) - 2*log(tanh(x/2) + 1)*tan h(x/2)/(b*tanh(x/2) - I*b) + 2*I*log(tanh(x/2) + 1)/(b*tanh(x/2) - I*b) + 2*log(tanh(x/2) - I)*tanh(x/2)/(b*tanh(x/2) - I*b) - 2*I*log(tanh(x/2) - I )/(b*tanh(x/2) - I*b), Eq(a, -I*b)), (-2*I*b/(b*tanh(x/2) + I*b) - 2*I*c/( b*tanh(x/2) + I*b) + x*tanh(x/2)/(b*tanh(x/2) + I*b) + I*x/(b*tanh(x/2) + I*b) - 2*log(tanh(x/2) + 1)*tanh(x/2)/(b*tanh(x/2) + I*b) - 2*I*log(tanh(x /2) + 1)/(b*tanh(x/2) + I*b) + 2*log(tanh(x/2) + I)*tanh(x/2)/(b*tanh(x/2) + I*b) + 2*I*log(tanh(x/2) + I)/(b*tanh(x/2) + I*b), Eq(a, I*b)), (-b*log (tanh(x/2) - b/a - sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) + b*log(tanh(x/2 ) - b/a + sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) - c*log(tanh(x/2) - b/a - sqrt(a**2 + b**2)/a)/sqrt(a**2 + b**2) + c*log(tanh(x/2) - b/a + sqrt(a** 2 + b**2)/a)/sqrt(a**2 + b**2) + x/b - 2*log(tanh(x/2) + 1)/b + log(tanh(x /2) - b/a - sqrt(a**2 + b**2)/a)/b + log(tanh(x/2) - b/a + sqrt(a**2 + b** 2)/a)/b, True))
Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (48) = 96\).
Time = 0.12 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.35 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {b \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} + \frac {c \log \left (\frac {b e^{\left (-x\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-x\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}}} + \frac {\log \left (b \sinh \left (x\right ) + a\right )}{b} \] Input:
integrate((b+c+cosh(x))/(a+b*sinh(x)),x, algorithm="maxima")
Output:
b*log((b*e^(-x) - a - sqrt(a^2 + b^2))/(b*e^(-x) - a + sqrt(a^2 + b^2)))/s qrt(a^2 + b^2) + c*log((b*e^(-x) - a - sqrt(a^2 + b^2))/(b*e^(-x) - a + sq rt(a^2 + b^2)))/sqrt(a^2 + b^2) + log(b*sinh(x) + a)/b
Time = 0.14 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.67 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {{\left (b + c\right )} \log \left (\frac {{\left | 2 \, b e^{x} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{x} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}}} - \frac {x}{b} + \frac {\log \left ({\left | b e^{\left (2 \, x\right )} + 2 \, a e^{x} - b \right |}\right )}{b} \] Input:
integrate((b+c+cosh(x))/(a+b*sinh(x)),x, algorithm="giac")
Output:
(b + c)*log(abs(2*b*e^x + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^x + 2*a + 2*s qrt(a^2 + b^2)))/sqrt(a^2 + b^2) - x/b + log(abs(b*e^(2*x) + 2*a*e^x - b)) /b
Time = 1.19 (sec) , antiderivative size = 178, normalized size of antiderivative = 3.42 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {\ln \left (a^2\,{\mathrm {e}}^x-b\,\sqrt {a^2+b^2}+b^2\,{\mathrm {e}}^x+a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}+a^2+b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3}-\frac {\ln \left (b\,\sqrt {a^2+b^2}+a^2\,{\mathrm {e}}^x+b^2\,{\mathrm {e}}^x-a\,{\mathrm {e}}^x\,\sqrt {a^2+b^2}\right )\,\left (b^2\,\sqrt {a^2+b^2}-a^2-b^2+b\,c\,\sqrt {a^2+b^2}\right )}{a^2\,b+b^3}-\frac {x}{b} \] Input:
int((b + c + cosh(x))/(a + b*sinh(x)),x)
Output:
(log(a^2*exp(x) - b*(a^2 + b^2)^(1/2) + b^2*exp(x) + a*exp(x)*(a^2 + b^2)^ (1/2))*(b^2*(a^2 + b^2)^(1/2) + a^2 + b^2 + b*c*(a^2 + b^2)^(1/2)))/(a^2*b + b^3) - (log(b*(a^2 + b^2)^(1/2) + a^2*exp(x) + b^2*exp(x) - a*exp(x)*(a ^2 + b^2)^(1/2))*(b^2*(a^2 + b^2)^(1/2) - a^2 - b^2 + b*c*(a^2 + b^2)^(1/2 )))/(a^2*b + b^3) - x/b
Time = 0.23 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.71 \[ \int \frac {b+c+\cosh (x)}{a+b \sinh (x)} \, dx=\frac {2 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b i +a i}{\sqrt {a^{2}+b^{2}}}\right ) b^{2} i +2 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{x} b i +a i}{\sqrt {a^{2}+b^{2}}}\right ) b c i +\mathrm {log}\left (e^{2 x} b +2 e^{x} a -b \right ) a^{2}+\mathrm {log}\left (e^{2 x} b +2 e^{x} a -b \right ) b^{2}-a^{2} x -b^{2} x}{b \left (a^{2}+b^{2}\right )} \] Input:
int((b+c+cosh(x))/(a+b*sinh(x)),x)
Output:
(2*sqrt(a**2 + b**2)*atan((e**x*b*i + a*i)/sqrt(a**2 + b**2))*b**2*i + 2*s qrt(a**2 + b**2)*atan((e**x*b*i + a*i)/sqrt(a**2 + b**2))*b*c*i + log(e**( 2*x)*b + 2*e**x*a - b)*a**2 + log(e**(2*x)*b + 2*e**x*a - b)*b**2 - a**2*x - b**2*x)/(b*(a**2 + b**2))