\(\int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx\) [100]

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

Optimal result

Integrand size = 37, antiderivative size = 555 \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=-\frac {i a (g+h x)^3 \cos (e+f x)}{3 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x)^2 \arctan \left (e^{i (e+f x)}\right ) \cos (e+f x)}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a (g+h x)^2 \cos (e+f x) \log \left (1+e^{2 i (e+f x)}\right )}{f \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {i a h (g+h x) \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {2 a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}+\frac {a h^2 \cos (e+f x) \operatorname {PolyLog}\left (3,-e^{2 i (e+f x)}\right )}{2 f^3 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \] Output:

-1/3*I*a*(h*x+g)^3*cos(f*x+e)/h/(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1 
/2)-2*I*a*(h*x+g)^2*arctan(exp(I*(f*x+e)))*cos(f*x+e)/f/(a-a*sin(f*x+e))^( 
1/2)/(c+c*sin(f*x+e))^(1/2)+a*(h*x+g)^2*cos(f*x+e)*ln(1+exp(2*I*(f*x+e)))/ 
f/(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)+2*I*a*h*(h*x+g)*cos(f*x+e) 
*polylog(2,-I*exp(I*(f*x+e)))/f^2/(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^ 
(1/2)-2*I*a*h*(h*x+g)*cos(f*x+e)*polylog(2,I*exp(I*(f*x+e)))/f^2/(a-a*sin( 
f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)-I*a*h*(h*x+g)*cos(f*x+e)*polylog(2,-e 
xp(2*I*(f*x+e)))/f^2/(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)-2*a*h^2 
*cos(f*x+e)*polylog(3,-I*exp(I*(f*x+e)))/f^3/(a-a*sin(f*x+e))^(1/2)/(c+c*s 
in(f*x+e))^(1/2)+2*a*h^2*cos(f*x+e)*polylog(3,I*exp(I*(f*x+e)))/f^3/(a-a*s 
in(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)+1/2*a*h^2*cos(f*x+e)*polylog(3,-ex 
p(2*I*(f*x+e)))/f^3/(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)
 

Mathematica [A] (verified)

Time = 2.44 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.35 \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\frac {\sqrt {2} \left (i+e^{i (e+f x)}\right ) \left (f^2 (g+h x)^2 \left (f (g+h x)-6 i h \log \left (1+i e^{-i (e+f x)}\right )\right )+12 f h^2 (g+h x) \operatorname {PolyLog}\left (2,-i e^{-i (e+f x)}\right )-12 i h^3 \operatorname {PolyLog}\left (3,-i e^{-i (e+f x)}\right )\right ) \sqrt {a-a \sin (e+f x)}}{3 \left (-i+e^{i (e+f x)}\right ) \sqrt {-i c e^{-i (e+f x)} \left (i+e^{i (e+f x)}\right )^2} f^3 h} \] Input:

Integrate[((g + h*x)^2*Sqrt[a - a*Sin[e + f*x]])/Sqrt[c + c*Sin[e + f*x]], 
x]
 

Output:

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

Rubi [A] (verified)

Time = 1.09 (sec) , antiderivative size = 268, normalized size of antiderivative = 0.48, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {5115, 7292, 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 {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c \sin (e+f x)+c}} \, dx\)

\(\Big \downarrow \) 5115

\(\displaystyle \frac {\cos (e+f x) \int (g+h x)^2 \sec (e+f x) (a-a \sin (e+f x))dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}\)

\(\Big \downarrow \) 7292

\(\displaystyle \frac {\cos (e+f x) \int a (g+h x)^2 \sec (e+f x) (1-\sin (e+f x))dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {a \cos (e+f x) \int (g+h x)^2 \sec (e+f x) (1-\sin (e+f x))dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}\)

\(\Big \downarrow \) 7293

\(\displaystyle \frac {a \cos (e+f x) \int \left ((g+h x)^2 \sec (e+f x)-(g+h x)^2 \tan (e+f x)\right )dx}{\sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}\)

\(\Big \downarrow \) 2009

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

Input:

Int[((g + h*x)^2*Sqrt[a - a*Sin[e + f*x]])/Sqrt[c + c*Sin[e + f*x]],x]
 

Output:

(a*Cos[e + f*x]*(((-1/3*I)*(g + h*x)^3)/h - ((2*I)*(g + h*x)^2*ArcTan[E^(I 
*(e + f*x))])/f + ((g + h*x)^2*Log[1 + E^((2*I)*(e + f*x))])/f + ((2*I)*h* 
(g + h*x)*PolyLog[2, (-I)*E^(I*(e + f*x))])/f^2 - ((2*I)*h*(g + h*x)*PolyL 
og[2, I*E^(I*(e + f*x))])/f^2 - (I*h*(g + h*x)*PolyLog[2, -E^((2*I)*(e + f 
*x))])/f^2 - (2*h^2*PolyLog[3, (-I)*E^(I*(e + f*x))])/f^3 + (2*h^2*PolyLog 
[3, I*E^(I*(e + f*x))])/f^3 + (h^2*PolyLog[3, -E^((2*I)*(e + f*x))])/(2*f^ 
3)))/(Sqrt[a - a*Sin[e + f*x]]*Sqrt[c + c*Sin[e + f*x]])
 

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 5115
Int[((g_.) + (h_.)*(x_))^(p_.)*((a_) + (b_.)*Sin[(e_.) + (f_.)*(x_)])^(m_)* 
((c_) + (d_.)*Sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a^IntPart[m] 
*c^IntPart[m]*(a + b*Sin[e + f*x])^FracPart[m]*((c + d*Sin[e + f*x])^FracPa 
rt[m]/Cos[e + f*x]^(2*FracPart[m]))   Int[(g + h*x)^p*Cos[e + f*x]^(2*m)*(c 
 + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && 
 EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[p] && IntegerQ[2*m] && 
IGeQ[n - m, 0]
 

rule 7292
Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =! 
= u]
 

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

\[\int \frac {\left (h x +g \right )^{2} \sqrt {a -a \sin \left (f x +e \right )}}{\sqrt {c +c \sin \left (f x +e \right )}}d x\]

Input:

int((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x)
 

Output:

int((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x)
 

Fricas [F(-2)]

Exception generated. \[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\text {Exception raised: TypeError} \] Input:

integrate((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x, algor 
ithm="fricas")
 

Output:

Exception raised: TypeError >>  Error detected within library code:   inte 
grate: implementation incomplete (has polynomial part)
 

Sympy [F]

\[ \int \frac {(g+h x)^2 \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int \frac {\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right )} \left (g + h x\right )^{2}}{\sqrt {c \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \] Input:

integrate((h*x+g)**2*(a-a*sin(f*x+e))**(1/2)/(c+c*sin(f*x+e))**(1/2),x)
 

Output:

Integral(sqrt(-a*(sin(e + f*x) - 1))*(g + h*x)**2/sqrt(c*(sin(e + f*x) + 1 
)), x)
 

Maxima [F]

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

integrate((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x, algor 
ithm="maxima")
 

Output:

integrate((h*x + g)^2*sqrt(-a*sin(f*x + e) + a)/sqrt(c*sin(f*x + e) + c), 
x)
 

Giac [F]

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

integrate((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x, algor 
ithm="giac")
 

Output:

integrate((h*x + g)^2*sqrt(-a*sin(f*x + e) + a)/sqrt(c*sin(f*x + e) + c), 
x)
 

Mupad [F(-1)]

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

int(((g + h*x)^2*(a - a*sin(e + f*x))^(1/2))/(c + c*sin(e + f*x))^(1/2),x)
 

Output:

int(((g + h*x)^2*(a - a*sin(e + f*x))^(1/2))/(c + c*sin(e + f*x))^(1/2), x 
)
 

Reduce [F]

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

int((h*x+g)^2*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x)
 

Output:

(sqrt(c)*sqrt(a)*(int((sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1)*x* 
*2)/(sin(e + f*x) + 1),x)*h**2 + 2*int((sqrt(sin(e + f*x) + 1)*sqrt( - sin 
(e + f*x) + 1)*x)/(sin(e + f*x) + 1),x)*g*h + int((sqrt(sin(e + f*x) + 1)* 
sqrt( - sin(e + f*x) + 1))/(sin(e + f*x) + 1),x)*g**2))/c