Integrand size = 35, antiderivative size = 141 \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {(2 A-B) \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} (A-B) \arctan \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}+\frac {B \sqrt {\cos (c+d x)} \sin (c+d x)}{d \sqrt {a+a \cos (c+d x)}} \] Output:
(2*A-B)*arcsin(a^(1/2)*sin(d*x+c)/(a+a*cos(d*x+c))^(1/2))/a^(1/2)/d-2^(1/2 )*(A-B)*arctan(1/2*a^(1/2)*sin(d*x+c)*2^(1/2)/cos(d*x+c)^(1/2)/(a+a*cos(d* x+c))^(1/2))/a^(1/2)/d+B*cos(d*x+c)^(1/2)*sin(d*x+c)/d/(a+a*cos(d*x+c))^(1 /2)
Time = 0.47 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.18 \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {\left (B \arcsin \left (\sqrt {1-\cos (c+d x)}\right )-2 (A-B) \arcsin \left (\sqrt {\cos (c+d x)}\right )+\sqrt {2} A \arctan \left (\frac {\sqrt {\cos (c+d x)}}{\sqrt {\sin ^2\left (\frac {1}{2} (c+d x)\right )}}\right )-\sqrt {2} B \arctan \left (\frac {\sqrt {\cos (c+d x)}}{\sqrt {\sin ^2\left (\frac {1}{2} (c+d x)\right )}}\right )+B \sqrt {-((-1+\cos (c+d x)) \cos (c+d x))}\right ) \sin (c+d x)}{d \sqrt {1-\cos (c+d x)} \sqrt {a (1+\cos (c+d x))}} \] Input:
Integrate[(Sqrt[Cos[c + d*x]]*(A + B*Cos[c + d*x]))/Sqrt[a + a*Cos[c + d*x ]],x]
Output:
((B*ArcSin[Sqrt[1 - Cos[c + d*x]]] - 2*(A - B)*ArcSin[Sqrt[Cos[c + d*x]]] + Sqrt[2]*A*ArcTan[Sqrt[Cos[c + d*x]]/Sqrt[Sin[(c + d*x)/2]^2]] - Sqrt[2]* B*ArcTan[Sqrt[Cos[c + d*x]]/Sqrt[Sin[(c + d*x)/2]^2]] + B*Sqrt[-((-1 + Cos [c + d*x])*Cos[c + d*x])])*Sin[c + d*x])/(d*Sqrt[1 - Cos[c + d*x]]*Sqrt[a* (1 + Cos[c + d*x])])
Time = 0.81 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.06, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 3462, 27, 3042, 3461, 3042, 3253, 223, 3261, 218}
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 {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a \cos (c+d x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {a \sin \left (c+d x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 3462 |
\(\displaystyle \frac {\int \frac {a B+a (2 A-B) \cos (c+d x)}{2 \sqrt {\cos (c+d x)} \sqrt {\cos (c+d x) a+a}}dx}{a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {a B+a (2 A-B) \cos (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {\cos (c+d x) a+a}}dx}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a B+a (2 A-B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3461 |
\(\displaystyle \frac {(2 A-B) \int \frac {\sqrt {\cos (c+d x) a+a}}{\sqrt {\cos (c+d x)}}dx-2 a (A-B) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {\cos (c+d x) a+a}}dx}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 A-B) \int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx-2 a (A-B) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3253 |
\(\displaystyle \frac {-2 a (A-B) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx-\frac {2 (2 A-B) \int \frac {1}{\sqrt {1-\frac {a \sin ^2(c+d x)}{\cos (c+d x) a+a}}}d\left (-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x) a+a}}\right )}{d}}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 223 |
\(\displaystyle \frac {\frac {2 \sqrt {a} (2 A-B) \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}-2 a (A-B) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3261 |
\(\displaystyle \frac {\frac {4 a^2 (A-B) \int \frac {1}{\frac {\sin (c+d x) \tan (c+d x) a^3}{\cos (c+d x) a+a}+2 a^2}d\left (-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {\cos (c+d x) a+a}}\right )}{d}+\frac {2 \sqrt {a} (2 A-B) \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {2 \sqrt {a} (2 A-B) \arcsin \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}-\frac {2 \sqrt {2} \sqrt {a} (A-B) \arctan \left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}}\right )}{d}}{2 a}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)}}{d \sqrt {a \cos (c+d x)+a}}\) |
Input:
Int[(Sqrt[Cos[c + d*x]]*(A + B*Cos[c + d*x]))/Sqrt[a + a*Cos[c + d*x]],x]
Output:
((2*Sqrt[a]*(2*A - B)*ArcSin[(Sqrt[a]*Sin[c + d*x])/Sqrt[a + a*Cos[c + d*x ]]])/d - (2*Sqrt[2]*Sqrt[a]*(A - B)*ArcTan[(Sqrt[a]*Sin[c + d*x])/(Sqrt[2] *Sqrt[Cos[c + d*x]]*Sqrt[a + a*Cos[c + d*x]])])/d)/(2*a) + (B*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[a + a*Cos[c + d*x]])
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt [a])]/Rt[-b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && NegQ[b]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.) *(x_)]], x_Symbol] :> Simp[-2/f Subst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Co s[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x] && E qQ[a^2 - b^2, 0] && EqQ[d, a/b]
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e _.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f) Subst[Int[1/(2*b^2 - (a*c - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S in[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]
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Sim p[(A*b - a*B)/b Int[1/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]) , x], x] + Simp[B/b Int[Sqrt[a + b*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]] , x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/(f*(m + n + 1))), x] + Simp[1/(b*(m + n + 1)) Int[(a + b*Sin[e + f*x])^m*(c + d*S in[e + f*x])^(n - 1)*Simp[A*b*c*(m + n + 1) + B*(a*c*m + b*d*n) + (A*b*d*(m + n + 1) + B*(a*d*m + b*c*n))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 0] && (IntegerQ[n] || EqQ[m + 1/2, 0])
Time = 16.66 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.39
method | result | size |
default | \(\frac {\left (B \sin \left (d x +c \right ) \sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+2 A \sqrt {2}\, \arctan \left (\tan \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right )-B \sqrt {2}\, \arctan \left (\tan \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right )+2 A \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )-2 B \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \sqrt {2}\, \sqrt {a \left (\cos \left (d x +c \right )+1\right )}\, \sqrt {\cos \left (d x +c \right )}}{2 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, a}\) | \(196\) |
parts | \(\frac {A \sqrt {\cos \left (d x +c \right )}\, \sqrt {2}\, \sqrt {a \left (\cos \left (d x +c \right )+1\right )}\, \left (\sqrt {2}\, \arctan \left (\tan \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right )+\arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right )}{d \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, a}+\frac {B \left (\sqrt {2}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sin \left (d x +c \right )-\sqrt {2}\, \arctan \left (\tan \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right )-2 \arcsin \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right )\right ) \sqrt {\cos \left (d x +c \right )}\, \sqrt {2}\, \sqrt {a \left (\cos \left (d x +c \right )+1\right )}}{2 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, a}\) | \(251\) |
Input:
int(cos(d*x+c)^(1/2)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^(1/2),x,method=_RET URNVERBOSE)
Output:
1/2/d*(B*sin(d*x+c)*2^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+2*A*2^(1/2)* arctan(tan(d*x+c)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2))-B*2^(1/2)*arctan(tan( d*x+c)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2))+2*A*arcsin(cot(d*x+c)-csc(d*x+c) )-2*B*arcsin(cot(d*x+c)-csc(d*x+c)))*2^(1/2)*(a*(cos(d*x+c)+1))^(1/2)*cos( d*x+c)^(1/2)/(cos(d*x+c)+1)/(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)/a
Time = 1.02 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.44 \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {\sqrt {a \cos \left (d x + c\right ) + a} B \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left ({\left (2 \, A - B\right )} \cos \left (d x + c\right ) + 2 \, A - B\right )} \sqrt {a} \arctan \left (\frac {\sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right )}\right ) - \frac {\sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right ) + {\left (A - B\right )} a\right )} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{2 \, {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a}}\right )}{\sqrt {a}}}{a d \cos \left (d x + c\right ) + a d} \] Input:
integrate(cos(d*x+c)^(1/2)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^(1/2),x, algo rithm="fricas")
Output:
(sqrt(a*cos(d*x + c) + a)*B*sqrt(cos(d*x + c))*sin(d*x + c) + ((2*A - B)*c os(d*x + c) + 2*A - B)*sqrt(a)*arctan(sqrt(a*cos(d*x + c) + a)*sqrt(a)*sqr t(cos(d*x + c))*sin(d*x + c)/(a*cos(d*x + c)^2 + a*cos(d*x + c))) - sqrt(2 )*((A - B)*a*cos(d*x + c) + (A - B)*a)*arctan(1/2*sqrt(2)*sqrt(a*cos(d*x + c) + a)*sqrt(cos(d*x + c))*sin(d*x + c)/((cos(d*x + c)^2 + cos(d*x + c))* sqrt(a)))/sqrt(a))/(a*d*cos(d*x + c) + a*d)
\[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\int \frac {\left (A + B \cos {\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}}{\sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}}\, dx \] Input:
integrate(cos(d*x+c)**(1/2)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))**(1/2),x)
Output:
Integral((A + B*cos(c + d*x))*sqrt(cos(c + d*x))/sqrt(a*(cos(c + d*x) + 1) ), x)
Exception generated. \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(d*x+c)^(1/2)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^(1/2),x, algo rithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: sign: argument cannot be imagi nary; found %i
Timed out. \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\text {Timed out} \] Input:
integrate(cos(d*x+c)^(1/2)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^(1/2),x, algo rithm="giac")
Output:
Timed out
Timed out. \[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\int \frac {\sqrt {\cos \left (c+d\,x\right )}\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{\sqrt {a+a\,\cos \left (c+d\,x\right )}} \,d x \] Input:
int((cos(c + d*x)^(1/2)*(A + B*cos(c + d*x)))/(a + a*cos(c + d*x))^(1/2),x )
Output:
int((cos(c + d*x)^(1/2)*(A + B*cos(c + d*x)))/(a + a*cos(c + d*x))^(1/2), x)
\[ \int \frac {\sqrt {\cos (c+d x)} (A+B \cos (c+d x))}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {\sqrt {a}\, \left (\left (\int \frac {\sqrt {\cos \left (d x +c \right )+1}\, \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}d x \right ) b +\left (\int \frac {\sqrt {\cos \left (d x +c \right )+1}\, \sqrt {\cos \left (d x +c \right )}}{\cos \left (d x +c \right )+1}d x \right ) a \right )}{a} \] Input:
int(cos(d*x+c)^(1/2)*(A+B*cos(d*x+c))/(a+a*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))/(co s(c + d*x) + 1),x)*b + int((sqrt(cos(c + d*x) + 1)*sqrt(cos(c + d*x)))/(co s(c + d*x) + 1),x)*a))/a