Integrand size = 26, antiderivative size = 48 \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=-\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{d} \] Output:
-2*a^(1/2)*arctanh(a^(1/2)*sin(d*x+c)/cos(d*x+c)^(1/2)/(a-a*cos(d*x+c))^(1 /2))/d
Result contains complex when optimal does not.
Time = 0.69 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.60 \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=-\frac {e^{\frac {1}{2} i (c+d x)} \sqrt {e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )} \left (\text {arcsinh}\left (e^{i (c+d x)}\right )+\text {arctanh}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right ) \sqrt {a-a \cos (c+d x)} \csc \left (\frac {1}{2} (c+d x)\right )}{\sqrt {2} d \sqrt {1+e^{2 i (c+d x)}}} \] Input:
Integrate[Sqrt[a - a*Cos[c + d*x]]/Sqrt[Cos[c + d*x]],x]
Output:
-((E^((I/2)*(c + d*x))*Sqrt[(1 + E^((2*I)*(c + d*x)))/E^(I*(c + d*x))]*(Ar cSinh[E^(I*(c + d*x))] + ArcTanh[Sqrt[1 + E^((2*I)*(c + d*x))]])*Sqrt[a - a*Cos[c + d*x]]*Csc[(c + d*x)/2])/(Sqrt[2]*d*Sqrt[1 + E^((2*I)*(c + d*x))] ))
Time = 0.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3042, 3254, 220}
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 \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a-a \sin \left (c+d x+\frac {\pi }{2}\right )}}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 3254 |
\(\displaystyle \frac {2 a \int \frac {1}{\frac {a^2 \sin (c+d x) \tan (c+d x)}{a-a \cos (c+d x)}-a}d\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}}{d}\) |
\(\Big \downarrow \) 220 |
\(\displaystyle -\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{d}\) |
Input:
Int[Sqrt[a - a*Cos[c + d*x]]/Sqrt[Cos[c + d*x]],x]
Output:
(-2*Sqrt[a]*ArcTanh[(Sqrt[a]*Sin[c + d*x])/(Sqrt[Cos[c + d*x]]*Sqrt[a - a* Cos[c + d*x]])])/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[-2*(b/f) Subst[Int[1/(b + d*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]))], x ] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(150\) vs. \(2(40)=80\).
Time = 8.30 (sec) , antiderivative size = 151, normalized size of antiderivative = 3.15
method | result | size |
default | \(\frac {\sqrt {a \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}{\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}\, \operatorname {arctanh}\left (\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2}}{\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sqrt {\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}{\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}}\right ) \sqrt {4}}{d \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}}\) | \(151\) |
Input:
int((a-a*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x,method=_RETURNVERBOSE)
Output:
1/d*(a*sin(1/2*d*x+1/2*c)^2)^(1/2)*sin(1/2*d*x+1/2*c)*((2*cos(1/2*d*x+1/2* c)^2-1)/(cos(1/2*d*x+1/2*c)+1)^2)^(1/2)*arctanh(cos(1/2*d*x+1/2*c)/(cos(1/ 2*d*x+1/2*c)+1)/((2*cos(1/2*d*x+1/2*c)^2-1)/(cos(1/2*d*x+1/2*c)+1)^2)^(1/2 )*2^(1/2))/(cos(1/2*d*x+1/2*c)-1)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)*4^(1/2)
Time = 0.11 (sec) , antiderivative size = 155, normalized size of antiderivative = 3.23 \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\left [\frac {\sqrt {a} \log \left (\frac {4 \, \sqrt {-a \cos \left (d x + c\right ) + a} {\left (2 \, \cos \left (d x + c\right )^{2} + 3 \, \cos \left (d x + c\right ) + 1\right )} \sqrt {a} \sqrt {\cos \left (d x + c\right )} - {\left (8 \, a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right )}{2 \, d}, \frac {\sqrt {-a} \arctan \left (\frac {\sqrt {-a \cos \left (d x + c\right ) + a} \sqrt {-a} {\left (2 \, \cos \left (d x + c\right ) + 1\right )}}{2 \, a \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}\right )}{d}\right ] \] Input:
integrate((a-a*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="fricas")
Output:
[1/2*sqrt(a)*log((4*sqrt(-a*cos(d*x + c) + a)*(2*cos(d*x + c)^2 + 3*cos(d* x + c) + 1)*sqrt(a)*sqrt(cos(d*x + c)) - (8*a*cos(d*x + c)^2 + 8*a*cos(d*x + c) + a)*sin(d*x + c))/sin(d*x + c))/d, sqrt(-a)*arctan(1/2*sqrt(-a*cos( d*x + c) + a)*sqrt(-a)*(2*cos(d*x + c) + 1)/(a*sqrt(cos(d*x + c))*sin(d*x + c)))/d]
\[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\int \frac {\sqrt {- a \left (\cos {\left (c + d x \right )} - 1\right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx \] Input:
integrate((a-a*cos(d*x+c))**(1/2)/cos(d*x+c)**(1/2),x)
Output:
Integral(sqrt(-a*(cos(c + d*x) - 1))/sqrt(cos(c + d*x)), x)
Leaf count of result is larger than twice the leaf count of optimal. 148 vs. \(2 (40) = 80\).
Time = 0.24 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.08 \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\frac {\sqrt {-a} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \sin \left (d x + c\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \cos \left (d x + c\right )\right )}{d} \] Input:
integrate((a-a*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="maxima")
Output:
sqrt(-a)*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2* c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + c os(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (40) = 80\).
Time = 0.77 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.54 \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 \, \sqrt {a} \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{2} + 2 \, \sqrt {2} - \sqrt {\tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{4} - 6 \, \tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{2} + 1} + 1\right )}}{{\left | -2 \, \tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{2} + 4 \, \sqrt {2} + 2 \, \sqrt {\tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{4} - 6 \, \tan \left (\frac {1}{4} \, d x + \frac {1}{4} \, c\right )^{2} + 1} - 2 \right |}}\right ) \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} \] Input:
integrate((a-a*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="giac")
Output:
2*sqrt(a)*log(2*(tan(1/4*d*x + 1/4*c)^2 + 2*sqrt(2) - sqrt(tan(1/4*d*x + 1 /4*c)^4 - 6*tan(1/4*d*x + 1/4*c)^2 + 1) + 1)/abs(-2*tan(1/4*d*x + 1/4*c)^2 + 4*sqrt(2) + 2*sqrt(tan(1/4*d*x + 1/4*c)^4 - 6*tan(1/4*d*x + 1/4*c)^2 + 1) - 2))*sgn(sin(1/2*d*x + 1/2*c))/d
Timed out. \[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\int \frac {\sqrt {a-a\,\cos \left (c+d\,x\right )}}{\sqrt {\cos \left (c+d\,x\right )}} \,d x \] Input:
int((a - a*cos(c + d*x))^(1/2)/cos(c + d*x)^(1/2),x)
Output:
int((a - a*cos(c + d*x))^(1/2)/cos(c + d*x)^(1/2), x)
\[ \int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx=\sqrt {a}\, \left (\int \frac {\sqrt {-\cos \left (d x +c \right )+1}\, \sqrt {\cos \left (d x +c \right )}}{\cos \left (d x +c \right )}d x \right ) \] Input:
int((a-a*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x)
Output:
sqrt(a)*int((sqrt( - cos(c + d*x) + 1)*sqrt(cos(c + d*x)))/cos(c + d*x),x)