\(\int (d+e x)^2 (a+b \csc ^{-1}(c x)) \, dx\) [45]

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

Optimal result

Integrand size = 16, antiderivative size = 123 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {b d e \sqrt {1-\frac {1}{c^2 x^2}} x}{c}+\frac {b e^2 \sqrt {1-\frac {1}{c^2 x^2}} x^2}{6 c}-\frac {b d^3 \csc ^{-1}(c x)}{3 e}+\frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}+\frac {b \left (6 c^2 d^2+e^2\right ) \text {arctanh}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{6 c^3} \] Output:

b*d*e*(1-1/c^2/x^2)^(1/2)*x/c+1/6*b*e^2*(1-1/c^2/x^2)^(1/2)*x^2/c-1/3*b*d^ 
3*arccsc(c*x)/e+1/3*(e*x+d)^3*(a+b*arccsc(c*x))/e+1/6*b*(6*c^2*d^2+e^2)*ar 
ctanh((1-1/c^2/x^2)^(1/2))/c^3
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.99 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {c^2 x \left (b e \sqrt {1-\frac {1}{c^2 x^2}} (6 d+e x)+2 a c \left (3 d^2+3 d e x+e^2 x^2\right )\right )+2 b c^3 x \left (3 d^2+3 d e x+e^2 x^2\right ) \csc ^{-1}(c x)+b \left (6 c^2 d^2+e^2\right ) \log \left (\left (1+\sqrt {1-\frac {1}{c^2 x^2}}\right ) x\right )}{6 c^3} \] Input:

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

Output:

(c^2*x*(b*e*Sqrt[1 - 1/(c^2*x^2)]*(6*d + e*x) + 2*a*c*(3*d^2 + 3*d*e*x + e 
^2*x^2)) + 2*b*c^3*x*(3*d^2 + 3*d*e*x + e^2*x^2)*ArcCsc[c*x] + b*(6*c^2*d^ 
2 + e^2)*Log[(1 + Sqrt[1 - 1/(c^2*x^2)])*x])/(6*c^3)
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.06, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {5750, 1892, 1803, 540, 25, 2338, 25, 538, 223, 243, 73, 221}

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

\(\Big \downarrow \) 5750

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

\(\Big \downarrow \) 1892

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

\(\Big \downarrow \) 1803

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

\(\Big \downarrow \) 540

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (-\frac {1}{2} \int -\frac {\left (\frac {2 d^3}{x^2}+6 e^2 d+\frac {e \left (6 d^2+\frac {e^2}{c^2}\right )}{x}\right ) x^2}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \int \frac {\left (\frac {2 d^3}{x^2}+6 e^2 d+\frac {e \left (6 d^2+\frac {e^2}{c^2}\right )}{x}\right ) x^2}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 2338

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (-\int -\frac {\left (\frac {2 d^3}{x}+e \left (6 d^2+\frac {e^2}{c^2}\right )\right ) x}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (\int \frac {\left (\frac {2 d^3}{x}+e \left (6 d^2+\frac {e^2}{c^2}\right )\right ) x}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 538

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (2 d^3 \int \frac {1}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}+e \left (\frac {e^2}{c^2}+6 d^2\right ) \int \frac {x}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 223

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (e \left (\frac {e^2}{c^2}+6 d^2\right ) \int \frac {x}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x}+2 c d^3 \arcsin \left (\frac {1}{c x}\right )-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 243

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (\frac {1}{2} e \left (\frac {e^2}{c^2}+6 d^2\right ) \int \frac {x}{\sqrt {1-\frac {1}{c^2 x^2}}}d\frac {1}{x^2}+2 c d^3 \arcsin \left (\frac {1}{c x}\right )-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (-c^2 e \left (\frac {e^2}{c^2}+6 d^2\right ) \int \frac {1}{c^2-c^2 \sqrt {1-\frac {1}{c^2 x^2}}}d\sqrt {1-\frac {1}{c^2 x^2}}+2 c d^3 \arcsin \left (\frac {1}{c x}\right )-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {(d+e x)^3 \left (a+b \csc ^{-1}(c x)\right )}{3 e}-\frac {b \left (\frac {1}{2} \left (2 c d^3 \arcsin \left (\frac {1}{c x}\right )-e \text {arctanh}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right ) \left (\frac {e^2}{c^2}+6 d^2\right )-6 d e^2 x \sqrt {1-\frac {1}{c^2 x^2}}\right )-\frac {1}{2} e^3 x^2 \sqrt {1-\frac {1}{c^2 x^2}}\right )}{3 c e}\)

Input:

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

Output:

((d + e*x)^3*(a + b*ArcCsc[c*x]))/(3*e) - (b*(-1/2*(e^3*Sqrt[1 - 1/(c^2*x^ 
2)]*x^2) + (-6*d*e^2*Sqrt[1 - 1/(c^2*x^2)]*x + 2*c*d^3*ArcSin[1/(c*x)] - e 
*(6*d^2 + e^2/c^2)*ArcTanh[Sqrt[1 - 1/(c^2*x^2)]])/2))/(3*c*e)
 

Defintions of rubi rules used

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

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 223
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt 
[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && NegQ[b]
 

rule 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

rule 538
Int[((c_) + (d_.)*(x_))/((x_)*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> Simp 
[c   Int[1/(x*Sqrt[a + b*x^2]), x], x] + Simp[d   Int[1/Sqrt[a + b*x^2], x] 
, x] /; FreeQ[{a, b, c, d}, x]
 

rule 540
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol 
] :> With[{Qx = PolynomialQuotient[(c + d*x)^n, x, x], R = PolynomialRemain 
der[(c + d*x)^n, x, x]}, Simp[R*x^(m + 1)*((a + b*x^2)^(p + 1)/(a*(m + 1))) 
, x] + Simp[1/(a*(m + 1))   Int[x^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*(m + 
1)*Qx - b*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, p}, x] && IG 
tQ[n, 1] && ILtQ[m, -1] && GtQ[p, -1] && IntegerQ[2*p]
 

rule 1803
Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q 
_.), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(d + e*x 
)^q*(a + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, c, d, e, m, n, p, q}, x] && 
 EqQ[n2, 2*n] && IntegerQ[Simplify[(m + 1)/n]]
 

rule 1892
Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^(mn_.))^(q_.)*((a_) + (c_.)*(x_)^(n2_.))^ 
(p_.), x_Symbol] :> Int[x^(m + mn*q)*(e + d/x^mn)^q*(a + c*x^n2)^p, x] /; F 
reeQ[{a, c, d, e, m, mn, p}, x] && EqQ[n2, -2*mn] && IntegerQ[q] && (PosQ[n 
2] ||  !IntegerQ[p])
 

rule 2338
Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{ 
Q = PolynomialQuotient[Pq, c*x, x], R = PolynomialRemainder[Pq, c*x, x]}, S 
imp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Simp[1/(a*c*( 
m + 1))   Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*( 
m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && Lt 
Q[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])
 

rule 5750
Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))*((d_.) + (e_.)*(x_))^(m_.), x_Symbol 
] :> Simp[(d + e*x)^(m + 1)*((a + b*ArcCsc[c*x])/(e*(m + 1))), x] + Simp[b/ 
(c*e*(m + 1))   Int[(d + e*x)^(m + 1)/(x^2*Sqrt[1 - 1/(c^2*x^2)]), x], x] / 
; FreeQ[{a, b, c, d, e, m}, x] && NeQ[m, -1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(303\) vs. \(2(109)=218\).

Time = 0.30 (sec) , antiderivative size = 304, normalized size of antiderivative = 2.47

method result size
parts \(\frac {a \left (e x +d \right )^{3}}{3 e}+\frac {b \,e^{2} \operatorname {arccsc}\left (c x \right ) x^{3}}{3}+b e \,\operatorname {arccsc}\left (c x \right ) x^{2} d +b \,\operatorname {arccsc}\left (c x \right ) x \,d^{2}+\frac {b \,d^{3} \operatorname {arccsc}\left (c x \right )}{3 e}-\frac {b \sqrt {c^{2} x^{2}-1}\, d^{3} \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{3 c e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \,e^{2} \left (c^{2} x^{2}-1\right )}{6 c^{3} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {b \sqrt {c^{2} x^{2}-1}\, d^{2} \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{c^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b e \left (c^{2} x^{2}-1\right ) d}{c^{3} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \,e^{2} \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{6 c^{4} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}\) \(304\)
derivativedivides \(\frac {\frac {a \left (c e x +c d \right )^{3}}{3 c^{2} e}+\frac {b c \,\operatorname {arccsc}\left (c x \right ) d^{3}}{3 e}+b \,\operatorname {arccsc}\left (c x \right ) d^{2} c x +b c e \,\operatorname {arccsc}\left (c x \right ) d \,x^{2}+\frac {b c \,e^{2} \operatorname {arccsc}\left (c x \right ) x^{3}}{3}-\frac {b \sqrt {c^{2} x^{2}-1}\, d^{3} \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{3 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \sqrt {c^{2} x^{2}-1}\, d^{2} \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}+\frac {b e \left (c^{2} x^{2}-1\right ) d}{c^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \,e^{2} \left (c^{2} x^{2}-1\right )}{6 c^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {b \,e^{2} \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{6 c^{3} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}}{c}\) \(315\)
default \(\frac {\frac {a \left (c e x +c d \right )^{3}}{3 c^{2} e}+\frac {b c \,\operatorname {arccsc}\left (c x \right ) d^{3}}{3 e}+b \,\operatorname {arccsc}\left (c x \right ) d^{2} c x +b c e \,\operatorname {arccsc}\left (c x \right ) d \,x^{2}+\frac {b c \,e^{2} \operatorname {arccsc}\left (c x \right ) x^{3}}{3}-\frac {b \sqrt {c^{2} x^{2}-1}\, d^{3} \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{3 e \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \sqrt {c^{2} x^{2}-1}\, d^{2} \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}+\frac {b e \left (c^{2} x^{2}-1\right ) d}{c^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}+\frac {b \,e^{2} \left (c^{2} x^{2}-1\right )}{6 c^{2} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {b \,e^{2} \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{6 c^{3} \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, x}}{c}\) \(315\)

Input:

int((e*x+d)^2*(a+b*arccsc(c*x)),x,method=_RETURNVERBOSE)
 

Output:

1/3*a*(e*x+d)^3/e+1/3*b*e^2*arccsc(c*x)*x^3+b*e*arccsc(c*x)*x^2*d+b*arccsc 
(c*x)*x*d^2+1/3*b*d^3*arccsc(c*x)/e-1/3*b/c/e*(c^2*x^2-1)^(1/2)/((c^2*x^2- 
1)/c^2/x^2)^(1/2)/x*d^3*arctan(1/(c^2*x^2-1)^(1/2))+1/6*b/c^3*e^2*(c^2*x^2 
-1)/((c^2*x^2-1)/c^2/x^2)^(1/2)+b/c^2*(c^2*x^2-1)^(1/2)/((c^2*x^2-1)/c^2/x 
^2)^(1/2)/x*d^2*ln(c*x+(c^2*x^2-1)^(1/2))+b/c^3*e*(c^2*x^2-1)/((c^2*x^2-1) 
/c^2/x^2)^(1/2)/x*d+1/6*b/c^4*e^2*(c^2*x^2-1)^(1/2)/((c^2*x^2-1)/c^2/x^2)^ 
(1/2)/x*ln(c*x+(c^2*x^2-1)^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.70 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {2 \, a c^{3} e^{2} x^{3} + 6 \, a c^{3} d e x^{2} + 6 \, a c^{3} d^{2} x + 2 \, {\left (b c^{3} e^{2} x^{3} + 3 \, b c^{3} d e x^{2} + 3 \, b c^{3} d^{2} x - 3 \, b c^{3} d^{2} - 3 \, b c^{3} d e - b c^{3} e^{2}\right )} \operatorname {arccsc}\left (c x\right ) - 4 \, {\left (3 \, b c^{3} d^{2} + 3 \, b c^{3} d e + b c^{3} e^{2}\right )} \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right ) - {\left (6 \, b c^{2} d^{2} + b e^{2}\right )} \log \left (-c x + \sqrt {c^{2} x^{2} - 1}\right ) + {\left (b c e^{2} x + 6 \, b c d e\right )} \sqrt {c^{2} x^{2} - 1}}{6 \, c^{3}} \] Input:

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

Output:

1/6*(2*a*c^3*e^2*x^3 + 6*a*c^3*d*e*x^2 + 6*a*c^3*d^2*x + 2*(b*c^3*e^2*x^3 
+ 3*b*c^3*d*e*x^2 + 3*b*c^3*d^2*x - 3*b*c^3*d^2 - 3*b*c^3*d*e - b*c^3*e^2) 
*arccsc(c*x) - 4*(3*b*c^3*d^2 + 3*b*c^3*d*e + b*c^3*e^2)*arctan(-c*x + sqr 
t(c^2*x^2 - 1)) - (6*b*c^2*d^2 + b*e^2)*log(-c*x + sqrt(c^2*x^2 - 1)) + (b 
*c*e^2*x + 6*b*c*d*e)*sqrt(c^2*x^2 - 1))/c^3
 

Sympy [A] (verification not implemented)

Time = 4.24 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.85 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=a d^{2} x + a d e x^{2} + \frac {a e^{2} x^{3}}{3} + b d^{2} x \operatorname {acsc}{\left (c x \right )} + b d e x^{2} \operatorname {acsc}{\left (c x \right )} + \frac {b e^{2} x^{3} \operatorname {acsc}{\left (c x \right )}}{3} + \frac {b d^{2} \left (\begin {cases} \operatorname {acosh}{\left (c x \right )} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\- i \operatorname {asin}{\left (c x \right )} & \text {otherwise} \end {cases}\right )}{c} + \frac {b d e \left (\begin {cases} \frac {\sqrt {c^{2} x^{2} - 1}}{c} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\\frac {i \sqrt {- c^{2} x^{2} + 1}}{c} & \text {otherwise} \end {cases}\right )}{c} + \frac {b e^{2} \left (\begin {cases} \frac {x \sqrt {c^{2} x^{2} - 1}}{2 c} + \frac {\operatorname {acosh}{\left (c x \right )}}{2 c^{2}} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\- \frac {i c x^{3}}{2 \sqrt {- c^{2} x^{2} + 1}} + \frac {i x}{2 c \sqrt {- c^{2} x^{2} + 1}} - \frac {i \operatorname {asin}{\left (c x \right )}}{2 c^{2}} & \text {otherwise} \end {cases}\right )}{3 c} \] Input:

integrate((e*x+d)**2*(a+b*acsc(c*x)),x)
 

Output:

a*d**2*x + a*d*e*x**2 + a*e**2*x**3/3 + b*d**2*x*acsc(c*x) + b*d*e*x**2*ac 
sc(c*x) + b*e**2*x**3*acsc(c*x)/3 + b*d**2*Piecewise((acosh(c*x), Abs(c**2 
*x**2) > 1), (-I*asin(c*x), True))/c + b*d*e*Piecewise((sqrt(c**2*x**2 - 1 
)/c, Abs(c**2*x**2) > 1), (I*sqrt(-c**2*x**2 + 1)/c, True))/c + b*e**2*Pie 
cewise((x*sqrt(c**2*x**2 - 1)/(2*c) + acosh(c*x)/(2*c**2), Abs(c**2*x**2) 
> 1), (-I*c*x**3/(2*sqrt(-c**2*x**2 + 1)) + I*x/(2*c*sqrt(-c**2*x**2 + 1)) 
 - I*asin(c*x)/(2*c**2), True))/(3*c)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.61 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=\frac {1}{3} \, a e^{2} x^{3} + a d e x^{2} + {\left (x^{2} \operatorname {arccsc}\left (c x\right ) + \frac {x \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c}\right )} b d e + \frac {1}{12} \, {\left (4 \, x^{3} \operatorname {arccsc}\left (c x\right ) + \frac {\frac {2 \, \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c^{2} {\left (\frac {1}{c^{2} x^{2}} - 1\right )} + c^{2}} + \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{2}} - \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} - 1\right )}{c^{2}}}{c}\right )} b e^{2} + a d^{2} x + \frac {{\left (2 \, c x \operatorname {arccsc}\left (c x\right ) + \log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )\right )} b d^{2}}{2 \, c} \] Input:

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

Output:

1/3*a*e^2*x^3 + a*d*e*x^2 + (x^2*arccsc(c*x) + x*sqrt(-1/(c^2*x^2) + 1)/c) 
*b*d*e + 1/12*(4*x^3*arccsc(c*x) + (2*sqrt(-1/(c^2*x^2) + 1)/(c^2*(1/(c^2* 
x^2) - 1) + c^2) + log(sqrt(-1/(c^2*x^2) + 1) + 1)/c^2 - log(sqrt(-1/(c^2* 
x^2) + 1) - 1)/c^2)/c)*b*e^2 + a*d^2*x + 1/2*(2*c*x*arccsc(c*x) + log(sqrt 
(-1/(c^2*x^2) + 1) + 1) - log(-sqrt(-1/(c^2*x^2) + 1) + 1))*b*d^2/c
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 602 vs. \(2 (109) = 218\).

Time = 1.92 (sec) , antiderivative size = 602, normalized size of antiderivative = 4.89 \[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx =\text {Too large to display} \] Input:

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

Output:

1/24*(b*e^2*x^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3*arcsin(1/(c*x))/c + a*e^2*x 
^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3/c - 24*b*d*e*x^2*(1/(c^2*x^2) - 1)*arcsi 
n(1/(c*x))/c + b*e^2*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2/c^2 - 24*a*d*e*x^2 
*(1/(c^2*x^2) - 1)/c + 12*b*d^2*x*(sqrt(-1/(c^2*x^2) + 1) + 1)*arcsin(1/(c 
*x))/c + 12*a*d^2*x*(sqrt(-1/(c^2*x^2) + 1) + 1)/c + 3*b*e^2*x*(sqrt(-1/(c 
^2*x^2) + 1) + 1)*arcsin(1/(c*x))/c^3 + 24*b*d*e*x*sqrt(-1/(c^2*x^2) + 1)/ 
c^2 + 3*a*e^2*x*(sqrt(-1/(c^2*x^2) + 1) + 1)/c^3 + 24*b*d^2*log(sqrt(-1/(c 
^2*x^2) + 1) + 1)/c^2 - 24*b*d^2*log(1/(abs(c)*abs(x)))/c^2 + 24*b*d*e*arc 
sin(1/(c*x))/c^3 + 24*a*d*e/c^3 + 4*b*e^2*log(sqrt(-1/(c^2*x^2) + 1) + 1)/ 
c^4 - 4*b*e^2*log(1/(abs(c)*abs(x)))/c^4 + 12*b*d^2*arcsin(1/(c*x))/(c^3*x 
*(sqrt(-1/(c^2*x^2) + 1) + 1)) + 12*a*d^2/(c^3*x*(sqrt(-1/(c^2*x^2) + 1) + 
 1)) + 3*b*e^2*arcsin(1/(c*x))/(c^5*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) + 3*a* 
e^2/(c^5*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) - b*e^2/(c^6*x^2*(sqrt(-1/(c^2*x^ 
2) + 1) + 1)^2) + b*e^2*arcsin(1/(c*x))/(c^7*x^3*(sqrt(-1/(c^2*x^2) + 1) + 
 1)^3) + a*e^2/(c^7*x^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3))*c
 

Mupad [F(-1)]

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

int((a + b*asin(1/(c*x)))*(d + e*x)^2,x)
 

Output:

int((a + b*asin(1/(c*x)))*(d + e*x)^2, x)
 

Reduce [F]

\[ \int (d+e x)^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx=\left (\int \mathit {acsc} \left (c x \right )d x \right ) b \,d^{2}+\left (\int \mathit {acsc} \left (c x \right ) x^{2}d x \right ) b \,e^{2}+2 \left (\int \mathit {acsc} \left (c x \right ) x d x \right ) b d e +a \,d^{2} x +a d e \,x^{2}+\frac {a \,e^{2} x^{3}}{3} \] Input:

int((e*x+d)^2*(a+b*acsc(c*x)),x)
 

Output:

(3*int(acsc(c*x),x)*b*d**2 + 3*int(acsc(c*x)*x**2,x)*b*e**2 + 6*int(acsc(c 
*x)*x,x)*b*d*e + 3*a*d**2*x + 3*a*d*e*x**2 + a*e**2*x**3)/3