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

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

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) \]

[Out]

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

Rubi [A] (verified)

Time = 0.83 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {4700, 6873, 12, 6874, 3378, 3384, 3380, 3383} \[ \int \frac {\sqrt {a-a \sin (e+f x)} (c+c \sin (e+f x))^{3/2}}{x^2} \, dx=-c f \sin (e) \operatorname {CosIntegral}(f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}+c f \cos (2 e) \operatorname {CosIntegral}(2 f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}-c f \sin (2 e) \text {Si}(2 f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}-c f \cos (e) \text {Si}(f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}-\frac {c \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}{x}-\frac {c \sin (2 e+2 f x) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c \sin (e+f x)+c}}{2 x} \]

[In]

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

[Out]

-((c*Sqrt[a - a*Sin[e + f*x]]*Sqrt[c + c*Sin[e + f*x]])/x) + c*f*Cos[2*e]*CosIntegral[2*f*x]*Sec[e + f*x]*Sqrt
[a - a*Sin[e + f*x]]*Sqrt[c + c*Sin[e + f*x]] - c*f*CosIntegral[f*x]*Sec[e + f*x]*Sin[e]*Sqrt[a - a*Sin[e + f*
x]]*Sqrt[c + c*Sin[e + f*x]] - (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]]*SinIntegral[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]]*SinIntegral[2*f*x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 4700

Int[((g_.) + (h_.)*(x_))^(p_.)*((a_) + (b_.)*Sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*Sin[(e_.) + (f_.)*(x_
)])^(n_), x_Symbol] :> Dist[a^IntPart[m]*c^IntPart[m]*(a + b*Sin[e + f*x])^FracPart[m]*((c + d*Sin[e + f*x])^F
racPart[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 6873

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \left (\sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (e+f x) (c+c \sin (e+f x))}{x^2} \, dx \\ & = \left (\sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {c \cos (e+f x) (1+\sin (e+f x))}{x^2} \, dx \\ & = \left (c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (e+f x) (1+\sin (e+f x))}{x^2} \, dx \\ & = \left (c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \left (\frac {\cos (e+f x)}{x^2}+\frac {\sin (2 e+2 f x)}{2 x^2}\right ) \, dx \\ & = \frac {1}{2} \left (c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\sin (2 e+2 f x)}{x^2} \, dx+\left (c \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (e+f x)}{x^2} \, dx \\ & = -\frac {c \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}{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}+\left (c f \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (2 e+2 f x)}{x} \, dx-\left (c f \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\sin (e+f x)}{x} \, dx \\ & = -\frac {c \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}}{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}-\left (c f \cos (e) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\sin (f x)}{x} \, dx+\left (c f \cos (2 e) \sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (2 f x)}{x} \, dx-\left (c f \sec (e+f x) \sin (e) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\cos (f x)}{x} \, dx-\left (c f \sec (e+f x) \sin (2 e) \sqrt {a-a \sin (e+f x)} \sqrt {c+c \sin (e+f x)}\right ) \int \frac {\sin (2 f x)}{x} \, 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) \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 2.71 (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} \]

[In]

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

[Out]

(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*
ExpIntegralEi[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*ExpIntegral
Ei[(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)

Maple [F]

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

[In]

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

[Out]

int((c+c*sin(f*x+e))^(3/2)*(a-sin(f*x+e)*a)^(1/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} \]

[In]

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

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s 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 \]

[In]

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

[Out]

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 } \]

[In]

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

[Out]

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.38 (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} \]

[In]

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

[Out]

-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
*pi + 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*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 - 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(s
in(-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) + (pi - 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_integral(2*f*x) - pi*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) + (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 + 1/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*f*x + 2*e))*sqrt(a)*sqrt(c)/(f^2*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 \]

[In]

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

[Out]

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