3.155 \(\int \frac {\sqrt {a+a \cos (x)}}{x^2} \, dx\)

Optimal. Leaf size=42 \[ -\frac {1}{2} \text {Si}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}-\frac {\sqrt {a \cos (x)+a}}{x} \]

[Out]

-(a+a*cos(x))^(1/2)/x-1/2*sec(1/2*x)*Si(1/2*x)*(a+a*cos(x))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3319, 3297, 3299} \[ -\frac {1}{2} \text {Si}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}-\frac {\sqrt {a \cos (x)+a}}{x} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[x]]/x^2,x]

[Out]

-(Sqrt[a + a*Cos[x]]/x) - (Sqrt[a + a*Cos[x]]*Sec[x/2]*SinIntegral[x/2])/2

Rule 3297

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 3299

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 3319

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[((2*a)^IntPart[n
]*(a + b*Sin[e + f*x])^FracPart[n])/Sin[e/2 + (a*Pi)/(4*b) + (f*x)/2]^(2*FracPart[n]), Int[(c + d*x)^m*Sin[e/2
 + (a*Pi)/(4*b) + (f*x)/2]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[n
 + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {\sqrt {a+a \cos (x)}}{x^2} \, dx &=\left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\cos \left (\frac {x}{2}\right )}{x^2} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{x}-\frac {1}{2} \left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \frac {\sin \left (\frac {x}{2}\right )}{x} \, dx\\ &=-\frac {\sqrt {a+a \cos (x)}}{x}-\frac {1}{2} \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right ) \text {Si}\left (\frac {x}{2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 33, normalized size = 0.79 \[ -\frac {\sqrt {a (\cos (x)+1)} \left (x \text {Si}\left (\frac {x}{2}\right ) \sec \left (\frac {x}{2}\right )+2\right )}{2 x} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[x]]/x^2,x]

[Out]

-1/2*(Sqrt[a*(1 + Cos[x])]*(2 + x*Sec[x/2]*SinIntegral[x/2]))/x

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^2,x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

giac [A]  time = 0.44, size = 34, normalized size = 0.81 \[ -\frac {\sqrt {2} {\left (x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \operatorname {Si}\left (\frac {1}{2} \, x\right ) + 2 \, \cos \left (\frac {1}{2} \, x\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right )\right )} \sqrt {a}}{2 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^2,x, algorithm="giac")

[Out]

-1/2*sqrt(2)*(x*sgn(cos(1/2*x))*sin_integral(1/2*x) + 2*cos(1/2*x)*sgn(cos(1/2*x)))*sqrt(a)/x

________________________________________________________________________________________

maple [F]  time = 0.07, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {a +a \cos \relax (x )}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*cos(x))^(1/2)/x^2,x)

[Out]

int((a+a*cos(x))^(1/2)/x^2,x)

________________________________________________________________________________________

maxima [C]  time = 0.90, size = 23, normalized size = 0.55 \[ -\frac {1}{4} \, \sqrt {2} \sqrt {a} {\left (i \, \Gamma \left (-1, \frac {1}{2} i \, x\right ) - i \, \Gamma \left (-1, -\frac {1}{2} i \, x\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))^(1/2)/x^2,x, algorithm="maxima")

[Out]

-1/4*sqrt(2)*sqrt(a)*(I*gamma(-1, 1/2*I*x) - I*gamma(-1, -1/2*I*x))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\sqrt {a+a\,\cos \relax (x)}}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*cos(x))^(1/2)/x^2,x)

[Out]

int((a + a*cos(x))^(1/2)/x^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {a \left (\cos {\relax (x )} + 1\right )}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*cos(x))**(1/2)/x**2,x)

[Out]

Integral(sqrt(a*(cos(x) + 1))/x**2, x)

________________________________________________________________________________________