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

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 = 35, antiderivative size = 355 \[ \int \frac {(g+h x) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=-\frac {i a (g+h x)^2 \cos (e+f x)}{2 h \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}-\frac {2 i a (g+h x) \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) \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 {i a h \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 \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 \cos (e+f x) \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2 \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}} \] Output:

-1/2*I*a*(h*x+g)^2*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)*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)*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)+I*a*h*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*co 
s(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)-1/2*I*a*h*cos(f*x+e)*polylog(2,-exp(2*I*(f*x+e)))/f^2/(a-a*si 
n(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2)
 

Mathematica [A] (verified)

Time = 1.92 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.43 \[ \int \frac {(g+h x) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\frac {\left (i+e^{i (e+f x)}\right ) \left (f \left (f x (2 g+h x)-4 i (g+h x) \log \left (1+i e^{-i (e+f x)}\right )\right )+4 h \operatorname {PolyLog}\left (2,-i e^{-i (e+f x)}\right )\right ) \sqrt {a-a \sin (e+f x)}}{\sqrt {2} \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^2} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.50, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, 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) \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) \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) \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) \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 ((g+h x) \sec (e+f x)-(g+h x) \tan (e+f x))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) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {i h \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i h \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {i h \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{2 f^2}+\frac {(g+h x) \log \left (1+e^{2 i (e+f x)}\right )}{f}-\frac {i (g+h x)^2}{2 h}\right )}{\sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}\)

Input:

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

Output:

(a*Cos[e + f*x]*(((-1/2*I)*(g + h*x)^2)/h - ((2*I)*(g + h*x)*ArcTan[E^(I*( 
e + f*x))])/f + ((g + h*x)*Log[1 + E^((2*I)*(e + f*x))])/f + (I*h*PolyLog[ 
2, (-I)*E^(I*(e + f*x))])/f^2 - (I*h*PolyLog[2, I*E^(I*(e + f*x))])/f^2 - 
((I/2)*h*PolyLog[2, -E^((2*I)*(e + f*x))])/f^2))/(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 ) \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)*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x)
 

Output:

int((h*x+g)*(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) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

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

Sympy [F]

\[ \int \frac {(g+h x) \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 )}{\sqrt {c \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \] Input:

integrate((h*x+g)*(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)/sqrt(c*(sin(e + f*x) + 1)), 
 x)
 

Maxima [F]

\[ \int \frac {(g+h x) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int { \frac {{\left (h x + g\right )} \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)*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x, algorit 
hm="maxima")
 

Output:

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

Giac [F]

\[ \int \frac {(g+h x) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int { \frac {{\left (h x + g\right )} \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)*(a-a*sin(f*x+e))^(1/2)/(c+c*sin(f*x+e))^(1/2),x, algorit 
hm="giac")
 

Output:

integrate((h*x + g)*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) \sqrt {a-a \sin (e+f x)}}{\sqrt {c+c \sin (e+f x)}} \, dx=\int \frac {\left (g+h\,x\right )\,\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)*(a - a*sin(e + f*x))^(1/2))/(c + c*sin(e + f*x))^(1/2),x)
 

Output:

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

Reduce [F]

\[ \int \frac {(g+h x) \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}{\sin \left (f x +e \right )+1}d x \right ) 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 \right )}{c} \] Input:

int((h*x+g)*(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) 
/(sin(e + f*x) + 1),x)*h + int((sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x 
) + 1))/(sin(e + f*x) + 1),x)*g))/c