Integrand size = 21, antiderivative size = 73 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=-\frac {a x}{b^2}+\frac {2 \sqrt {a-b} \sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d}+\frac {\sinh (c+d x)}{b d} \] Output:
-a*x/b^2+2*(a-b)^(1/2)*(a+b)^(1/2)*arctanh((a-b)^(1/2)*tanh(1/2*d*x+1/2*c) /(a+b)^(1/2))/b^2/d+sinh(d*x+c)/b/d
Time = 0.26 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.95 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\frac {-a (c+d x)+2 \sqrt {-a^2+b^2} \arctan \left (\frac {(a-b) \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )+b \sinh (c+d x)}{b^2 d} \] Input:
Integrate[Sinh[c + d*x]^2/(a + b*Cosh[c + d*x]),x]
Output:
(-(a*(c + d*x)) + 2*Sqrt[-a^2 + b^2]*ArcTan[((a - b)*Tanh[(c + d*x)/2])/Sq rt[-a^2 + b^2]] + b*Sinh[c + d*x])/(b^2*d)
Time = 0.50 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.19, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 25, 3174, 25, 3042, 3214, 3042, 3138, 218}
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 \cosh (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\cos \left (i c+i d x-\frac {\pi }{2}\right )^2}{a-b \sin \left (i c+i d x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\cos \left (\frac {1}{2} (2 i c-\pi )+i d x\right )^2}{a-b \sin \left (\frac {1}{2} (2 i c-\pi )+i d x\right )}dx\) |
\(\Big \downarrow \) 3174 |
\(\displaystyle \frac {\int -\frac {b+a \cosh (c+d x)}{a+b \cosh (c+d x)}dx}{b}+\frac {\sinh (c+d x)}{b d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\int \frac {b+a \cosh (c+d x)}{a+b \cosh (c+d x)}dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\int \frac {b+a \sin \left (i c+i d x+\frac {\pi }{2}\right )}{a+b \sin \left (i c+i d x+\frac {\pi }{2}\right )}dx}{b}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\frac {a x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{a+b \cosh (c+d x)}dx}{b}}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\frac {a x}{b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{a+b \sin \left (i c+i d x+\frac {\pi }{2}\right )}dx}{b}}{b}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\frac {a x}{b}+\frac {2 i \left (a^2-b^2\right ) \int \frac {1}{-\left ((a-b) \tanh ^2\left (\frac {1}{2} (c+d x)\right )\right )+a+b}d\left (i \tanh \left (\frac {1}{2} (c+d x)\right )\right )}{b d}}{b}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\sinh (c+d x)}{b d}-\frac {\frac {a x}{b}-\frac {2 \left (a^2-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b d \sqrt {a-b} \sqrt {a+b}}}{b}\) |
Input:
Int[Sinh[c + d*x]^2/(a + b*Cosh[c + d*x]),x]
Output:
-(((a*x)/b - (2*(a^2 - b^2)*ArcTanh[(Sqrt[a - b]*Tanh[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*b*Sqrt[a + b]*d))/b) + Sinh[c + d*x]/(b*d)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*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[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + p))), x] + Simp[g^2*((p - 1)/(b*(m + p))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^m*(b + a*Sin[e + f*x]), x], x] /; F reeQ[{a, b, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[p, 1] && NeQ[m + p, 0] && IntegersQ[2*m, 2*p]
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]
Time = 1.59 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.77
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 (\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 {2 \left (-a^{2}+b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(129\) |
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 (\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 {2 \left (-a^{2}+b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(129\) |
risch | \(-\frac {a x}{b^{2}}+\frac {{\mathrm e}^{d x +c}}{2 b d}-\frac {{\mathrm e}^{-d x -c}}{2 d b}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{d x +c}-\frac {-a +\sqrt {a^{2}-b^{2}}}{b}\right )}{d \,b^{2}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{d x +c}+\frac {a +\sqrt {a^{2}-b^{2}}}{b}\right )}{d \,b^{2}}\) | \(130\) |
Input:
int(sinh(d*x+c)^2/(a+b*cosh(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/(tan h(1/2*d*x+1/2*c)-1)+a/b^2*ln(tanh(1/2*d*x+1/2*c)-1)-2/b^2*(-a^2+b^2)/((a+b )*(a-b))^(1/2)*arctanh((a-b)*tanh(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (64) = 128\).
Time = 0.10 (sec) , antiderivative size = 415, normalized size of antiderivative = 5.68 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\left [-\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \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 (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}, -\frac {2 \, a d x \cosh \left (d x + c\right ) - b \cosh \left (d x + c\right )^{2} - b \sinh \left (d x + c\right )^{2} + 4 \, \sqrt {-a^{2} + b^{2}} {\left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{a^{2} - b^{2}}\right ) + 2 \, {\left (a d x - b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}{2 \, {\left (b^{2} d \cosh \left (d x + c\right ) + b^{2} d \sinh \left (d x + c\right )\right )}}\right ] \] Input:
integrate(sinh(d*x+c)^2/(a+b*cosh(d*x+c)),x, algorithm="fricas")
Output:
[-1/2*(2*a*d*x*cosh(d*x + c) - b*cosh(d*x + c)^2 - b*sinh(d*x + c)^2 - 2*s qrt(a^2 - b^2)*(cosh(d*x + c) + sinh(d*x + c))*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*cosh(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*d*x - b*cosh(d*x + c))* sinh(d*x + c) + b)/(b^2*d*cosh(d*x + c) + b^2*d*sinh(d*x + c)), -1/2*(2*a* d*x*cosh(d*x + c) - b*cosh(d*x + c)^2 - b*sinh(d*x + c)^2 + 4*sqrt(-a^2 + b^2)*(cosh(d*x + c) + sinh(d*x + c))*arctan(-sqrt(-a^2 + b^2)*(b*cosh(d*x + c) + b*sinh(d*x + c) + a)/(a^2 - b^2)) + 2*(a*d*x - b*cosh(d*x + c))*sin h(d*x + c) + b)/(b^2*d*cosh(d*x + c) + b^2*d*sinh(d*x + c))]
Leaf count of result is larger than twice the leaf count of optimal. 1122 vs. \(2 (61) = 122\).
Time = 57.26 (sec) , antiderivative size = 1122, normalized size of antiderivative = 15.37 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate(sinh(d*x+c)**2/(a+b*cosh(d*x+c)),x)
Output:
Piecewise((zoo*x*sinh(c)**2/cosh(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (-d* x*tanh(c/2 + d*x/2)**2/(b*d*tanh(c/2 + d*x/2)**2 - b*d) + d*x/(b*d*tanh(c/ 2 + d*x/2)**2 - b*d) - 2*tanh(c/2 + d*x/2)/(b*d*tanh(c/2 + d*x/2)**2 - b*d ), Eq(a, b)), (d*x*tanh(c/2 + d*x/2)**2/(b*d*tanh(c/2 + d*x/2)**2 - b*d) - d*x/(b*d*tanh(c/2 + d*x/2)**2 - b*d) - 2*tanh(c/2 + d*x/2)/(b*d*tanh(c/2 + d*x/2)**2 - b*d), Eq(a, -b)), ((x*sinh(c + d*x)**2/2 - x*cosh(c + d*x)** 2/2 + sinh(c + d*x)*cosh(c + d*x)/(2*d))/a, Eq(b, 0)), (x*sinh(c)**2/(a + b*cosh(c)), Eq(d, 0)), (-a*d*x*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/ 2)**2/(b**2*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**2*d*sq rt(a/(a - b) + b/(a - b))) + a*d*x*sqrt(a/(a - b) + b/(a - b))/(b**2*d*sqr t(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**2*d*sqrt(a/(a - b) + b/ (a - b))) - a*log(-sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/2))*tanh(c /2 + d*x/2)**2/(b**2*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**2*d*sqrt(a/(a - b) + b/(a - b))) + a*log(-sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/2))/(b**2*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)* *2 - b**2*d*sqrt(a/(a - b) + b/(a - b))) + a*log(sqrt(a/(a - b) + b/(a - b )) + tanh(c/2 + d*x/2))*tanh(c/2 + d*x/2)**2/(b**2*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**2*d*sqrt(a/(a - b) + b/(a - b))) - a*log( sqrt(a/(a - b) + b/(a - b)) + tanh(c/2 + d*x/2))/(b**2*d*sqrt(a/(a - b) + b/(a - b))*tanh(c/2 + d*x/2)**2 - b**2*d*sqrt(a/(a - b) + b/(a - b))) -...
Exception generated. \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sinh(d*x+c)^2/(a+b*cosh(d*x+c)),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*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.13 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.22 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=-\frac {\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} - \frac {4 \, {\left (a^{2} - b^{2}\right )} \arctan \left (\frac {b e^{\left (d x + c\right )} + a}{\sqrt {-a^{2} + b^{2}}}\right )}{\sqrt {-a^{2} + b^{2}} b^{2}}}{2 \, d} \] Input:
integrate(sinh(d*x+c)^2/(a+b*cosh(d*x+c)),x, algorithm="giac")
Output:
-1/2*(2*(d*x + c)*a/b^2 - e^(d*x + c)/b + e^(-d*x - c)/b - 4*(a^2 - b^2)*a rctan((b*e^(d*x + c) + a)/sqrt(-a^2 + b^2))/(sqrt(-a^2 + b^2)*b^2))/d
Time = 2.16 (sec) , antiderivative size = 176, normalized size of antiderivative = 2.41 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (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 {\ln \left (-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}-\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d}-\frac {\ln \left (\frac {2\,\sqrt {a+b}\,\sqrt {a-b}\,\left (b+a\,{\mathrm {e}}^{c+d\,x}\right )}{b^3}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (a^2-b^2\right )}{b^3}\right )\,\sqrt {a+b}\,\sqrt {a-b}}{b^2\,d} \] Input:
int(sinh(c + d*x)^2/(a + b*cosh(c + d*x)),x)
Output:
exp(c + d*x)/(2*b*d) - exp(- c - d*x)/(2*b*d) - (a*x)/b^2 + (log(- (2*exp( c + d*x)*(a^2 - b^2))/b^3 - (2*(a + b)^(1/2)*(a - b)^(1/2)*(b + a*exp(c + d*x)))/b^3)*(a + b)^(1/2)*(a - b)^(1/2))/(b^2*d) - (log((2*(a + b)^(1/2)*( a - b)^(1/2)*(b + a*exp(c + d*x)))/b^3 - (2*exp(c + d*x)*(a^2 - b^2))/b^3) *(a + b)^(1/2)*(a - b)^(1/2))/(b^2*d)
Time = 0.26 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.22 \[ \int \frac {\sinh ^2(c+d x)}{a+b \cosh (c+d x)} \, dx=\frac {-4 e^{d x +c} \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{d x +c} b +a}{\sqrt {-a^{2}+b^{2}}}\right )+e^{2 d x +2 c} b -2 e^{d x +c} a d x -b}{2 e^{d x +c} b^{2} d} \] Input:
int(sinh(d*x+c)^2/(a+b*cosh(d*x+c)),x)
Output:
( - 4*e**(c + d*x)*sqrt( - a**2 + b**2)*atan((e**(c + d*x)*b + a)/sqrt( - a**2 + b**2)) + e**(2*c + 2*d*x)*b - 2*e**(c + d*x)*a*d*x - b)/(2*e**(c + d*x)*b**2*d)