Integrand size = 21, antiderivative size = 71 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {a x}{b^2}-\frac {2 a^2 \text {arctanh}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b^2 \sqrt {a^2+b^2} d}+\frac {\cosh (c+d x)}{b d} \] Output:
-a*x/b^2-2*a^2*arctanh((b-a*tanh(1/2*d*x+1/2*c))/(a^2+b^2)^(1/2))/b^2/(a^2 +b^2)^(1/2)/d+cosh(d*x+c)/b/d
Time = 1.03 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.04 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {-a \left (c+d x-\frac {2 a \arctan \left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2}}\right )+b \cosh (c+d x)}{b^2 d} \] Input:
Integrate[Sinh[c + d*x]^2/(a + b*Sinh[c + d*x]),x]
Output:
(-(a*(c + d*x - (2*a*ArcTan[(b - a*Tanh[(c + d*x)/2])/Sqrt[-a^2 - b^2]])/S qrt[-a^2 - b^2])) + b*Cosh[c + d*x])/(b^2*d)
Result contains complex when optimal does not.
Time = 0.44 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.11, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 25, 3225, 26, 27, 3042, 26, 3214, 3042, 3139, 1083, 217}
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 {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\sin (i c+i d x)^2}{a-i b \sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\sin (i c+i d x)^2}{a-i b \sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 3225 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}-\frac {i \int -\frac {i a \sinh (c+d x)}{a+b \sinh (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}-\frac {\int \frac {a \sinh (c+d x)}{a+b \sinh (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}-\frac {a \int \frac {\sinh (c+d x)}{a+b \sinh (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}-\frac {a \int -\frac {i \sin (i c+i d x)}{a-i b \sin (i c+i d x)}dx}{b}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \int \frac {\sin (i c+i d x)}{a-i b \sin (i c+i d x)}dx}{b}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \left (\frac {i x}{b}-\frac {i a \int \frac {1}{a+b \sinh (c+d x)}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \left (\frac {i x}{b}-\frac {i a \int \frac {1}{a-i b \sin (i c+i d x)}dx}{b}\right )}{b}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \left (\frac {i x}{b}-\frac {2 a \int \frac {1}{-a \tanh ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tanh \left (\frac {1}{2} (c+d x)\right )+a}d\left (i \tanh \left (\frac {1}{2} (c+d x)\right )\right )}{b d}\right )}{b}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \left (\frac {4 a \int \frac {1}{\tanh ^2\left (\frac {1}{2} (c+d x)\right )-4 \left (a^2+b^2\right )}d\left (2 i a \tanh \left (\frac {1}{2} (c+d x)\right )-2 i b\right )}{b d}+\frac {i x}{b}\right )}{b}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\cosh (c+d x)}{b d}+\frac {i a \left (\frac {i x}{b}-\frac {2 i a \text {arctanh}\left (\frac {\tanh \left (\frac {1}{2} (c+d x)\right )}{2 \sqrt {a^2+b^2}}\right )}{b d \sqrt {a^2+b^2}}\right )}{b}\) |
Input:
Int[Sinh[c + d*x]^2/(a + b*Sinh[c + d*x]),x]
Output:
(I*a*((I*x)/b - ((2*I)*a*ArcTanh[Tanh[(c + d*x)/2]/(2*Sqrt[a^2 + b^2])])/( b*Sqrt[a^2 + b^2]*d)))/b + Cosh[c + d*x]/(b*d)
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[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2/((c_.) + (d_.)*sin[(e_.) + (f _.)*(x_)]), x_Symbol] :> Simp[(-b^2)*(Cos[e + f*x]/(d*f)), x] + Simp[1/d Int[Simp[a^2*d - b*(b*c - 2*a*d)*Sin[e + f*x], x]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Time = 0.19 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.70
method | result | size |
derivativedivides | \(\frac {-\frac {1}{b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {1}{b \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}+\frac {2 a^{2} \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{2} \sqrt {a^{2}+b^{2}}}}{d}\) | \(121\) |
default | \(\frac {-\frac {1}{b \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {1}{b \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}+\frac {2 a^{2} \operatorname {arctanh}\left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b^{2} \sqrt {a^{2}+b^{2}}}}{d}\) | \(121\) |
risch | \(-\frac {a x}{b^{2}}+\frac {{\mathrm e}^{d x +c}}{2 b d}+\frac {{\mathrm e}^{-d x -c}}{2 b d}+\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d \,b^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d \,b^{2}}\) | \(161\) |
Input:
int(sinh(d*x+c)^2/(a+b*sinh(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(-1/b/(tanh(1/2*d*x+1/2*c)-1)+a/b^2*ln(tanh(1/2*d*x+1/2*c)-1)+1/b/(1+t anh(1/2*d*x+1/2*c))-a/b^2*ln(1+tanh(1/2*d*x+1/2*c))+2*a^2/b^2/(a^2+b^2)^(1 /2)*arctanh(1/2*(2*a*tanh(1/2*d*x+1/2*c)-2*b)/(a^2+b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 331 vs. \(2 (68) = 136\).
Time = 0.11 (sec) , antiderivative size = 331, normalized size of antiderivative = 4.66 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {2 \, {\left (a^{3} + a b^{2}\right )} d x \cosh \left (d x + c\right ) - a^{2} b - b^{3} - {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} - {\left (a^{2} b + b^{3}\right )} \sinh \left (d x + c\right )^{2} - 2 \, {\left (a^{2} \cosh \left (d x + c\right ) + a^{2} \sinh \left (d x + c\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right ) + 2 \, {\left ({\left (a^{3} + a b^{2}\right )} d x - {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \, {\left ({\left (a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right ) + {\left (a^{2} b^{2} + b^{4}\right )} d \sinh \left (d x + c\right )\right )}} \] Input:
integrate(sinh(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="fricas")
Output:
-1/2*(2*(a^3 + a*b^2)*d*x*cosh(d*x + c) - a^2*b - b^3 - (a^2*b + b^3)*cosh (d*x + c)^2 - (a^2*b + b^3)*sinh(d*x + c)^2 - 2*(a^2*cosh(d*x + c) + a^2*s inh(d*x + c))*sqrt(a^2 + b^2)*log((b^2*cosh(d*x + c)^2 + b^2*sinh(d*x + c) ^2 + 2*a*b*cosh(d*x + c) + 2*a^2 + b^2 + 2*(b^2*cosh(d*x + c) + a*b)*sinh( d*x + c) - 2*sqrt(a^2 + b^2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a))/(b*c osh(d*x + c)^2 + b*sinh(d*x + c)^2 + 2*a*cosh(d*x + c) + 2*(b*cosh(d*x + c ) + a)*sinh(d*x + c) - b)) + 2*((a^3 + a*b^2)*d*x - (a^2*b + b^3)*cosh(d*x + c))*sinh(d*x + c))/((a^2*b^2 + b^4)*d*cosh(d*x + c) + (a^2*b^2 + b^4)*d *sinh(d*x + c))
Timed out. \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\text {Timed out} \] Input:
integrate(sinh(d*x+c)**2/(a+b*sinh(d*x+c)),x)
Output:
Timed out
Time = 0.11 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.68 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {a^{2} \log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b^{2} d} - \frac {{\left (d x + c\right )} a}{b^{2} d} + \frac {e^{\left (d x + c\right )}}{2 \, b d} + \frac {e^{\left (-d x - c\right )}}{2 \, b d} \] Input:
integrate(sinh(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="maxima")
Output:
a^2*log((b*e^(-d*x - c) - a - sqrt(a^2 + b^2))/(b*e^(-d*x - c) - a + sqrt( a^2 + b^2)))/(sqrt(a^2 + b^2)*b^2*d) - (d*x + c)*a/(b^2*d) + 1/2*e^(d*x + c)/(b*d) + 1/2*e^(-d*x - c)/(b*d)
Time = 0.13 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.56 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {\frac {2 \, a^{2} \log \left (\frac {{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b^{2}} - \frac {2 \, {\left (d x + c\right )} a}{b^{2}} + \frac {e^{\left (d x + c\right )}}{b} + \frac {e^{\left (-d x - c\right )}}{b}}{2 \, d} \] Input:
integrate(sinh(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="giac")
Output:
1/2*(2*a^2*log(abs(2*b*e^(d*x + c) + 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*e^(d *x + c) + 2*a + 2*sqrt(a^2 + b^2)))/(sqrt(a^2 + b^2)*b^2) - 2*(d*x + c)*a/ b^2 + e^(d*x + c)/b + e^(-d*x - c)/b)/d
Time = 1.26 (sec) , antiderivative size = 166, normalized size of antiderivative = 2.34 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {{\mathrm {e}}^{c+d\,x}}{2\,b\,d}+\frac {{\mathrm {e}}^{-c-d\,x}}{2\,b\,d}-\frac {a\,x}{b^2}-\frac {a^2\,\ln \left (-\frac {2\,a^2\,{\mathrm {e}}^{c+d\,x}}{b^3}-\frac {2\,a^2\,\left (b-a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3\,\sqrt {a^2+b^2}}\right )}{b^2\,d\,\sqrt {a^2+b^2}}+\frac {a^2\,\ln \left (\frac {2\,a^2\,\left (b-a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3\,\sqrt {a^2+b^2}}-\frac {2\,a^2\,{\mathrm {e}}^{c+d\,x}}{b^3}\right )}{b^2\,d\,\sqrt {a^2+b^2}} \] Input:
int(sinh(c + d*x)^2/(a + b*sinh(c + d*x)),x)
Output:
exp(c + d*x)/(2*b*d) + exp(- c - d*x)/(2*b*d) - (a*x)/b^2 - (a^2*log(- (2* a^2*exp(c + d*x))/b^3 - (2*a^2*(b - a*exp(c + d*x)))/(b^3*(a^2 + b^2)^(1/2 ))))/(b^2*d*(a^2 + b^2)^(1/2)) + (a^2*log((2*a^2*(b - a*exp(c + d*x)))/(b^ 3*(a^2 + b^2)^(1/2)) - (2*a^2*exp(c + d*x))/b^3))/(b^2*d*(a^2 + b^2)^(1/2) )
Time = 0.23 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.31 \[ \int \frac {\sinh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {2 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} b i +a i}{\sqrt {a^{2}+b^{2}}}\right ) a^{2} i +\cosh \left (d x +c \right ) a^{2} b +\cosh \left (d x +c \right ) b^{3}-a^{3} d x -a \,b^{2} d x}{b^{2} d \left (a^{2}+b^{2}\right )} \] Input:
int(sinh(d*x+c)^2/(a+b*sinh(d*x+c)),x)
Output:
(2*sqrt(a**2 + b**2)*atan((e**(c + d*x)*b*i + a*i)/sqrt(a**2 + b**2))*a**2 *i + cosh(c + d*x)*a**2*b + cosh(c + d*x)*b**3 - a**3*d*x - a*b**2*d*x)/(b **2*d*(a**2 + b**2))