\(\int \frac {(f+g x+h x^2) (a+b \arcsin (c x))}{d+e x} \, dx\) [164]

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

Optimal result

Integrand size = 26, antiderivative size = 476 \[ \int \frac {\left (f+g x+h x^2\right ) (a+b \arcsin (c x))}{d+e x} \, dx=\frac {b (e g-d h) \sqrt {1-c^2 x^2}}{c e^2}+\frac {b h x \sqrt {1-c^2 x^2}}{4 c e}-\frac {b h \arcsin (c x)}{4 c^2 e}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x)^2}{2 e^3}+\frac {(e g-d h) x (a+b \arcsin (c x))}{e^2}+\frac {h x^2 (a+b \arcsin (c x))}{2 e}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log \left (1-\frac {i e e^{i \arcsin (c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}+\frac {b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log \left (1-\frac {i e e^{i \arcsin (c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log (d+e x)}{e^3}+\frac {\left (e^2 f-d e g+d^2 h\right ) (a+b \arcsin (c x)) \log (d+e x)}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \operatorname {PolyLog}\left (2,\frac {i e e^{i \arcsin (c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )}{e^3}-\frac {i b \left (e^2 f-d e g+d^2 h\right ) \operatorname {PolyLog}\left (2,\frac {i e e^{i \arcsin (c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{e^3} \] Output:

b*(-d*h+e*g)*(-c^2*x^2+1)^(1/2)/c/e^2+1/4*b*h*x*(-c^2*x^2+1)^(1/2)/c/e-1/4 
*b*h*arcsin(c*x)/c^2/e-1/2*I*b*(d^2*h-d*e*g+e^2*f)*arcsin(c*x)^2/e^3+(-d*h 
+e*g)*x*(a+b*arcsin(c*x))/e^2+1/2*h*x^2*(a+b*arcsin(c*x))/e+b*(d^2*h-d*e*g 
+e^2*f)*arcsin(c*x)*ln(1-I*e*(I*c*x+(-c^2*x^2+1)^(1/2))/(c*d-(c^2*d^2-e^2) 
^(1/2)))/e^3+b*(d^2*h-d*e*g+e^2*f)*arcsin(c*x)*ln(1-I*e*(I*c*x+(-c^2*x^2+1 
)^(1/2))/(c*d+(c^2*d^2-e^2)^(1/2)))/e^3-b*(d^2*h-d*e*g+e^2*f)*arcsin(c*x)* 
ln(e*x+d)/e^3+(d^2*h-d*e*g+e^2*f)*(a+b*arcsin(c*x))*ln(e*x+d)/e^3-I*b*(d^2 
*h-d*e*g+e^2*f)*polylog(2,I*e*(I*c*x+(-c^2*x^2+1)^(1/2))/(c*d-(c^2*d^2-e^2 
)^(1/2)))/e^3-I*b*(d^2*h-d*e*g+e^2*f)*polylog(2,I*e*(I*c*x+(-c^2*x^2+1)^(1 
/2))/(c*d+(c^2*d^2-e^2)^(1/2)))/e^3
 

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 457, normalized size of antiderivative = 0.96 \[ \int \frac {\left (f+g x+h x^2\right ) (a+b \arcsin (c x))}{d+e x} \, dx=\frac {\frac {2 b e (e g-d h) \sqrt {1-c^2 x^2}}{c}+\frac {b e^2 h x \sqrt {1-c^2 x^2}}{2 c}-\frac {b e^2 h \arcsin (c x)}{2 c^2}-i b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x)^2+2 e (e g-d h) x (a+b \arcsin (c x))+e^2 h x^2 (a+b \arcsin (c x))+2 b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log \left (1+\frac {i e e^{i \arcsin (c x)}}{-c d+\sqrt {c^2 d^2-e^2}}\right )+2 b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log \left (1-\frac {i e e^{i \arcsin (c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )-2 b \left (e^2 f-d e g+d^2 h\right ) \arcsin (c x) \log (d+e x)+2 \left (e^2 f-d e g+d^2 h\right ) (a+b \arcsin (c x)) \log (d+e x)-2 i b \left (e^2 f-d e g+d^2 h\right ) \operatorname {PolyLog}\left (2,\frac {i e e^{i \arcsin (c x)}}{c d-\sqrt {c^2 d^2-e^2}}\right )-2 i b \left (e^2 f-d e g+d^2 h\right ) \operatorname {PolyLog}\left (2,\frac {i e e^{i \arcsin (c x)}}{c d+\sqrt {c^2 d^2-e^2}}\right )}{2 e^3} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 1.25 (sec) , antiderivative size = 476, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {5252, 27, 7293, 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 {\left (f+g x+h x^2\right ) (a+b \arcsin (c x))}{d+e x} \, dx\)

\(\Big \downarrow \) 5252

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5252
Int[((a_.) + ArcSin[(c_.)*(x_)]*(b_.))*(Px_)*((d_.) + (e_.)*(x_))^(m_.), x_ 
Symbol] :> With[{u = IntHide[Px*(d + e*x)^m, x]}, Simp[(a + b*ArcSin[c*x]) 
  u, x] - Simp[b*c   Int[SimplifyIntegrand[u/Sqrt[1 - c^2*x^2], x], x], x]] 
 /; FreeQ[{a, b, c, d, e, m}, x] && PolynomialQ[Px, x]
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2437 vs. \(2 (481 ) = 962\).

Time = 1.92 (sec) , antiderivative size = 2438, normalized size of antiderivative = 5.12

method result size
parts \(\text {Expression too large to display}\) \(2438\)
derivativedivides \(\text {Expression too large to display}\) \(2489\)
default \(\text {Expression too large to display}\) \(2489\)

Input:

int((h*x^2+g*x+f)*(a+b*arcsin(c*x))/(e*x+d),x,method=_RETURNVERBOSE)
 

Output:

I*b/e*d^2*h/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e+(-c^2* 
d^2+e^2)^(1/2))/(I*d*c+(-c^2*d^2+e^2)^(1/2)))-b/e*d^2*h*arcsin(c*x)/(c^2*d 
^2-e^2)*ln((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e-(-c^2*d^2+e^2)^(1/2))/(I*d* 
c-(-c^2*d^2+e^2)^(1/2)))-b/e*d^2*h*arcsin(c*x)/(c^2*d^2-e^2)*ln((I*d*c+(I* 
c*x+(-c^2*x^2+1)^(1/2))*e+(-c^2*d^2+e^2)^(1/2))/(I*d*c+(-c^2*d^2+e^2)^(1/2 
)))+I*b/e*d^2*h/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e-(- 
c^2*d^2+e^2)^(1/2))/(I*d*c-(-c^2*d^2+e^2)^(1/2)))+b/e*arcsin(c*x)*x*g-1/2* 
I*b*arcsin(c*x)^2/e*f-I*b*c^2/e^3*d^4*h/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+ 
(-c^2*x^2+1)^(1/2))*e-(-c^2*d^2+e^2)^(1/2))/(I*d*c-(-c^2*d^2+e^2)^(1/2)))- 
I*b*c^2/e^3*d^4*h/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e+ 
(-c^2*d^2+e^2)^(1/2))/(I*d*c+(-c^2*d^2+e^2)^(1/2)))-I*b*c^2/e*f/(c^2*d^2-e 
^2)*dilog((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e-(-c^2*d^2+e^2)^(1/2))/(I*d*c 
-(-c^2*d^2+e^2)^(1/2)))*d^2-I*b*c^2/e*f/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+ 
(-c^2*x^2+1)^(1/2))*e+(-c^2*d^2+e^2)^(1/2))/(I*d*c+(-c^2*d^2+e^2)^(1/2)))* 
d^2+b*g*(-c^2*x^2+1)^(1/2)/c/e+1/8*b/c^2*h/e*sin(2*arcsin(c*x))+a*(1/e^2*( 
1/2*e*h*x^2-d*h*x+e*g*x)+(d^2*h-d*e*g+e^2*f)/e^3*ln(e*x+d))+1/2*I*b*arcsin 
(c*x)^2/e^2*d*g-1/2*I*b*arcsin(c*x)^2/e^3*d^2*h-I*b*d*g/(c^2*d^2-e^2)*dilo 
g((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/2))*e+(-c^2*d^2+e^2)^(1/2))/(I*d*c+(-c^2*d 
^2+e^2)^(1/2)))-I*b*d*g/(c^2*d^2-e^2)*dilog((I*d*c+(I*c*x+(-c^2*x^2+1)^(1/ 
2))*e-(-c^2*d^2+e^2)^(1/2))/(I*d*c-(-c^2*d^2+e^2)^(1/2)))+b*d*g*arcsin(...
 

Fricas [F]

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

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

Output:

integral((a*h*x^2 + a*g*x + a*f + (b*h*x^2 + b*g*x + b*f)*arcsin(c*x))/(e* 
x + d), x)
 

Sympy [F]

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

integrate((h*x**2+g*x+f)*(a+b*asin(c*x))/(e*x+d),x)
 

Output:

Integral((a + b*asin(c*x))*(f + g*x + h*x**2)/(d + e*x), x)
 

Maxima [F]

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

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

Output:

a*g*(x/e - d*log(e*x + d)/e^2) + 1/2*a*h*(2*d^2*log(e*x + d)/e^3 + (e*x^2 
- 2*d*x)/e^2) + a*f*log(e*x + d)/e + integrate((b*h*x^2 + b*g*x + b*f)*arc 
tan2(c*x, sqrt(c*x + 1)*sqrt(-c*x + 1))/(e*x + d), x)
 

Giac [F(-2)]

Exception generated. \[ \int \frac {\left (f+g x+h x^2\right ) (a+b \arcsin (c x))}{d+e x} \, dx=\text {Exception raised: RuntimeError} \] Input:

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

Output:

Exception raised: RuntimeError >> an error occurred running a Giac command 
:INPUT:sage2OUTPUT:sym2poly/r2sym(const gen & e,const index_m & i,const ve 
cteur & l) Error: Bad Argument Value
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {\left (f+g x+h x^2\right ) (a+b \arcsin (c x))}{d+e x} \, dx=\frac {2 \mathit {asin} \left (c x \right ) b c \,e^{2} g x +2 \sqrt {-c^{2} x^{2}+1}\, b \,e^{2} g -2 \left (\int \frac {\mathit {asin} \left (c x \right )}{e x +d}d x \right ) b c d \,e^{2} g +2 \left (\int \frac {\mathit {asin} \left (c x \right )}{e x +d}d x \right ) b c \,e^{3} f +2 \left (\int \frac {\mathit {asin} \left (c x \right ) x^{2}}{e x +d}d x \right ) b c \,e^{3} h +2 \,\mathrm {log}\left (e x +d \right ) a c \,d^{2} h -2 \,\mathrm {log}\left (e x +d \right ) a c d e g +2 \,\mathrm {log}\left (e x +d \right ) a c \,e^{2} f -2 a c d e h x +2 a c \,e^{2} g x +a c \,e^{2} h \,x^{2}}{2 c \,e^{3}} \] Input:

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

Output:

(2*asin(c*x)*b*c*e**2*g*x + 2*sqrt( - c**2*x**2 + 1)*b*e**2*g - 2*int(asin 
(c*x)/(d + e*x),x)*b*c*d*e**2*g + 2*int(asin(c*x)/(d + e*x),x)*b*c*e**3*f 
+ 2*int((asin(c*x)*x**2)/(d + e*x),x)*b*c*e**3*h + 2*log(d + e*x)*a*c*d**2 
*h - 2*log(d + e*x)*a*c*d*e*g + 2*log(d + e*x)*a*c*e**2*f - 2*a*c*d*e*h*x 
+ 2*a*c*e**2*g*x + a*c*e**2*h*x**2)/(2*c*e**3)