\(\int \frac {\sqrt {a-a \sin (e+f x)} (c+c \sin (e+f x))^{3/2}}{x^2} \, dx\) [97]

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

Optimal result

Integrand size = 33, antiderivative size = 273 \[ \int \frac {\sqrt {a-a \sin (e+f x)} (c+c \sin (e+f x))^{3/2}}{x^2} \, dx=-\frac {c \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}{x}+c f \cos (2 e) \operatorname {CosIntegral}(2 f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}-c f \operatorname {CosIntegral}(f x) \sec (e+f x) \sin (e) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}-\frac {c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)} \sin (2 e+2 f x)}{2 x}-c f \cos (e) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)} \text {Si}(f x)-c f \sec (e+f x) \sin (2 e) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)} \text {Si}(2 f x) \] Output:

-c*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)/x+c*f*cos(2*e)*Ci(2*f*x)* 
sec(f*x+e)*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)-c*f*Ci(f*x)*sec(f 
*x+e)*sin(e)*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)-1/2*c*sec(f*x+e 
)*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)*sin(2*f*x+2*e)/x-c*f*cos(e 
)*sec(f*x+e)*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)*Si(f*x)-c*f*sec 
(f*x+e)*sin(2*e)*(a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(1/2)*Si(2*f*x)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 2.62 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.85 \[ \int \frac {\sqrt {a-a \sin (e+f x)} (c+c \sin (e+f x))^{3/2}}{x^2} \, dx=\frac {c e^{-i (e+f x)} \sqrt {-i c e^{-i (e+f x)} \left (i+e^{i (e+f x)}\right )^2} \left (-i-2 e^{i (e+f x)}-2 e^{3 i (e+f x)}+i e^{4 i (e+f x)}-2 i e^{i (e+2 f x)} f x \operatorname {ExpIntegralEi}(-i f x)+2 i e^{3 i e+2 i f x} f x \operatorname {ExpIntegralEi}(i f x)+2 e^{2 i f x} f x \operatorname {ExpIntegralEi}(-2 i f x)+2 e^{2 i (2 e+f x)} f x \operatorname {ExpIntegralEi}(2 i f x)\right ) \sqrt {a-a \sin (e+f x)}}{2 \sqrt {2} \left (1+e^{2 i (e+f x)}\right ) x} \] Input:

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

Output:

(c*Sqrt[((-I)*c*(I + E^(I*(e + f*x)))^2)/E^(I*(e + f*x))]*(-I - 2*E^(I*(e 
+ f*x)) - 2*E^((3*I)*(e + f*x)) + I*E^((4*I)*(e + f*x)) - (2*I)*E^(I*(e + 
2*f*x))*f*x*ExpIntegralEi[(-I)*f*x] + (2*I)*E^((3*I)*e + (2*I)*f*x)*f*x*Ex 
pIntegralEi[I*f*x] + 2*E^((2*I)*f*x)*f*x*ExpIntegralEi[(-2*I)*f*x] + 2*E^( 
(2*I)*(2*e + f*x))*f*x*ExpIntegralEi[(2*I)*f*x])*Sqrt[a - a*Sin[e + f*x]]) 
/(2*Sqrt[2]*E^(I*(e + f*x))*(1 + E^((2*I)*(e + f*x)))*x)
 

Rubi [A] (verified)

Time = 0.86 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.39, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, 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 {\sqrt {a-a \sin (e+f x)} (c \sin (e+f x)+c)^{3/2}}{x^2} \, dx\)

\(\Big \downarrow \) 5115

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

\(\Big \downarrow \) 7292

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c} \left (-f \sin (e) \operatorname {CosIntegral}(f x)+f \cos (2 e) \operatorname {CosIntegral}(2 f x)-f \sin (2 e) \text {Si}(2 f x)-f \cos (e) \text {Si}(f x)-\frac {\sin (2 e+2 f x)}{2 x}-\frac {\cos (e+f x)}{x}\right )\)

Input:

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

Output:

c*Sec[e + f*x]*Sqrt[a - a*Sin[e + f*x]]*Sqrt[c + c*Sin[e + f*x]]*(-(Cos[e 
+ f*x]/x) + f*Cos[2*e]*CosIntegral[2*f*x] - f*CosIntegral[f*x]*Sin[e] - Si 
n[2*e + 2*f*x]/(2*x) - f*Cos[e]*SinIntegral[f*x] - f*Sin[2*e]*SinIntegral[ 
2*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 {\sqrt {a -a \sin \left (f x +e \right )}\, \left (c +c \sin \left (f x +e \right )\right )^{\frac {3}{2}}}{x^{2}}d x\]

Input:

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

Output:

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

Fricas [F(-2)]

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

integrate((a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(3/2)/x^2,x, algorithm=" 
fricas")
 

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

integrate((a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(3/2)/x^2,x, algorithm=" 
maxima")
 

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 608 vs. \(2 (247) = 494\).

Time = 0.22 (sec) , antiderivative size = 608, normalized size of antiderivative = 2.23 \[ \int \frac {\sqrt {a-a \sin (e+f x)} (c+c \sin (e+f x))^{3/2}}{x^2} \, dx=\text {Too large to display} \] Input:

integrate((a-a*sin(f*x+e))^(1/2)*(c+c*sin(f*x+e))^(3/2)/x^2,x, algorithm=" 
giac")
 

Output:

-1/2*(pi*c*f^2*cos(2*e)*cos_integral(2*f*x)*sgn(cos(-1/4*pi + 1/2*f*x + 1/ 
2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) - (pi - 2*f*x - 2*e)*c*f^2*cos(2 
*e)*cos_integral(2*f*x)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*p 
i + 1/2*f*x + 1/2*e)) - 2*c*e*f^2*cos(2*e)*cos_integral(2*f*x)*sgn(cos(-1/ 
4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) - pi*c*f^2*co 
s_integral(f*x)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2* 
f*x + 1/2*e))*sin(e) + (pi - 2*f*x - 2*e)*c*f^2*cos_integral(f*x)*sgn(cos( 
-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(e) + 2 
*c*e*f^2*cos_integral(f*x)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/ 
4*pi + 1/2*f*x + 1/2*e))*sin(e) - pi*c*f^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2 
*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(2*e)*sin_integral(2*f*x) + (p 
i - 2*f*x - 2*e)*c*f^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi 
 + 1/2*f*x + 1/2*e))*sin(2*e)*sin_integral(2*f*x) + 2*c*e*f^2*sgn(cos(-1/4 
*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(2*e)*sin_i 
ntegral(2*f*x) - pi*c*f^2*cos(e)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(s 
in(-1/4*pi + 1/2*f*x + 1/2*e))*sin_integral(f*x) + (pi - 2*f*x - 2*e)*c*f^ 
2*cos(e)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1 
/2*e))*sin_integral(f*x) + 2*c*e*f^2*cos(e)*sgn(cos(-1/4*pi + 1/2*f*x + 1/ 
2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin_integral(f*x) - 2*c*f^2*cos( 
f*x + e)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x ...
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(c)*sqrt(a)*c*( - sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1)*si 
n(e + f*x) - sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1) + 2*int((sqr 
t(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1)*cos(e + f*x)*sin(e + f*x))/( 
sin(e + f*x)*x - x),x)*f*x - int((sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f 
*x) + 1)*cos(e + f*x))/(sin(e + f*x)*x - x),x)*f*x))/x