\(\int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx\) [170]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 20, antiderivative size = 296 \[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f}+\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f^2}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} f^3} \] Output:

(d*x+c)^2*ln(1+b*exp(f*x+e)/(a-(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f-(d*x+c) 
^2*ln(1+b*exp(f*x+e)/(a+(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f+2*d*(d*x+c)*po 
lylog(2,-b*exp(f*x+e)/(a-(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f^2-2*d*(d*x+c) 
*polylog(2,-b*exp(f*x+e)/(a+(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f^2-2*d^2*po 
lylog(3,-b*exp(f*x+e)/(a-(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f^3+2*d^2*polyl 
og(3,-b*exp(f*x+e)/(a+(a^2+b^2)^(1/2)))/(a^2+b^2)^(1/2)/f^3
 

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 233, normalized size of antiderivative = 0.79 \[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )-(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )+\frac {2 d \left (f (c+d x) \operatorname {PolyLog}\left (2,\frac {b e^{e+f x}}{-a+\sqrt {a^2+b^2}}\right )-d \operatorname {PolyLog}\left (3,\frac {b e^{e+f x}}{-a+\sqrt {a^2+b^2}}\right )\right )}{f^2}-\frac {2 d \left (f (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )-d \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )\right )}{f^2}}{\sqrt {a^2+b^2} f} \] Input:

Integrate[(c + d*x)^2/(a + b*Sinh[e + f*x]),x]
 

Output:

((c + d*x)^2*Log[1 + (b*E^(e + f*x))/(a - Sqrt[a^2 + b^2])] - (c + d*x)^2* 
Log[1 + (b*E^(e + f*x))/(a + Sqrt[a^2 + b^2])] + (2*d*(f*(c + d*x)*PolyLog 
[2, (b*E^(e + f*x))/(-a + Sqrt[a^2 + b^2])] - d*PolyLog[3, (b*E^(e + f*x)) 
/(-a + Sqrt[a^2 + b^2])]))/f^2 - (2*d*(f*(c + d*x)*PolyLog[2, -((b*E^(e + 
f*x))/(a + Sqrt[a^2 + b^2]))] - d*PolyLog[3, -((b*E^(e + f*x))/(a + Sqrt[a 
^2 + b^2]))]))/f^2)/(Sqrt[a^2 + b^2]*f)
 

Rubi [A] (verified)

Time = 1.26 (sec) , antiderivative size = 283, normalized size of antiderivative = 0.96, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {3042, 3803, 25, 2694, 27, 2620, 3011, 2720, 7143}

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 {(c+d x)^2}{a+b \sinh (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d x)^2}{a-i b \sin (i e+i f x)}dx\)

\(\Big \downarrow \) 3803

\(\displaystyle 2 \int -\frac {e^{e+f x} (c+d x)^2}{-2 e^{e+f x} a-b e^{2 (e+f x)}+b}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -2 \int \frac {e^{e+f x} (c+d x)^2}{-2 e^{e+f x} a-b e^{2 (e+f x)}+b}dx\)

\(\Big \downarrow \) 2694

\(\displaystyle -2 \left (\frac {b \int -\frac {e^{e+f x} (c+d x)^2}{2 \left (a+b e^{e+f x}-\sqrt {a^2+b^2}\right )}dx}{\sqrt {a^2+b^2}}-\frac {b \int -\frac {e^{e+f x} (c+d x)^2}{2 \left (a+b e^{e+f x}+\sqrt {a^2+b^2}\right )}dx}{\sqrt {a^2+b^2}}\right )\)

\(\Big \downarrow \) 27

\(\displaystyle -2 \left (\frac {b \int \frac {e^{e+f x} (c+d x)^2}{a+b e^{e+f x}+\sqrt {a^2+b^2}}dx}{2 \sqrt {a^2+b^2}}-\frac {b \int \frac {e^{e+f x} (c+d x)^2}{a+b e^{e+f x}-\sqrt {a^2+b^2}}dx}{2 \sqrt {a^2+b^2}}\right )\)

\(\Big \downarrow \) 2620

\(\displaystyle -2 \left (\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{\sqrt {a^2+b^2}+a}+1\right )}{b f}-\frac {2 d \int (c+d x) \log \left (\frac {e^{e+f x} b}{a+\sqrt {a^2+b^2}}+1\right )dx}{b f}\right )}{2 \sqrt {a^2+b^2}}-\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}+1\right )}{b f}-\frac {2 d \int (c+d x) \log \left (\frac {e^{e+f x} b}{a-\sqrt {a^2+b^2}}+1\right )dx}{b f}\right )}{2 \sqrt {a^2+b^2}}\right )\)

\(\Big \downarrow \) 3011

\(\displaystyle -2 \left (\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{\sqrt {a^2+b^2}+a}+1\right )}{b f}-\frac {2 d \left (\frac {d \int \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )dx}{f}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}-\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}+1\right )}{b f}-\frac {2 d \left (\frac {d \int \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )dx}{f}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}\right )\)

\(\Big \downarrow \) 2720

\(\displaystyle -2 \left (\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{\sqrt {a^2+b^2}+a}+1\right )}{b f}-\frac {2 d \left (\frac {d \int e^{-e-f x} \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )de^{e+f x}}{f^2}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}-\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}+1\right )}{b f}-\frac {2 d \left (\frac {d \int e^{-e-f x} \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )de^{e+f x}}{f^2}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle -2 \left (\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{\sqrt {a^2+b^2}+a}+1\right )}{b f}-\frac {2 d \left (\frac {d \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{f^2}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}-\frac {b \left (\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}+1\right )}{b f}-\frac {2 d \left (\frac {d \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{f^2}-\frac {(c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2+b^2}}\right )}{f}\right )}{b f}\right )}{2 \sqrt {a^2+b^2}}\right )\)

Input:

Int[(c + d*x)^2/(a + b*Sinh[e + f*x]),x]
 

Output:

-2*(-1/2*(b*(((c + d*x)^2*Log[1 + (b*E^(e + f*x))/(a - Sqrt[a^2 + b^2])])/ 
(b*f) - (2*d*(-(((c + d*x)*PolyLog[2, -((b*E^(e + f*x))/(a - Sqrt[a^2 + b^ 
2]))])/f) + (d*PolyLog[3, -((b*E^(e + f*x))/(a - Sqrt[a^2 + b^2]))])/f^2)) 
/(b*f)))/Sqrt[a^2 + b^2] + (b*(((c + d*x)^2*Log[1 + (b*E^(e + f*x))/(a + S 
qrt[a^2 + b^2])])/(b*f) - (2*d*(-(((c + d*x)*PolyLog[2, -((b*E^(e + f*x))/ 
(a + Sqrt[a^2 + b^2]))])/f) + (d*PolyLog[3, -((b*E^(e + f*x))/(a + Sqrt[a^ 
2 + b^2]))])/f^2))/(b*f)))/(2*Sqrt[a^2 + b^2]))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

rule 2694
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) 
*(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q)   Int 
[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q)   Int[(f + g*x) 
^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ 
v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3803
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + (Complex[0, fz_])* 
(f_.)*(x_)]), x_Symbol] :> Simp[2   Int[(c + d*x)^m*(E^((-I)*e + f*fz*x)/(( 
-I)*b + 2*a*E^((-I)*e + f*fz*x) + I*b*E^(2*((-I)*e + f*fz*x)))), x], x] /; 
FreeQ[{a, b, c, d, e, f, fz}, x] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
Maple [F]

\[\int \frac {\left (d x +c \right )^{2}}{a +b \sinh \left (f x +e \right )}d x\]

Input:

int((d*x+c)^2/(a+b*sinh(f*x+e)),x)
 

Output:

int((d*x+c)^2/(a+b*sinh(f*x+e)),x)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 708 vs. \(2 (264) = 528\).

Time = 0.11 (sec) , antiderivative size = 708, normalized size of antiderivative = 2.39 \[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx =\text {Too large to display} \] Input:

integrate((d*x+c)^2/(a+b*sinh(f*x+e)),x, algorithm="fricas")
 

Output:

-(2*b*d^2*sqrt((a^2 + b^2)/b^2)*polylog(3, (a*cosh(f*x + e) + a*sinh(f*x + 
 e) + (b*cosh(f*x + e) + b*sinh(f*x + e))*sqrt((a^2 + b^2)/b^2))/b) - 2*b* 
d^2*sqrt((a^2 + b^2)/b^2)*polylog(3, (a*cosh(f*x + e) + a*sinh(f*x + e) - 
(b*cosh(f*x + e) + b*sinh(f*x + e))*sqrt((a^2 + b^2)/b^2))/b) - 2*(b*d^2*f 
*x + b*c*d*f)*sqrt((a^2 + b^2)/b^2)*dilog((a*cosh(f*x + e) + a*sinh(f*x + 
e) + (b*cosh(f*x + e) + b*sinh(f*x + e))*sqrt((a^2 + b^2)/b^2) - b)/b + 1) 
 + 2*(b*d^2*f*x + b*c*d*f)*sqrt((a^2 + b^2)/b^2)*dilog((a*cosh(f*x + e) + 
a*sinh(f*x + e) - (b*cosh(f*x + e) + b*sinh(f*x + e))*sqrt((a^2 + b^2)/b^2 
) - b)/b + 1) + (b*d^2*e^2 - 2*b*c*d*e*f + b*c^2*f^2)*sqrt((a^2 + b^2)/b^2 
)*log(2*b*cosh(f*x + e) + 2*b*sinh(f*x + e) + 2*b*sqrt((a^2 + b^2)/b^2) + 
2*a) - (b*d^2*e^2 - 2*b*c*d*e*f + b*c^2*f^2)*sqrt((a^2 + b^2)/b^2)*log(2*b 
*cosh(f*x + e) + 2*b*sinh(f*x + e) - 2*b*sqrt((a^2 + b^2)/b^2) + 2*a) - (b 
*d^2*f^2*x^2 + 2*b*c*d*f^2*x - b*d^2*e^2 + 2*b*c*d*e*f)*sqrt((a^2 + b^2)/b 
^2)*log(-(a*cosh(f*x + e) + a*sinh(f*x + e) + (b*cosh(f*x + e) + b*sinh(f* 
x + e))*sqrt((a^2 + b^2)/b^2) - b)/b) + (b*d^2*f^2*x^2 + 2*b*c*d*f^2*x - b 
*d^2*e^2 + 2*b*c*d*e*f)*sqrt((a^2 + b^2)/b^2)*log(-(a*cosh(f*x + e) + a*si 
nh(f*x + e) - (b*cosh(f*x + e) + b*sinh(f*x + e))*sqrt((a^2 + b^2)/b^2) - 
b)/b))/((a^2 + b^2)*f^3)
 

Sympy [F]

\[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\int \frac {\left (c + d x\right )^{2}}{a + b \sinh {\left (e + f x \right )}}\, dx \] Input:

integrate((d*x+c)**2/(a+b*sinh(f*x+e)),x)
 

Output:

Integral((c + d*x)**2/(a + b*sinh(e + f*x)), x)
 

Maxima [F]

\[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\int { \frac {{\left (d x + c\right )}^{2}}{b \sinh \left (f x + e\right ) + a} \,d x } \] Input:

integrate((d*x+c)^2/(a+b*sinh(f*x+e)),x, algorithm="maxima")
 

Output:

c^2*log((b*e^(-f*x - e) - a - sqrt(a^2 + b^2))/(b*e^(-f*x - e) - a + sqrt( 
a^2 + b^2)))/(sqrt(a^2 + b^2)*f) + integrate(2*d^2*x^2/(b*(e^(f*x + e) - e 
^(-f*x - e)) + 2*a) + 4*c*d*x/(b*(e^(f*x + e) - e^(-f*x - e)) + 2*a), x)
 

Giac [F]

\[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\int { \frac {{\left (d x + c\right )}^{2}}{b \sinh \left (f x + e\right ) + a} \,d x } \] Input:

integrate((d*x+c)^2/(a+b*sinh(f*x+e)),x, algorithm="giac")
 

Output:

integrate((d*x + c)^2/(b*sinh(f*x + e) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\int \frac {{\left (c+d\,x\right )}^2}{a+b\,\mathrm {sinh}\left (e+f\,x\right )} \,d x \] Input:

int((c + d*x)^2/(a + b*sinh(e + f*x)),x)
 

Output:

int((c + d*x)^2/(a + b*sinh(e + f*x)), x)
 

Reduce [F]

\[ \int \frac {(c+d x)^2}{a+b \sinh (e+f x)} \, dx=\frac {2 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {e^{f x +e} b i +a i}{\sqrt {a^{2}+b^{2}}}\right ) c^{2} i +2 e^{e} \left (\int \frac {e^{f x} x^{2}}{e^{2 f x +2 e} b +2 e^{f x +e} a -b}d x \right ) a^{2} d^{2} f +2 e^{e} \left (\int \frac {e^{f x} x^{2}}{e^{2 f x +2 e} b +2 e^{f x +e} a -b}d x \right ) b^{2} d^{2} f +4 e^{e} \left (\int \frac {e^{f x} x}{e^{2 f x +2 e} b +2 e^{f x +e} a -b}d x \right ) a^{2} c d f +4 e^{e} \left (\int \frac {e^{f x} x}{e^{2 f x +2 e} b +2 e^{f x +e} a -b}d x \right ) b^{2} c d f}{f \left (a^{2}+b^{2}\right )} \] Input:

int((d*x+c)^2/(a+b*sinh(f*x+e)),x)
 

Output:

(2*(sqrt(a**2 + b**2)*atan((e**(e + f*x)*b*i + a*i)/sqrt(a**2 + b**2))*c** 
2*i + e**e*int((e**(f*x)*x**2)/(e**(2*e + 2*f*x)*b + 2*e**(e + f*x)*a - b) 
,x)*a**2*d**2*f + e**e*int((e**(f*x)*x**2)/(e**(2*e + 2*f*x)*b + 2*e**(e + 
 f*x)*a - b),x)*b**2*d**2*f + 2*e**e*int((e**(f*x)*x)/(e**(2*e + 2*f*x)*b 
+ 2*e**(e + f*x)*a - b),x)*a**2*c*d*f + 2*e**e*int((e**(f*x)*x)/(e**(2*e + 
 2*f*x)*b + 2*e**(e + f*x)*a - b),x)*b**2*c*d*f))/(f*(a**2 + b**2))